amplihack completions — Command Reference¶
Synopsis¶
Description¶
Writes a shell completion script for amplihack to stdout. Pipe the output into your shell's completion directory or source it from your shell init file to enable tab-completion for all amplihack subcommands, flags, and arguments.
Completions are generated at runtime by clap_complete using amplihack's live command definition, so the output always reflects the installed binary's actual flags — including any subcommands added in future releases.
Arguments¶
| Argument | Required | Values | Description |
|---|---|---|---|
<SHELL> |
yes | bash zsh fish powershell |
Target shell for completion script generation |
Exit Codes¶
| Code | Meaning |
|---|---|
0 |
Completion script written to stdout |
1 |
Unrecognised shell name (see --help) |
Output¶
The command writes the completion script to stdout and nothing else. No trailing newline is added beyond what clap_complete generates. Redirect stdout to install permanently; source it to activate for the current session only.
Examples¶
Bash¶
Persist completions for all future sessions:
Or source for the current session only:
Zsh¶
Add to a directory on your $fpath:
Then ensure ~/.zfunc is on $fpath in ~/.zshrc (before compinit):
Fish¶
Fish auto-sources all files in ~/.config/fish/completions/, so no further steps are needed.
PowerShell¶
To persist across sessions, append to your profile:
Verification¶
After installing completions, confirm they are active by typing amplihack and pressing Tab:
$ amplihack <TAB>
RustyClawd amplifier claude codex
completions copilot doctor fleet
index-code index-scip install launch
memory mode multitask new
plugin query-code recipe resolve-bundle-asset
uninstall update uvx-help version
Note: Subcommands with explicit
#[command(name = "...")]attributes (e.g.RustyClawd,uvx-help,resolve-bundle-asset) use that exact casing. All others use clap's default kebab-case. This list may grow with future releases — regenerate completions after upgrading.
Pressing Tab after a flag also completes values where they are enumerated:
Implementation Note¶
Completions are generated from clap's CommandFactory trait using
clap_complete::generate(). The binary name hardcoded into every completion
script is amplihack. If you rename the binary, regenerate completions from
the renamed copy — the generated scripts embed the literal string amplihack
in completion function names and patterns.
Related¶
- How to Enable Shell Completions — Step-by-step guide for each shell
- amplihack install — Full CLI reference for install and uninstall