Documentation
¶
Overview ¶
Package cli is the gskill command-line view. It parses commands with Kong, renders human or JSON output through a shared harness, and translates errors into process exit codes. It depends only on the app service layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocsModel ¶
func DocsModel() (*kong.Application, error)
DocsModel builds the Kong model for the gskill grammar without parsing arguments or exiting. It mirrors the parser constructed in Run, so generated reference documentation always reflects the real command surface. It exists solely for the reference generator (cmd/gen-reference) and changes nothing about the shipped CLI behavior.
func ListJSON ¶
func ListJSON(skills []app.ListedSkill) map[string]any
ListJSON builds the stable --json object for a list result.
Types ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output renders primary results to stdout and diagnostics to stderr, keeping the two channels separate so --json stdout stays machine-parseable (FR-035, FR-036).
func NewOutput ¶
func NewOutput(stdout, stderr io.Writer, opts OutputOptions) *Output
NewOutput builds an Output. Interactive is forced off when stdout is not a TTY, so non-interactive (CI-safe) behavior is the default outside a terminal.
func (*Output) Interactive ¶
Interactive reports whether interactive UI (prompts, colors) is enabled.
type OutputOptions ¶
OutputOptions configures an Output harness.