Documentation
¶
Overview ¶
Package cli implements the orch command surface (PRD §22). Commands without an implementation yet fail closed with an explicit error.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitError = 1 ExitUsage = 2 )
Exit codes returned by Run.
Variables ¶
var Version = "dev"
Version is the release version of this binary, stamped by the release workflow via
-ldflags "-X github.com/kninetimmy/orch/internal/cli.Version=v1.2.3"
Builds without the stamp (go build, go install, go test) report "dev". status and doctor print it before any repository checks, so an uninitialized or broken repository can still identify the binary on PATH.
Functions ¶
Types ¶
type Env ¶
type Env struct {
// RepoRoot is the directory containing .orchestrator/.
RepoRoot string
Stdout io.Writer
Stderr io.Writer
// Stdin is the process input; nil is treated as empty. `orch run`
// verbs read their JSON document from it.
Stdin io.Reader
// LookPath resolves an executable name; defaults to exec.LookPath.
LookPath func(string) (string, error)
// Runner executes external commands; defaults to execx.Local
// resolving through LookPath.
Runner execx.Runner
}
Env carries the invocation context so commands stay testable.