Skip to content

feat(cli): add shell completions and detailed command help #10

Description

@wax911

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions