cmd

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess  = 0
	ExitError    = 1
	ExitUsage    = 2
	ExitNotFound = 3
	ExitConfig   = 4
)

Variables

This section is empty.

Functions

func AutoRegisterMCP added in v0.13.0

func AutoRegisterMCP(cfg config.Config)

AutoRegisterMCP checks if auto-registration is enabled in config and registers the MCP server in Claude Code settings if not already there.

func DefaultIndexSearch added in v0.13.0

func DefaultIndexSearch(query string, q sessionsIndexQuery) ([]search.Result, bool, error)

DefaultIndexSearch runs a query through the shared search service.

func Execute

func Execute(version string)

func FocusLiveVia added in v0.13.0

func FocusLiveVia(discover func() ([]agent.Agent, error)) func(string) (string, bool)

FocusLiveVia returns a FocusLive func: it finds the live agent running the session and brings its iTerm2 pane to the front.

func IsInteractive

func IsInteractive() bool

func LiveIDsVia added in v0.13.0

func LiveIDsVia(discover func() ([]agent.Agent, error)) func() []string

LiveIDsVia lists session ids of agents running in a terminal right now.

func RegisterAll

func RegisterAll(d Deps)

RegisterAll wires all subcommands to rootCmd using the provided dependencies.

func RunPickerHelper added in v0.13.0

func RunPickerHelper(args []string, out io.Writer) (bool, error)

RunPickerHelper runs the commands fzf calls on every keystroke (sessions rows/preview/picker-toggle) without aimux's full startup. It reports false for anything else so main continues normally.

func SetRunBoth

func SetRunBoth(fn func(cmd *cobra.Command, args []string) error)

func SetRunTUI

func SetRunTUI(fn func(cmd *cobra.Command, args []string) error)

Types

type Deps

type Deps struct {
	Discover         func() ([]agent.Agent, error)
	DiscoverSessions func(opts history.DiscoverOpts, dir string) ([]history.Session, error)
	PickSession      func(sessions []history.Session) (history.Session, error)
	ResumeBuilder    func(sessionID string, danger bool) (command, workDir string, err error)
	ResumeExec       func(sessionID string, danger bool)
	IndexSearch      func(query string, q sessionsIndexQuery) ([]search.Result, bool, error) // nil: legacy search
	FocusLive        func(sessionID string) (string, bool)                                   // nil: always resume
	LiveIDs          func() []string                                                         // nil: no live markers
	SpawnAgent       func(opts spawn.LaunchOpts) (pid int, tmuxSession string, err error)
	WebServer        func(port int) error
	Providers        []string
	Environments     map[string]config.EnvironmentConfig
	AgentConfigs     []config.AgentConfig
	ProfileStore     *profile.Store
	SkipPermissions  bool
	DefaultMode      string
	FeedbackPath     string
	TraceParsers     map[string]func(filePath string) ([]trace.Turn, error)
	ComposeEngine    *aimuxcompose.Engine
}

Deps holds all injectable dependencies for cobra subcommands.

type OutputWriter

type OutputWriter struct {
	JSON   bool
	Stdout io.Writer
	Stderr io.Writer
}

func NewOutputWriter

func NewOutputWriter(jsonMode bool) *OutputWriter

func (*OutputWriter) WriteError

func (w *OutputWriter) WriteError(msg string, code int, extra map[string]any) int

func (*OutputWriter) WriteResult

func (w *OutputWriter) WriteResult(data any) int

Jump to

Keyboard shortcuts

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