Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitCodeOK = 0 ExitCodeGeneral = 1 // unexpected error ExitCodeAuth = 2 // authentication/authorization failure ExitCodeNetwork = 3 // network/connection error ExitCodeBadInput = 4 // invalid input, missing file, bad flag ExitCodeTimeout = 5 // operation timed out )
Exit codes for semantic error signaling to AI agents and automation.
Variables ¶
View Source
var Version string
Functions ¶
func AgentDefaults ¶
func AgentDefaults() map[string]interface{}
AgentDefaults returns a set of flag overrides for --agent mode. This reduces the flag boilerplate agents need to pass.
func OutputVersion ¶
OutputVersion writes version info. Supports --json format.
func SetJSONLogging ¶
func SetJSONLogging()
SetJSONLogging enables JSON-structured log output. Pass "--log-format json" to the CLI to enable.
Types ¶
type JSONResult ¶
type JSONResult struct {
Status string `json:"status"` // "ok" or "error"
Data interface{} `json:"data,omitempty"` // command-specific payload
Error *JSONError `json:"error,omitempty"` // error details on failure
}
JSONResult is the standard JSON envelope for all command output. Every command that supports --output json wraps its result in this struct.
type TabComplete ¶
type TabComplete struct{}
Click to show internal directories.
Click to hide internal directories.