Skip to content

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

Description

@mtoumi990

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions