[FEATURE] Add shell completion support (bash/zsh/fish) for claude CLI

Status Fixed / completed
Reported on v2.1.138
Maintainer reply None cached
Activity 3 comments · opened May 10, 2026 · closed May 10, 2026

Feature Request

Add a built-in shell completion generator for the claude CLI, similar to how other CLI tools handle this:

  • kubectl completion zsh
  • gh completion -s zsh
  • helm completion bash

Proposed command

claude completion bash
claude completion zsh
claude completion fish

Usage

# zsh
source <(claude completion zsh)

# bash
source <(claude completion bash)

Why

Claude Code has a growing number of subcommands (agents, auth, mcp, plugin, project, install, ultrareview, etc.) and flags (--model, --effort, --print, --worktree, --mcp-config, etc.). Tab completion would make the CLI significantly more discoverable and faster to use, especially for less frequently used options.

Environment

  • Platform: macOS (darwin)
  • Version: 2.1.138

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7738
  2. https://github.com/anthropics/claude-code/issues/40503
  3. https://github.com/anthropics/claude-code/issues/9161

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

smorin · 5 months ago

@mtoumi990 is this in the nightly?

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.