[FEATURE] Bash tab-completion for the claude CLI
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
claude has a large and growing CLI surface (dozens of top-level flags plus subcommands like agents, auth, auto-mode, mcp, plugin, project, ultrareview, ...), but there's no Bash tab-completion for it. Discovering flag names and their valid values (e.g. --permission-mode, --output-format, --effort) currently means going back to --help output repeatedly.
Proposed Solution
Ship a Bash completion script for claude (either bundled with the CLI install, generated from the same option table --help uses, or at minimum linked from the docs/README as a known-good community script). I put together a standalone one and would be happy to have it linked, adapted, or superseded by an official version:
https://github.com/webdawg/claude-code-bash-completion
It covers top-level flags, one level of subcommands, and enum-valued option completion (--permission-mode, --model, --effort, --output-format, --input-format, --setting-sources), targets Bash 3.2+, and has no dependency on the bash-completion framework.
Alternative Solutions
Currently the only workaround is repeatedly running claude --help / claude <command> --help to recall flag names. A completion script maintained outside the main repo (what I've done) works but will drift out of sync with new releases faster than something generated from the CLI's own option table, and has much lower discoverability than something linked from the official docs/repo.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
- Running
claude --perm<TAB>completes to--permission-mode, then<TAB>again listsacceptEdits auto bypassPermissions manual dontAsk plan. - Running
claude mcp <TAB>listsadd add-from-claude-desktop add-json get list login logout remove reset-project-choices serve helpinstead of requiringclaude mcp --help.
Additional Context
Script + install instructions: https://github.com/webdawg/claude-code-bash-completion (AGPL-3.0-or-later; happy to relicense/contribute the logic directly if that's the blocker to including it upstream).
3 Comments
This would be really great to have.
Yes please, I was very surprised to find that Claude Code doesn't have completion - that's a pretty standard feature for widely used CLIs.
I think priority should be higher than Low given how many users CC has.
I did a quick search of community tools and found this to be the best and most recently maintained: https://github.com/douglaswth/claude-code-completion
This seems to be duplicate of