claude-bash-completion
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Pass
- Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Bash completion script for Claude Code CLI, providing tab completion for both built-in slash commands and custom commands.
Claude Bash Completion
Bash completion script for Claude Code CLI, providing tab completion for both built-in slash commands and custom commands.
Features
- Auto-completion for all Claude Code built-in slash commands (107 commands as of v2.1.114)
- Auto-completion for CLI flags and their values (64 flags as of v2.1.105)
- Auto-completion for CLI subcommands (11 subcommands as of v2.1.105)
- Auto-completion for custom commands and skills from personal and project directories
- Filesystem fallback when no programmatic completion matches
Requirements
- Bash shell
- Claude Code installed and configured
bash-completionpackage (usually pre-installed on most systems)
Installation
Method 1: Source in .bashrc
- Clone or download this repository:
git clone https://github.com/cldotdev/claude-bash-completion.git
- Add the following line to your
~/.bashrc:
source /path/to/claude-bash-completion/claude-completion.bash
- Reload your shell configuration:
source ~/.bashrc
Method 2: Install to system completion directory
Copy the script to your system's bash completion directory:
sudo cp claude-completion.bash /etc/bash_completion.d/claude
Then reload your shell or start a new terminal session.
Usage
Once installed, you can use tab completion with the claude command:
# Slash commands
claude / # Shows all available slash commands
claude /con # Completes to /config, /context, /cost, etc.
# CLI flags
claude -- # Shows all long flags
claude --mo # Completes to --model
# Flag values
claude --model # Shows model options: sonnet, opus, haiku, etc.
claude --effort # Shows effort levels: low, medium, high, max
# Subcommands
claude # Shows subcommands: doctor, mcp, auth, etc.
claude up # Completes to update, upgrade
# Custom commands and skills
claude /my-custom- # If you have custom commands in ~/.claude/commands/
Custom Commands and Skills
The script automatically discovers custom slash commands and skills from these locations:
- Personal commands:
~/.claude/commands/*.md - Personal skills:
~/.claude/skills/<name>/SKILL.md - Project commands:
<project-root>/.claude/commands/*.md - Project skills:
<project-root>/.claude/skills/<name>/SKILL.md
Subdirectory structures are converted to colon-separated names (e.g., commands/dev/rails.md or skills/dev/rails/SKILL.md becomes /dev:rails).
Project root is detected via git rev-parse --show-toplevel. Project-level discovery is skipped when not inside a git repository.
License
MIT License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found