Minimal and always up-to-date zsh completions for Claude Code CLI
- Pure tab completion only — no aliases, no wrapper functions, no opinionated workflows.
- Always up-to-date within 24 hours - scheduled github action run daily, Claude Code automatically regenerates completions when the CLI changes. No manual maintenance required.
- Claude Code writes completion scripts for Claude Code
- Claude Code writes slash commands to update Claude Code completions
- Claude Code creates GitHub workflows to run the slash commands every morning
- Claude Code opens PRs when updates are needed
- Me: sips coffee → clicks merge → resumes sipping
🐢 It's Claude Code all the way down.
- Command completion for all subcommands (
mcp,plugin,install,update, etc.) - Option/flag completion with descriptions
- Value completion for:
- Model names (
sonnet,opus,haiku, full model IDs) - Output formats (
text,json,stream-json) - Permission modes (
default,acceptEdits,bypassPermissions, etc.) - Tool names (
Bash,Read,Write,Edit, etc.)
- Model names (
- Context-aware: different completions based on current subcommand
- File/directory completion where appropriate
git clone https://github.com/wbingli/zsh-claudecode-completion.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-claudecode-completionThen add zsh-claudecode-completion to your plugins array in ~/.zshrc:
plugins=(... zsh-claudecode-completion)Reload your shell:
exec zshClone the repository:
git clone https://github.com/wbingli/zsh-claudecode-completion.gitAdd the directory to your fpath in ~/.zshrc:
fpath=(/path/to/zsh-claudecode-completion $fpath)
autoload -Uz compinit && compinitType claude followed by Tab to see available completions:
claude <TAB> # Show commands and options
claude mcp <TAB> # Show MCP subcommands
claude --model <TAB> # Show model names
claude --output-format <TAB> # Show output formatsWhen a new Claude CLI version is released, update the completion script by running:
claude /update-completionsThis command will:
- Upgrade Claude CLI to the latest version
- Check if the completion script is outdated
- Regenerate
_claudefrom the new--helpoutput - Commit the changes automatically
If completions don't work after installation, try:
rm -f ~/.zcompdump*
exec zshMIT