Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Claude Code CLI reference - Subcommands

Claude Code commands and subcommands

Claude Code documents 55 subcommands, including claude update, claude gateway and claude install [version]. These run as claude <command> from your shell. Each row gives the docs' description, accepted values and an example where one is documented.

Last verified 3 official pagesFull Claude Code reference

Claude Code subcommands
CommandDescriptionExample
claude update

Update to latest version

Docs: claude update
claude update
claude gateway

Start the self-hosted Claude apps gateway server, for administrators deploying SSO and policy in front of Claude Code. Requires --config pointing at a gateway.yaml.

Docs: claude gateway
claude gateway --config gateway.yaml
claude install [version]

Install or reinstall the native binary.

A version like 2.1.118, or stable or latest

Docs: claude install [version]
claude install stable
claude auth login

Sign in to your Anthropic account.

--email, --sso, --console

Docs: claude auth login
claude auth login --console
claude auth logout

Log out from your Anthropic account

Docs: claude auth logout
claude auth logout
claude auth status

Show authentication status as JSON. Exits with code 0 if logged in, 1 if not.

--text for human-readable output

Docs: claude auth status
claude auth status
claude agents

Open agent view to monitor and dispatch parallel background sessions.

--cwd <path>, --json, --all

Docs: claude agents
claude agents --json
claude attach <id|name>

Attach to a background session in this terminal.

Docs: claude attach <id|name>
claude attach 7c5dcf5d
claude auto-mode defaults

Print the built-in auto mode classifier rules as JSON.

--label <prefix>

Docs: claude auto-mode defaults
claude auto-mode defaults --label 'Git Destructive'
claude auto-mode reset

Restore the default auto mode configuration by removing the autoMode section from your user settings file.

-y, --yes

Docs: claude auto-mode reset
claude auto-mode reset --yes
claude daemon logs

Follow the background-session supervisor's log file, ~/.claude/daemon.log.

Docs: claude daemon logs
claude daemon logs
claude daemon run

Run the background-session supervisor in the foreground of this terminal, printing its log.

Docs: claude daemon run
claude daemon run
claude daemon status

Print the background-session supervisor's state, version, socket directory, and worker count. Exits 1 if the supervisor isn't running.

Docs: claude daemon status
claude daemon status
claude daemon stop --any

Stop the background-session supervisor and the sessions it hosts.

--keep-workers

Docs: claude daemon stop --any
claude daemon stop --any --keep-workers
claude doctor

Print read-only installation and settings diagnostics from the terminal without starting a session.

Docs: claude doctor
claude doctor
claude import [source]

Start an interactive session that runs /import to bring configuration from other coding agents into Claude Code.

--dry-run, --yes

Docs: claude import [source]
claude import codex --dry-run
claude logs <id|name>

Print recent output from a background session.

Docs: claude logs <id|name>
claude logs 7c5dcf5d
claude mcp

Configure Model Context Protocol (MCP) servers

Docs: claude mcp
-no example
claude mcp login <name>

Run a configured MCP server's OAuth flow without opening the interactive /mcp panel.

--no-browser

Docs: claude mcp login <name>
claude mcp login sentry
claude mcp logout <name>

Clear stored OAuth credentials for an MCP server

Docs: claude mcp logout <name>
claude mcp logout sentry
claude plugin

Manage Claude Code plugins. Alias: claude plugins.

Docs: claude plugin
claude plugin install code-review@claude-plugins-official
claude purge [path]

Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project's entry in ~/.claude.json.

--dry-run, -y/--yes, -i/--interactive, --all

Docs: claude purge [path]
claude purge ~/work/repo --dry-run
claude remote-control

Start a Remote Control server to control Claude Code from Claude.ai or the Claude app. Runs in server mode.

Docs: claude remote-control
claude remote-control --name "My Project"
claude respawn <id>

Restart a background session, running or stopped, with its conversation intact.

--all

Docs: claude respawn <id>
claude respawn 7c5dcf5d
claude rm <id>

Remove a background session from the list.

--discard-unpushed <commit>@<worktree-id>, --force-remove-worktree <worktree-id>

Docs: claude rm <id>
claude rm 7c5dcf5d
claude self-hosted-runner

Start a runner process that registers this machine or container with a self-hosted environment and hosts Claude Code cloud sessions.

setup, doctor, orchestrator

Docs: claude self-hosted-runner
claude self-hosted-runner setup
claude setup-token

Generate a long-lived OAuth token for CI and scripts. Requires a Claude subscription.

Docs: claude setup-token
claude setup-token
claude stop <id>

Stop a background session. Also accepts claude kill.

Docs: claude stop <id>
claude stop 7c5dcf5d
claude ultrareview [target]

Run ultrareview non-interactively. Prints findings to stdout and exits 0 on success or 1 on failure.

--json, --timeout <minutes> (default 45), --post, --no-post

Docs: claude ultrareview [target]
claude ultrareview 1234 --json
claude mcp add

Add an MCP server. For stdio servers, -- separates Claude's own options such as --transport, --env, and --scope from the server command.

--transport http|sse|stdio, --scope local|project|user, --env KEY=value, --header

Docs: claude mcp add
claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add-json

Add an MCP server directly from a JSON configuration.

Docs: claude mcp add-json
claude mcp add-json <name> '<json>'
claude mcp add-from-claude-desktop

Import MCP servers already configured in Claude Desktop, then select which servers to import.

Docs: claude mcp add-from-claude-desktop
claude mcp add-from-claude-desktop
claude mcp list

List all configured MCP servers.

Docs: claude mcp list
claude mcp list
claude mcp get

Get details for a specific MCP server.

Docs: claude mcp get
claude mcp get notion
claude mcp remove

Remove an MCP server. Removing a remote server also deletes the OAuth tokens and client registration stored for it.

Docs: claude mcp remove
claude mcp remove notion
claude mcp serve

Start Claude Code itself as a stdio MCP server that other applications can connect to.

Docs: claude mcp serve
claude mcp serve
claude mcp reset-project-choices

Reset the approval choices for project-scoped servers from .mcp.json files.

Docs: claude mcp reset-project-choices
claude mcp reset-project-choices
claude plugin init

Scaffold a new plugin at ~/.claude/skills/<name>/.

--description <text>, --author <name>, --author-email <email>, --with <components...>, -f/--force

Docs: claude plugin init
claude plugin init <name> [options]
claude plugin install

Install a plugin from one of your marketplaces.

-s/--scope user|project|local (default user), --config <key=value>, -y/--yes, --accept-command, --json, --marketplace

Docs: claude plugin install
claude plugin install <plugin> [options]
claude plugin uninstall

Remove an installed plugin from one scope.

-s/--scope, --keep-data, --prune, -y/--yes, --json

Docs: claude plugin uninstall
claude plugin uninstall <plugin> [options]
claude plugin enable

Enable a disabled plugin.

-s/--scope, --json

Docs: claude plugin enable
claude plugin enable <plugin> [options]
claude plugin disable

Disable a plugin without uninstalling it.

-a/--all, -s/--scope, --json

Docs: claude plugin disable
claude plugin disable [plugin] [options]
claude plugin update

Update a plugin to the latest version its marketplace offers.

-s/--scope user|project|local|managed, -y/--yes, --accept-command, --json

Docs: claude plugin update
claude plugin update <plugin> [options]
claude plugin list

List installed plugins with their version, scope, and status.

--json, --available, --data-size [plugin]

Docs: claude plugin list
claude plugin list [options]
claude plugin details

Show a plugin's component inventory and its projected token cost.

Docs: claude plugin details
claude plugin details <name>
claude plugin configure

Show an installed plugin's userConfig options and which are set, or save new values.

--values-stdin, --json

Docs: claude plugin configure
claude plugin configure <plugin>
claude plugin prune

Remove auto-installed dependencies that no installed plugin needs.

-s/--scope, --dry-run

Docs: claude plugin prune
claude plugin prune [options]
claude plugin eval

Run a plugin's eval cases and report scored results.

--runs <n>, -j/--concurrency

Docs: claude plugin eval
claude plugin eval [target] [options]
claude plugin eval init

Create an eval suite for the plugin in the current directory.

--bare, -i/--interactive

Docs: claude plugin eval init
claude plugin eval init [name] [options]
claude plugin tag

Create an annotated git tag named <name>--v<version> for a plugin.

--push, --dry-run, -f/--force

Docs: claude plugin tag
claude plugin tag [path] [options]
claude plugin test

Run the tests for a mod, a plugin whose code registers event handlers.

Docs: claude plugin test
claude plugin test [directory]
claude plugin validate

Validate a plugin manifest, a marketplace manifest, or the skills in a directory.

--strict, --json

Docs: claude plugin validate
claude plugin validate <path> [options]
claude plugin marketplace add

Add a marketplace from a GitHub repository, a git URL, a hosted URL, or a local path.

--scope <scope>, --sparse <paths...>, --claudeai, --json

Docs: claude plugin marketplace add
claude plugin marketplace add <source> [options]
claude plugin marketplace list

List every marketplace you've added, with its source.

--json

Docs: claude plugin marketplace list
claude plugin marketplace list [options]
claude plugin marketplace remove

Remove a marketplace's declaration from your settings.

--scope <scope>, --json

Docs: claude plugin marketplace remove
claude plugin marketplace remove <name> [options]

The rest of the Claude Code reference

FAQ

How many subcommands does Claude Code have?

The official Claude Code docs list 55 subcommands, including claude update, claude gateway and claude install [version]. All of them are in the table above, in the docs' order.

What does claude update do in Claude Code?

Update to latest version.

Where are Claude Code subcommands documented?

On 3 official docs pages at code.claude.com, last read on October 17, 2026. Every row in the table links the exact section it came from.

More on Claude Code

Sources

Last verified . Names and examples are copied verbatim from the 3 official pages below, and every row above links the exact section it came from.

Newsletter

Know when your tools change

One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.