Documentation
¶
Overview ¶
Package cli parses commands, chooses human or JSON presentation, and maps typed errors to exit codes. It contains no orchestration logic.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitError = 1 // unexpected or I/O failure ExitUsage = 2 ExitAmbiguous = 3 // a workspace name matched more than one worktree ExitUnknownWorkspace = 4 ExitInvalidConfig = 5 ExitRefused = 6 // the plan refused: conflict or uncertainty, do not blindly retry )
Exit codes. They are part of the command contract: automation branches on them, so they must stay stable as commands are added.
const OutputSchemaVersion = 1
OutputSchemaVersion versions the JSON envelope. Human output is not a compatibility contract; this is. Bump it only for a breaking change to the structure below.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
Main runs one command and returns the process exit code. A failing single-operation command writes nothing to stdout, so callers can pipe stdout without filtering diagnostics out of it. The deliberate exception (stop/autostart spec §5): commands whose structured report IS the output — autostart's batch and a partially succeeding stop — write that report to stdout and then return a reportedError carrying only a one-line summary for stderr; nothing further reaches stdout.
Types ¶
This section is empty.