Documentation
¶
Overview ¶
Package cli is the kumo command: the same use cases as the app, for people at a terminal and for coding agents. Every command accepts --json and then prints {"ok", "data", "error"} on stdout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is set by the build.
Functions ¶
Types ¶
type Command ¶
type Command struct {
Name string
Aliases []string
Summary string
Usage string
// Flags lists the flags the command takes; those ending in "=" take a value.
Flags []string
Sub []*Command
Run func(e *Env) (Result, error)
}
Command is one kumo command.
type Env ¶
type Env struct {
Stdout, Stderr io.Writer
JSON bool
Color bool
DryRun bool
Args []string
Flags map[string]string
Kumo func() (*application.Kumo, error)
Ctx context.Context
}
Env is what a command runs with.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer prints text output, styled only on a terminal. Status labels are ASCII so color is never the only signal.