cc-completion
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Gecti
- Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool provides shell tab-completion scripts (for Bash, Zsh, and Nushell) for the Claude Code CLI, allowing users to automatically suggest commands, options, and arguments directly in their terminal.
Security Assessment
Overall risk: Low. The tool is essentially a collection of static text definitions and completion functions. It does not request dangerous permissions, make network requests, or access sensitive data. The automated code scan found zero dangerous patterns or hardcoded secrets across its files. The only inherent risk comes from the installation process itself, which asks the user to clone a repository and either source the script directly or symlink it, which is standard practice for shell completions.
Quality Assessment
The project has a clear description and is licensed under the highly permissive MIT license. It appears to be actively maintained, with its most recent push happening today. However, community trust and visibility are currently very low. With only 5 GitHub stars, it is either a very new project or has not seen widespread community adoption yet.
Verdict
Safe to use.
Shell completion scripts for Claude Code CLI - tab completion for commands, options, and arguments in bash, zsh and nushell
Claude Code Shell Completion
🇯🇵 日本語版はこちら
Shell completion scripts for Claude Code, providing tab completion for commands, subcommands, and options in bash, zsh, and Nushell.
Features
- Command completion: Tab complete
claudesubcommands (agents,auto-mode,auth,mcp,plugin,plugins,setup-token,doctor,update,upgrade,install,ultrareview) - Option completion: All CLI options and flags are completable
- Contextual suggestions: Option values are suggested where applicable
- Output formats:
text,json,stream-json - Permission modes:
acceptEdits,bypassPermissions,default,dontAsk,plan,auto - Models:
sonnet,opus,haiku, etc. - Setting sources:
user,project,local - Effort levels:
low,medium,high,xhigh,max
- Output formats:
- File path completion: For options that expect file paths (e.g.,
--settings,--mcp-config,--add-dir,--file,--debug-file) - Subcommand completion: Full subcommand trees for
mcpandplugincommands
Quick Start
git clone https://github.com/hmmf022/cc-completion.git
cd cc-completion
Bash
mkdir -p ~/.local/share/bash-completion/completions
ln -sf "$(pwd)/claude-completion.bash" ~/.local/share/bash-completion/completions/claude
source ~/.local/share/bash-completion/completions/claude
Zsh
sudo ln -sf "$(pwd)/_claude" /usr/local/share/zsh/site-functions/_claude
autoload -Uz compinit && compinit
Nushell
Add to your Nushell config file ($nu.config-path):
use /path/to/cc-completion/claude-completions.nu *
For other installation methods (oh-my-zsh, system-wide bash, etc.), see Installation Details below.
Installation Details
Bash
Method 1: System-wide installation
Option A: Copy (simple)
sudo cp claude-completion.bash /etc/bash_completion.d/claude
Note: After updating the repository (e.g.,
git pull), you need to copy the file again.
Option B: Symbolic link (recommended)
sudo ln -sf "$(pwd)/claude-completion.bash" /etc/bash_completion.d/claude
Note: Updates are reflected automatically via
git pull. Do not delete or move the cloned repository.
Then reload your shell or run:
source /etc/bash_completion.d/claude
Method 2: User-level installation
mkdir -p ~/.local/share/bash-completion/completions
Option A: Copy (simple)
cp claude-completion.bash ~/.local/share/bash-completion/completions/claude
Note: After updating the repository (e.g.,
git pull), you need to copy the file again.
Option B: Symbolic link (recommended)
ln -sf "$(pwd)/claude-completion.bash" ~/.local/share/bash-completion/completions/claude
Note: Updates are reflected automatically via
git pull. Do not delete or move the cloned repository.
Add to your ~/.bashrc:
source ~/.local/share/bash-completion/completions/claude
Method 3: Manual sourcing
Add to your ~/.bashrc:
source /path/to/claude-completion.bash
Zsh
Method 1: System-wide installation
Option A: Copy (simple)
sudo cp _claude /usr/local/share/zsh/site-functions/_claude
Note: After updating the repository (e.g.,
git pull), you need to copy the file again.
Option B: Symbolic link (recommended)
sudo ln -sf "$(pwd)/_claude" /usr/local/share/zsh/site-functions/_claude
Note: Updates are reflected automatically via
git pull. Do not delete or move the cloned repository.
Then reload completion:
rm -f ~/.zcompdump; compinit
Method 2: User-level installation with oh-my-zsh
mkdir -p ~/.oh-my-zsh/custom/plugins/claude
Option A: Copy (simple)
cp _claude ~/.oh-my-zsh/custom/plugins/claude/_claude
Note: After updating the repository (e.g.,
git pull), you need to copy the file again.
Option B: Symbolic link (recommended)
ln -sf "$(pwd)/_claude" ~/.oh-my-zsh/custom/plugins/claude/_claude
Note: Updates are reflected automatically via
git pull. Do not delete or move the cloned repository.
Add to your ~/.zshrc:
plugins=(... claude)
Method 3: Manual fpath
Add to your ~/.zshrc before compinit:
fpath=(/path/to/cc-completion $fpath)
autoload -Uz compinit && compinit
Nushell
Add to your Nushell config file ($nu.config-path):
use /path/to/cc-completion/claude-completions.nu *
Note: Replace
/path/to/cc-completionwith the actual path to this cloned repository.
Usage Examples
After installation, you can use tab completion with the claude command:
# Complete subcommands
claude <TAB>
# Shows: agents auto-mode auth mcp plugin plugins setup-token doctor update upgrade install ultrareview
# Complete options
claude --<TAB>
# Shows: --debug --verbose --print --model --help ...
# Complete option values
claude --output-format <TAB>
# Shows: text json stream-json
claude --permission-mode <TAB>
# Shows: acceptEdits bypassPermissions default dontAsk plan auto
claude --model <TAB>
# Shows: sonnet opus haiku best sonnet1m
claude --effort <TAB>
# Shows: low medium high xhigh max
# Complete install targets
claude install <TAB>
# Shows: stable latest --force --help
# Complete auth subcommands
claude auth <TAB>
# Shows: login logout status
# Complete auth login options
claude auth login --<TAB>
# Shows: --claudeai --console --email --sso --help
# Complete auth status options
claude auth status --<TAB>
# Shows: --json --text --help
# Complete mcp subcommands
claude mcp <TAB>
# Shows: add add-from-claude-desktop add-json get list remove reset-project-choices serve
# Complete mcp add options
claude mcp add --transport <TAB>
# Shows: stdio sse http
# Complete plugin subcommands
claude plugin <TAB>
# Shows: disable enable install list marketplace prune autoremove tag uninstall update validate
# File path completion
claude --settings <TAB>
# Shows files and directories
Supported Commands
agents- List configured agents (with--setting-sourcesoption)auto-mode- Inspect auto mode classifier configurationconfig- Show auto mode classifier configurationcritique- Run auto mode critique on a conversation (with--modeloption)defaults- Show default auto mode classifier configuration
auth- Manage authenticationlogin- Sign in to your Anthropic account (with--claudeai,--console,--email,--ssooptions)logout- Log out of your Anthropic accountstatus- Show current authentication status (with--json,--textoptions)
mcp- Configure and manage MCP serversadd- Add an MCP server (with--scope,--transport,--env,--header,--callback-port,--client-id,--client-secretoptions)add-from-claude-desktop- Import MCP servers from Claude Desktop (with--scopeoption)add-json- Add an MCP server with a JSON stringget- Get details about an MCP serverlist- List configured MCP serversremove- Remove an MCP server (with--scopeoption)reset-project-choices- Reset all approved and rejected project-scoped serversserve- Start the Claude Code MCP server
plugin- Manage Claude Code pluginsdisable- Disable an enabled pluginenable- Enable a disabled plugininstall(i) - Install a plugin from available marketplaceslist- List installed pluginsmarketplace- Manage Claude Code marketplaces (add,list,remove(rm),update)prune(autoremove) - Remove auto-installed dependencies that are no longer needed (with--dry-run,--scope,--yesoptions)tag- Create a{name}--v{version}git tag for a plugin release (with--dry-run,--force,--message,--push,--remoteoptions)uninstall(remove) - Uninstall an installed plugin (with--keep-data,--prune,--scope,--yesoptions)update- Update a plugin to the latest versionvalidate- Validate a plugin or marketplace manifest
project- Manage Claude Code project statepurge- Delete all Claude Code state for a project (transcripts, tasks, file history, config entry) (with--all,--dry-run,--interactive,--yesoptions)
setup-token- Set up a long-lived authentication tokendoctor- Check the health of your Claude Code auto-updaterupdate- Check for updates and install if availableplugins- Alias forpluginupgrade- Alias forupdateinstall- Install Claude Code native build (with--forceoption)ultrareview- Run a cloud-hosted multi-agent code review of the current branch (or a PR number / base branch) (with--json,--timeoutoptions)
Supported Options
All Claude Code CLI options are supported, including:
- Session management:
--continue,--resume,--fork-session,--from-pr - Model selection:
--model,--fallback-model - Output control:
--print,--output-format,--input-format - Permissions:
--permission-mode,--dangerously-skip-permissions - Tools:
--tools,--allowed-tools,--disallowed-tools - MCP:
--mcp-config,--strict-mcp-config - File resources:
--file - Worktree:
--worktree,--tmux - Debugging:
--debug,--debug-file - And many more...
Testing
To verify the installation:
# For bash
type _claude_completion
# For zsh
which _claude
For Nushell, verify the completions are loaded:
# Check if the external command is registered
help commands | where name =~ "claude"
Try tab completion:
claude --mod<TAB>
# Should complete to: claude --model
Troubleshooting
Bash completion not working
Ensure
bash-completionpackage is installed:# Ubuntu/Debian sudo apt-get install bash-completion # macOS (Homebrew) brew install bash-completion@2Verify bash-completion is loaded in your shell:
type _init_completion
Zsh completion not working
Ensure
compinitis called in your~/.zshrc:autoload -Uz compinit && compinitRebuild completion cache:
rm -f ~/.zcompdump*; compinitVerify the completion function is loaded:
which _claude
Nushell completion not working
Ensure you are using Nushell 0.80 or later (required for
externcompletions):versionCheck that the completions are registered:
help commands | where name =~ "claude"
Contributing
If you find missing commands or options, please update the completion scripts:
- For bash: Edit
claude-completion.bash - For zsh: Edit
_claude - For Nushell: Edit
claude-completions.nu
License
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi