A collection of intelligent Zsh completion plugins for popular AI CLI tools, providing comprehensive auto-completion support for Claude Code, Codex, and Gemini CLI.
- Smart Auto-completion: Intelligent command and option completion for all supported AI CLI tools
- Comprehensive Coverage: Complete support for all commands, subcommands, and parameters
- Dynamic Context: Context-aware completions based on available configurations
- Convenient Aliases: Pre-configured short aliases for frequently used commands
- Easy Installation: Automated installation script with environment detection
- Clean Uninstallation: Simple removal with backup preservation
Complete auto-completion for Claude Code, Anthropic's official CLI tool for Claude.
Supported Commands:
agents- List configured agentsauth- Manage authenticationinstall- Install Claude Code native versionmcp- Configure and manage MCP serversplugin- Manage Claude Code pluginssetup-token- Configure long-term authentication tokendoctor- Check auto-updater healthupdate|upgrade- Check and install updates
Aliases:
cc→claudeccc→claude chatcca→claude apicccfg→claude config
Full auto-completion support for Codex, an AI-powered coding assistant.
Supported Commands:
app- Launch Codex desktop appexec- Run Codex non-interactivelyreview- Run code review non-interactivelymcp- Manage MCP serverslogin/logout- Manage authenticationapp-server- Run app server toolingdebug- Run debugging toolssandbox- Run commands in Codex-provided sandboxapply- Apply latest diff to local working treeresume- Resume previous interactive sessionfork- Fork previous interactive sessioncloud- Browse Codex Cloud tasksfeatures- Inspect and update feature flags
Aliases:
cdx→codexcdxa→codex askcdxc→codex chatcdxe→codex explaincdxf→codex fixcdxr→codex reviewcdxt→codex testcdxrf→codex refactorcdxcfg→codex config
Intelligent completion for Gemini CLI, Google's Gemini command-line interface.
Supported Commands:
mcp- Manage MCP serversextensions- Manage Gemini CLI extensionsskills- Manage agent skillshooks- Manage Gemini CLI hooks
Aliases:
gm→geminigmm→gemini mcpgme→gemini extensions
- Oh My Zsh - Zsh configuration framework
- Zsh 5.0 or higher
- At least one of the following AI CLI tools installed:
# Clone the repository
git clone https://github.com/YOUR_USERNAME/ohmyzsh-plugins.git
cd ohmyzsh-plugins
# Run the installation script
bash install.shThe installation script will:
- Detect your environment and installed AI CLI tools
- Copy plugin files to
~/.oh-my-zsh/custom/plugins/ - Automatically update your
.zshrcconfiguration - Create a backup of your
.zshrcfile
After installation, reload your shell configuration:
# Option 1: Reload shell (recommended)
exec zsh
# Option 2: Source configuration
source ~/.zshrcSimply type the command and press Tab to see available completions:
# Claude Code
claude [Tab] # Shows main commands
claude mcp [Tab] # Shows MCP subcommands
claude plugin [Tab] # Shows plugin management commands
# Codex
codex [Tab] # Shows main commands
codex mcp [Tab] # Shows MCP operations
codex exec [Tab] # Shows execution options
# Gemini CLI
gemini [Tab] # Shows main commands
gemini mcp [Tab] # Shows MCP management
gemini extensions [Tab] # Shows extension operations# Claude Code shortcuts
cc # Instead of 'claude'
ccc "your prompt" # Quick chat
cccfg # Quick config
# Codex shortcuts
cdx # Instead of 'codex'
cdxa "explain this code" # Quick ask
cdxr # Quick review
# Gemini CLI shortcuts
gm # Instead of 'gemini'
gmm list # Quick MCP list
gme list # Quick extension listThe plugins provide intelligent, context-aware completions:
- MCP Server Names: Dynamically lists configured MCP servers
- Extension Names: Shows installed extensions for management commands
- File Paths: Provides file completion where appropriate
- Option Values: Suggests valid values for enumerated options
The installation script supports both single-line and multi-line plugins arrays in .zshrc:
# Single-line format
plugins=(git brew claude codex gemini)
# Multi-line format
plugins=(
git
brew
claude
codex
gemini
)Many commands support configuration scopes:
user- User-level configurationproject- Project-specific configurationlocal- Local machine configuration
Example:
claude mcp add --scope user myserver
gemini mcp add --scope project toolserverTo remove the plugins:
bash uninstall.shThe uninstall script will:
- Remove plugin files from
~/.oh-my-zsh/custom/plugins/ - Remove plugin entries from your
.zshrc - Create a backup before making changes
- Clean up completion cache
If auto-completions don't work after installation:
# Clear completion cache
rm -f ~/.zcompdump*
# Reload shell
exec zshCheck if the plugin is properly added to your .zshrc:
grep "plugins=" ~/.zshrcEnsure your desired plugins are listed in the plugins array.
Verify that the AI CLI tool is installed and in your PATH:
# Check Claude Code
which claude
# Check Codex
which codex
# Check Gemini CLI
which geminiUse the built-in sync checker to verify plugin coverage after upgrading CLI tools:
bash check_sync.shBehavior notes:
- Uses
timeoutwhen available, orgtimeoutif installed via Homebrew. - If neither is available, checks still run without timeout protection (may be slower).
- Set
STRICT_MODE=1to require timeout support and fail fast in CI:
STRICT_MODE=1 bash check_sync.shRun the full interactive automation test (real zsh + Tab via expect):
bash scripts/test_interactive_completion.shWhat it does:
- Auto-discovers command/subcommand/option cases from live
claude/codex/gemini --helpoutput - Runs each case in a real interactive
zshsession and sendsTab - Fails with non-zero exit code if any expected completion is missing
Optional environment variables:
EXPECT_TIMEOUT=4to increase per-assert timeout (default:2)KEEP_TMP_HOME=1to keep the temporary isolatedHOMEfor debuggingMAX_DEPTH=2to limit recursive command depthCASE_LIMIT=200to run only first N generated cases for quick iterationEXPECT_VERBOSE=1to print PASS lines for every caseSTRICT_HELP=0to allow skipped help output parsing without failing generation
ohmyzsh-plugins/
├── claude/
│ └── claude.plugin.zsh
├── codex/
│ └── codex.plugin.zsh
├── gemini/
│ └── gemini.plugin.zsh
├── scripts/
│ └── test_interactive_completion.sh
├── install.sh
├── uninstall.sh
├── check_sync.sh
├── README.md
├── VERSION
└── LICENSE
Contributions are welcome! Please feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you encounter any problems or have suggestions:
- Open an issue on GitHub
- Include your environment details (OS, Zsh version, plugin version)
- Provide steps to reproduce the problem
See VERSION for version history.
This project is licensed under the MIT License - see the LICENSE file for details.
- Oh My Zsh - The delightful Zsh framework
- Claude Code - Anthropic's Claude CLI
- Codex - AI coding assistant
- Gemini CLI - Google's Gemini CLI
- zsh-completions - Additional completion definitions
- zsh-autosuggestions - Fish-like autosuggestions
- zsh-syntax-highlighting - Syntax highlighting
For support and questions:
- GitHub Issues: Report bugs and request features
- Documentation: Check this README and plugin source files
- Community: Share your experience with other users
Made with ❤️ for the AI CLI community