{"modulePath":"github.com/DomBlack/git-stack","version":"v0.5.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\nPackage cmd wires the cobra command tree. It contains no business logic: each file parses flags, decides between interactive and plain output, calls pkg/app and renders the result.\n\n## Functions\n\n```go\nfunc Execute() int\n```\nExecute runs the CLI with the process streams and returns the exit code.\n\n```go\nfunc NewRootCmd(streams Streams) *cobra.Command\n```\nNewRootCmd builds the command tree bound to the given streams.\n\n## Types\n\n```go\ntype Globals struct {\n\tNoInteractive bool\n\tDebug         bool\n\tQuiet         bool\n\tCwd           string\n}\n```\nGlobals holds the persistent flags.\n\n```go\ntype Runtime struct {\n\tGlobals Globals\n\tStreams Streams\n\t// Interactive is true when prompts and TUIs may be used.\n\tInteractive bool\n\tRunner      exec.Runner\n\tGit         *git.Client\n\tLog         *slog.Logger\n\t// Report prints every human facing line (docs/style.md).\n\tReport *ui.Reporter\n\t// contains filtered or unexported fields\n}\n```\nRuntime is everything a command needs, built once after flag parsing.\n\n```go\nfunc (rt *Runtime) Config(ctx context.Context) (*config.Config, error)\n```\nConfig loads stack.\\* settings lazily.\n\n```go\nfunc (rt *Runtime) Repo(ctx context.Context) (git.Repo, error)\n```\nRepo discovers the repository lazily (from --cwd or the working directory).\n\n```go\ntype Streams struct {\n\tIn  io.Reader\n\tOut io.Writer\n\tErr io.Writer\n}\n```\nStreams are the process's standard streams, injectable for tests.\n\n","path":"github.com/DomBlack/git-stack/cmd","name":"cmd","synopsis":"Package cmd wires the cobra command tree.","isRedistributable":true}
