Documentation
¶
Overview ¶
Package showcli implements the `agent-receipts show <seq>` subcommand: inspect a single receipt by its chain sequence number, read from a daemon-written SQLite store. It opens the database read-only so it is safe to run while the daemon is the active writer.
Logic lives here, away from cmd/agent-receipts/main.go, so tests can drive the subcommand directly with arbitrary args / captured I/O without shelling out to a built binary.
Index ¶
Constants ¶
const ( ExitOK = 0 // receipt found and printed ExitNotFound = 1 // no receipt at the requested sequence ExitUsageError = 2 // bad flags / unreadable DB / ambiguous chain )
Exit codes are part of the CLI contract — scripts pivot on them.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes the show subcommand with the given args (sans the program name and "show" subcommand token), writing output to stdout and diagnostics to stderr. Returns one of the Exit* constants.
envLookup is split out so tests can inject a deterministic environment without touching the real process env. Pass os.Getenv for the production caller.
Types ¶
This section is empty.