Documentation
¶
Overview ¶
Package cli builds the command-line interface from the registry: every Spec becomes a cobra subcommand with its flags.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitInput = 1 // invalid input ExitUsage = 2 // usage error ExitInternal = 3 // internal error )
Exit codes.
const DefaultMaxInput = 64 << 20
DefaultMaxInput is the --max-input limit (64 MB).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Registry *registry.Registry
Stdin io.Reader
Stdout, Stderr io.Writer
StdinTTY bool
StdoutTTY bool
Getenv func(string) string
RenderStyles render.Styles
RunTUI func(clipboard bool) error // nil: no TUI available
Clipboard clipboard.Clipboard // for --copy
Version, Commit string
}
Deps is everything the CLI takes from the environment; tests replace it.