Skip to content

Add shell completion via bonsai completion [bash|zsh|fish] #54

Description

@LastStep

Background

Bonsai uses Cobra, which ships a GenBashCompletionFile / GenZshCompletion / GenFishCompletion API. Most Cobra CLIs expose a completion subcommand so users can wire completions into their shells (bonsai completion zsh > ~/.zfunc/_bonsai, etc.).

Bonsai currently has no completion support — every command, flag, and installed-ability name is a tab-dead-end.

Acceptance criteria

  • New subcommand bonsai completion [bash|zsh|fish|powershell] added to cmd/.
  • Running it prints the shell-appropriate completion script to stdout.
  • Standard Cobra DisableDefaultCmd: false / explicit CompletionOptions wiring.
  • README "Installation" section gets a short "Shell completion" subsection with per-shell install snippets (bash/zsh/fish).
  • make build + existing tests pass.

Hints

  • See Cobra's completion docs.
  • Drop the file at cmd/completion.go; register in cmd/root.go.
  • Completions for bonsai add <skill> ability-name arguments would be a nice stretch but are out-of-scope for this issue — file a follow-up.

Why this is a good first issue

Self-contained new command, no schema changes, no interaction with the TUI harness. Visible to every user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions