cmd

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Version kong.VersionFlag `help:"Show version"`
	Emit    EmitCmd          `cmd:"" help:"Emit a beacon signal from hook event"`
	Scan    ScanCmd          `cmd:"" help:"Scan for beacon signals in tmux"`
	Clean   CleanCmd         `cmd:"" help:"Remove stale beacon signals"`
	// contains filtered or unexported fields
}

CLI represents the beacon command-line interface.

func NewCLI

func NewCLI() *CLI

NewCLI creates a new CLI instance.

func (*CLI) Execute

func (c *CLI) Execute(args []string) error

Execute runs the CLI with the given arguments.

type CleanCmd added in v0.2.1

type CleanCmd struct {
	Signal string `name:"signal" short:"S" help:"Signal type" default:"claude" enum:"claude"`
	Env    string `name:"env" short:"E" help:"Environment type" default:"tmux" enum:"tmux,none"`
}

CleanCmd removes stale beacon signals whose tmux panes no longer exist.

func (*CleanCmd) Run added in v0.2.1

func (c *CleanCmd) Run(cli *CLI) error

type EmitCmd

type EmitCmd struct {
	Signal  string `name:"signal" short:"S" help:"Signal type" default:"claude" enum:"claude"`
	Env     string `name:"env" short:"E" help:"Environment type" default:"tmux" enum:"tmux,none"`
	Message string `arg:"" optional:"" help:"Optional custom message"`
}

EmitCmd emits a beacon signal based on hook events from stdin.

func (*EmitCmd) Run

func (c *EmitCmd) Run(cli *CLI) error

type EnvironmentProvider added in v0.1.0

type EnvironmentProvider interface {
	GetEnvironment() (*signal.Environment, error)
	GetPaneTitle(paneID string) (string, error)
	ListPaneIDs() ([]string, error)
}

EnvironmentProvider is an interface for obtaining environment information.

type ScanCmd added in v0.1.0

type ScanCmd struct {
	Signal      string `name:"signal" short:"S" help:"Signal type" default:"claude" enum:"claude"`
	Env         string `name:"env" short:"E" help:"Environment type" default:"tmux" enum:"tmux,none"`
	Scope       string `name:"scope" short:"s" help:"Scan scope: window or session" default:"window" enum:"window,session"`
	AllSessions bool   `name:"all-sessions" short:"a" help:"Scan all sessions instead of current session only"`
	Template    string `name:"template" short:"t" help:"Go template for output"`
	Color       string `name:"color" help:"Color output: always, auto, never" default:"auto" enum:"always,auto,never"`
}

ScanCmd scans tmux windows/sessions for signals.

func (*ScanCmd) Run added in v0.1.0

func (c *ScanCmd) Run(cli *CLI) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL