Background
stackctl is intended to be installed on host machines and used repeatedly by operators. The CLI needs first-class help and shell completion support, not only minimal command parsing.
Goals
- Add detailed global help.
- Add detailed per-command help.
- Add shell completion generation.
- Make completion installation work for Homebrew where possible.
Required commands
stackctl --help
stackctl help
stackctl help up
stackctl up --help
stackctl completions bash
stackctl completions zsh
stackctl completions fish
stackctl completions install
Help requirements
Each command should include:
- Purpose.
- Usage.
- Flags.
- Common examples.
- Exit behavior where relevant.
- Safety warnings for destructive commands.
- Notes when a command requires external tools.
Examples:
secrets help must say sops and age are required only for secrets commands.
down help must explain that volumes are not removed.
reload help must explain config-first defaults and CLI overrides.
sync help must explain that profile overrides are not part of canonical drift checks.
Completion requirements
- Generate bash completions.
- Generate zsh completions.
- Generate fish completions.
- Include command names and flags.
- Include static stack names when config can be loaded from the current repository.
- Do not fail completion generation when no
.stackctl file exists.
Homebrew requirements
The generated completions must be compatible with Homebrew formula installation. The Homebrew formula should be able to call the binary to generate completion scripts during install.
Acceptance criteria
stackctl completions bash prints a bash completion script.
stackctl completions zsh prints a zsh completion script.
stackctl completions fish prints a fish completion script.
stackctl --help includes all stable commands.
- Each command has useful
--help output.
- Tests assert important help text and completion commands do not throw.
Non-goals
- Do not implement dynamic network calls for completions.
- Do not require Docker to generate completions.
Background
stackctlis intended to be installed on host machines and used repeatedly by operators. The CLI needs first-class help and shell completion support, not only minimal command parsing.Goals
Required commands
Help requirements
Each command should include:
Examples:
secretshelp must saysopsandageare required only for secrets commands.downhelp must explain that volumes are not removed.reloadhelp must explain config-first defaults and CLI overrides.synchelp must explain that profile overrides are not part of canonical drift checks.Completion requirements
.stackctlfile exists.Homebrew requirements
The generated completions must be compatible with Homebrew formula installation. The Homebrew formula should be able to call the binary to generate completion scripts during install.
Acceptance criteria
stackctl completions bashprints a bash completion script.stackctl completions zshprints a zsh completion script.stackctl completions fishprints a fish completion script.stackctl --helpincludes all stable commands.--helpoutput.Non-goals