π Zsh completion script for Claude Code CLI - intelligent auto-completion for all claude commands, options, and arguments
- β¨ Complete command completion for all
claudecommands - π§ Intelligent option and flag suggestions
- π¦ MCP server management completions
- π Plugin marketplace operation completions
- π― Context-aware argument completion
- π Helpful descriptions for all commands and options
- π Multi-language support (120+ languages)
- β‘ Dynamic completion for MCP servers, plugins, and sessions
- Zsh 5.0 or later
- Claude Code CLI installed
# Download and install (English example)
mkdir -p ~/.zsh/completions && curl -o ~/.zsh/completions/_claude \
https://github.com/___raw___/1160054/claude-code-zsh-completion/main/completions/_claudeFor other languages, replace _claude with your preferred language file. See Available Languages below.
Add the following to your ~/.zshrc (if not already present):
# Add completions directory to fpath
fpath=(~/.zsh/completions $fpath)
# Initialize completion system
autoload -Uz compinit
compinitReload your shell:
source ~/.zshrczinit light 1160054/claude-code-zsh-completionantigen bundle 1160054/claude-code-zsh-completionAdd to ~/.config/sheldon/plugins.toml:
[plugins.claude-code-zsh-completion]
github = "1160054/claude-code-zsh-completion"git clone https://github.com/1160054/claude-code-zsh-completion ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/claude-codeAdd claude-code to your plugins in ~/.zshrc:
plugins=(... claude-code)120+ languages supported! All completion files are located in the completions/ directory.
- English (
_claude), Japanese (_claude.ja), Chinese Simplified (_claude.zh-CN), Spanish (_claude.es), French (_claude.fr), German (_claude.de), Korean (_claude.ko), Russian (_claude.ru), Portuguese (_claude.pt), Italian (_claude.it), Arabic (_claude.ar), Hindi (_claude.hi), Turkish (_claude.tr), Polish (_claude.pl), Dutch (_claude.nl), Vietnamese (_claude.vi), Thai (_claude.th), Indonesian (_claude.id)
π See all 120+ supported languages
Browse all language files in the completions/ directory.
Included:
- European: Slavic (Bulgarian, Czech, Slovak, Croatian, Serbian, Ukrainian, Belarusian, etc.), Germanic (Swedish, Danish, Norwegian, Icelandic, Afrikaans), Romance (Portuguese, Romanian, Catalan, Galician), Baltic (Lithuanian, Latvian, Estonian), Celtic (Welsh, Scottish Gaelic), and more
- Asian: Chinese (Traditional, Cantonese, Hong Kong), Mongolian, Khmer, Lao, Bengali, Punjabi, Marathi, Tamil, Telugu, Kannada, Malayalam, Odia, Urdu, Nepali, Malay, Tagalog
- Middle Eastern: Persian, Hebrew, Azerbaijani, Kazakh, Uzbek, Uyghur, Tatar, Georgian
- African: Swahili, Wolof, Southern Sotho
- Regional variants: English (10 variants), Spanish (13 variants), German (4 variants), French (4 variants), Swedish (3 variants)
- Others: Esperanto, Basque, and many more
For any language, replace _claude with your preferred language file (e.g., _claude.ja for Japanese).
Once installed, simply type claude and press TAB to see available completions:
claude <TAB> # Shows all available commands
claude mcp <TAB> # Shows MCP subcommands
claude --<TAB> # Shows all available options
claude plugin <TAB> # Shows plugin subcommands# Autocomplete main commands
claude m<TAB> β claude mcp
# Autocomplete MCP subcommands
claude mcp a<TAB> β claude mcp add
# Autocomplete options
claude --mod<TAB> β claude --model
# Autocomplete with descriptions
claude mcp <TAB>
serve -- Start Claude Code MCP server
add -- Add an MCP server to Claude Code
remove -- Remove an MCP server
list -- List configured MCP servers
...# MCP server completion (shows your configured servers)
claude mcp remove <TAB> # Shows: server1, server2, myserver, etc.
claude mcp get <TAB> # Shows: server1, server2, myserver, etc.
# Plugin completion (shows your installed plugins)
claude plugin uninstall <TAB> # Shows your installed plugins
claude plugin enable <TAB> # Shows your installed plugins
# Session ID completion (shows your available sessions)
claude --resume <TAB> # Shows: 12345678-abcd-..., 87654321-dcba-..., etc.- Main commands:
mcp,plugin,migrate-installer,setup-token,doctor,update,install - MCP commands:
serve,add,remove,list,get,add-json,add-from-claude-desktop,reset-project-choices - Plugin commands:
validate,marketplace,install,uninstall,enable,disable - Plugin marketplace:
add,list,remove,update
- Make sure the completion file is in your
fpath:
echo $fpath- Verify the completion system is initialized in your
~/.zshrc:
autoload -Uz compinit
compinit- Clear and rebuild completion cache:
rm -f ~/.zcompdump
compinit- Check if the completion file is loaded:
which _claudeMake sure the completion file has the correct permissions:
chmod 644 ~/.zsh/completions/_claude- Ensure Claude Code CLI is installed and accessible in your PATH
- Try restarting your terminal completely
- Check for conflicts with other completion scripts
Contributions are welcome! Please feel free to submit a Pull Request.
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT Licenseβsee the LICENSE file for details.
- Based on the official Claude Code CLI documentation
- Inspired by the Zsh completion system
- Community translations from contributors worldwide
Made with β€οΈ for the Claude Code community
