{"modulePath":"github.com/TerracodeBA/vx","version":"v0.4.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\nPackage cli implements the vx command line. Every command prints plain text for people and, with --json, structured output for agents.\n\n## Constants\n\n```go\nconst (\n\tExitOK       = 0\n\tExitError    = 1\n\tExitConflict = 2 // land or sync stopped on conflicts\n\tExitTimeout  = 4 // vx wait gave up: nothing happened within --timeout\n)\n```\nExit codes.\n\n```go\nconst ExitEscalated = 3\n```\nExitEscalated is vx ask --wait's exit code when the question passed its deadline without an answer and went to the people involved.\n\n## Types\n\n```go\ntype App struct {\n\tOut    io.Writer\n\tErr    io.Writer\n\tGetenv func(string) string\n\tDir    string // working directory\n\t// OpenBrowser opens a URL for vx login and vx ui; nil uses the\n\t// system's browser. Tests set it to act as the browser.\n\tOpenBrowser func(url string) error\n\t// contains filtered or unexported fields\n}\n```\nApp holds what commands need from the environment, so tests can run the CLI in-process.\n\n```go\nfunc (a *App) Run(ctx context.Context, args []string) int\n```\nRun executes the CLI and returns the process exit code.\n\n```go\ntype Settings struct {\n\tServer string `json:\"server\"`\n\tToken  string `json:\"token\"`\n\t// ServerInfo is the server's last ServerInfo answer, asked at most\n\t// once a day.\n\tServerInfo *serverInfo `json:\"server_info,omitempty\"`\n}\n```\nSettings is the user's vx configuration file.\n\n","path":"github.com/TerracodeBA/vx/internal/cli","name":"cli","synopsis":"Package cli implements the vx command line.","isRedistributable":true}
