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

CLI reference - 285 items

Claude Code CLI reference

Claude Code documents 118 slash commands, 80 CLI flags, 55 subcommands, 8 keyboard shortcuts, 8 settings keys, 8 environment variables and 8 config files. This page lists all 285 with what each one does, the values it accepts and a working example where the docs give one.

Last verified 9 official pagesRun as claude

Claude Code slash commands
CommandDescription
/add-dir <path>

Add a working directory for file access during the current session.

Docs: /add-dir <path>
/advisor [model|off]

Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task.

fable, opus, sonnet, or a full model ID

Docs: /advisor [model|off]
/agents

Print a reminder to ask Claude to create or manage subagents, or to edit .claude/agents/ or ~/.claude/agents/ directly.

Docs: /agents
/artifact-capabilities

Skill. Load the reference for the runtime capabilities a published artifact can use.

Docs: /artifact-capabilities
/artifact-diagramming

Skill. Load diagramming guidance for Claude to follow in artifacts.

Docs: /artifact-diagramming
/artifacts

List the artifacts you own or that are shared with you.

Docs: /artifacts
/auto-mode-setup

Draft autoMode.environment entries from your project and recent sessions.

Docs: /auto-mode-setup
/autocompact [auto|<tokens>]

Set the auto-compact window: how full the context window gets before Claude Code compacts.

Docs: /autocompact [auto|<tokens>]
/autofix-pr [prompt]

Spawn a cloud session that watches the current branch's PR and pushes fixes.

Docs: /autofix-pr [prompt]
/background [prompt]

Detach the current session to run as a background agent and free this terminal.

Docs: /background [prompt]
/batch <instruction>

Skill. Orchestrate large-scale changes across a codebase in parallel.

Docs: /batch <instruction>
/branch [name]

Create a branch of the current conversation at this point.

Docs: /branch [name]
/btw [question]

Ask a side question about the current session without adding to the conversation history.

Docs: /btw [question]
/bug [report]

Report a bug or share your conversation.

Docs: /bug [report]
/cd <path>

Move this session to a new working directory, keeping the conversation.

Docs: /cd <path>
/chrome

Configure Claude in Chrome settings

Docs: /chrome
/claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]

Skill. Load Claude API and Managed Agents reference material for your project.

Docs: /claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]
/claude-in-chrome [task]

Skill. Have Claude carry out a task in your browser, such as testing a page.

Docs: /claude-in-chrome [task]
/clear [name]

Start a new conversation with empty context.

Aliases: /reset, /new

Docs: /clear [name]
/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]

Skill. Review the current diff, or a PR number, branch, or path you name.

Docs: /code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]
/color [color|default]

Set the prompt bar color for the current session.

Docs: /color [color|default]
/compact [instructions]

Free up context by summarizing the conversation so far.

Docs: /compact [instructions]
/config [key=value ...]

Open the Settings interface to adjust theme, model, output style, and other preferences.

Docs: /config [key=value ...]
/context [all]

Visualize current context usage as a colored grid.

Docs: /context [all]
/copy [N]

Copy the last assistant response to clipboard.

Docs: /copy [N]
/cost

Alias for /usage

Docs: /cost
/dataviz [request]

Skill. Design guidance for charts, graphs, and dashboards.

Docs: /dataviz [request]
/debug [description]

Skill. Enable debug logging for the current session and troubleshoot issues.

Docs: /debug [description]
/design [brief]

Skill. Draft UI mockups, screen flows, landing pages, or posters as designs.

Docs: /design [brief]
/design-login

Authorize design-system access for /design-sync with your claude.ai account.

Docs: /design-login
/design-sync [hint]

Skill. Convert your repo's React design system and upload it to claude.ai.

Docs: /design-sync [hint]
/desktop

Continue the current session in the Claude Code Desktop app.

Docs: /desktop
/diff

Review the changes in your working tree, including the edits Claude made.

Docs: /diff
/doctor [prompt-audit [path]]

Skill. Run a setup checkup that diagnoses installation, settings, and configuration issues.

Docs: /doctor [prompt-audit [path]]
/effort [level|auto|status|ultracode [on|off]]

Set the effort level: low to xhigh, max, or auto.

Docs: /effort [level|auto|status|ultracode [on|off]]
/exit

Exit the CLI. In an attached background session, this detaches.

Docs: /exit
/export [filename]

Export the current conversation as plain text.

Docs: /export [filename]
/fast [on|off]

Toggle fast mode on or off.

Docs: /fast [on|off]
/feedback [report]

Send product feedback about Claude Code.

Docs: /feedback [report]
/fewer-permission-prompts

Skill. Scan your transcripts for common read-only Bash and MCP tool calls and add an allowlist.

Docs: /fewer-permission-prompts
/focus

Toggle the focus view, which shows only your last prompt and a one-line summary.

Docs: /focus
/fork [prompt]

Copy the current conversation into a new background session.

Docs: /fork [prompt]
/goal [condition|clear]

Set a goal: Claude keeps working across turns until the condition is met.

Docs: /goal [condition|clear]
/heapdump

Write a JavaScript heap snapshot and a memory breakdown to disk.

Docs: /heapdump
/help

Show help and available commands

Docs: /help
/hooks

View hook configurations

Docs: /hooks
/ide

Manage IDE integrations and show status

Docs: /ide
/import [codex|gemini|cursor] [--dry-run] [--yes]

Bring configuration from OpenAI Codex, Google Gemini CLI, or Cursor into Claude Code.

Docs: /import [codex|gemini|cursor] [--dry-run] [--yes]
/init

Initialize project with a CLAUDE.md guide.

Docs: /init
/insights

Generate an HTML report analyzing your recent sessions.

Docs: /insights
/install-github-app

Install the Claude GitHub App for a repository.

Docs: /install-github-app
/install-slack-app

Install the Claude Slack app. Opens a browser to complete the OAuth flow.

Docs: /install-slack-app
/keybindings

Open your keyboard shortcuts file

Docs: /keybindings
/list-agents

List the subagents, agent team teammates, and other Claude Code sessions.

Docs: /list-agents
/login

Sign in to your Anthropic account

Docs: /login
/logout

Sign out from your Anthropic account

Docs: /logout
/loop [interval] [prompt]

Skill. Run a prompt repeatedly while the session stays open.

Docs: /loop [interval] [prompt]
/mcp [reconnect (<server>|all)|enable|disable [<server>|all]]

Manage MCP server connections and OAuth authentication.

Docs: /mcp [reconnect (<server>|all)|enable|disable [<server>|all]]
/memory

Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entries.

Docs: /memory
/mobile

Show QR code to download the Claude mobile app.

Aliases: /ios, /android

Docs: /mobile
/model [model]

Switch the AI model and save it as your default for new sessions.

Docs: /model [model]
/output-style [style]

List output styles or switch to one.

Docs: /output-style [style]
/passes

Share a free week of Claude Code with friends.

Docs: /passes
/permissions

Manage allow, ask, and deny rules for tool permissions.

Docs: /permissions
/plan [description]

Enter plan mode directly from the prompt.

Docs: /plan [description]
/plugin [subcommand]

Manage Claude Code plugins. Run with no argument to open the plugin manager.

Docs: /plugin [subcommand]
/plugin-authoring

Load the reference Claude works from to write a mod.

Docs: /plugin-authoring
/powerup

Discover Claude Code features through quick interactive lessons.

Docs: /powerup
/pr-comments [PR]

Removed in v2.1.91. Ask Claude directly to view pull request comments instead.

Docs: /pr-comments [PR]
/privacy-settings

View and update your privacy settings.

Docs: /privacy-settings
/radio

Open Claude FM lo-fi radio in your browser.

Docs: /radio
/rate-limit-options

Show ways to keep working when a claude.ai usage limit blocks a request.

Docs: /rate-limit-options
/recap

Generate a one-line summary of the current session on demand.

Docs: /recap
/release-notes

View the changelog in an interactive version picker.

Docs: /release-notes
/reload-plugins [--force]

Reload all active plugins to apply pending changes without restarting.

Docs: /reload-plugins [--force]
/reload-skills

Re-scan skill and command directories so skills added or changed on disk load.

Docs: /reload-skills
/remote-control

Make this session available for Remote Control from claude.ai.

Docs: /remote-control
/remote-env

Choose the default cloud environment for cloud sessions you start.

Docs: /remote-env
/rename [name]

Rename the current session and show the name on the prompt bar.

Docs: /rename [name]
/resume [session]

Resume a conversation by ID or name, or open the session picker.

Docs: /resume [session]
/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]

Alias of /code-review.

Docs: /review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]
/rewind

Rewind the conversation and/or code to a previous point, or summarize from there.

Aliases: /checkpoint, /undo

Docs: /rewind
/run

Skill. Launch and drive your project's app to see a change working.

Docs: /run
/run-skill-generator

Skill. Teach /run and /verify how to build, launch, and drive your project.

Docs: /run-skill-generator
/sandbox

Toggle sandbox mode. Available on supported platforms only

Docs: /sandbox
/schedule [description]

Create, update, list, or run routines, which execute in the cloud.

Docs: /schedule [description]
/scroll-speed

Adjust mouse wheel scroll speed interactively.

Docs: /scroll-speed
/security-review

Analyze the changes on your current branch for security vulnerabilities.

Docs: /security-review
/setup-bedrock

Configure Amazon Bedrock authentication, region, and model pins.

Docs: /setup-bedrock
/setup-vertex

Configure Google Cloud's Agent Platform authentication, project, and region.

Docs: /setup-vertex
/simplify [target]

Skill. Review the changed code for cleanup opportunities and apply fixes.

Docs: /simplify [target]
/skill-doctor

Show what each of your skills costs in context and how often it gets used.

Docs: /skill-doctor
/skills

List available skills. Type to filter the list by name or description.

Docs: /skills
/slides [brief]

Skill. Make a new presentation as a Claude Slides artifact.

Docs: /slides [brief]
/stats

Alias for /usage. Opens on the Stats tab

Docs: /stats
/status

Open the Settings interface on the Status tab, showing version, model, account, and connectivity.

Docs: /status
/statusline

Configure Claude Code's status line.

Docs: /statusline
/stickers

Order Claude Code stickers

Docs: /stickers
/stop

Stop the background session you're attached to.

Docs: /stop
/subtask <task>

Spawn a forked subagent: a background subagent that inherits the full conversation.

Docs: /subtask <task>
/tasks

View and manage background work in the current session.

Docs: /tasks
/team-onboarding

Generate a team onboarding guide from your Claude Code usage history.

Docs: /team-onboarding
/teleport

Pull a cloud session into this terminal.

Docs: /teleport
/terminal-setup

Install a Shift+Enter keybinding for newlines in VS Code, Cursor, and other terminals.

Docs: /terminal-setup
/theme

Change the color theme.

Docs: /theme
/tui [default|fullscreen]

Set the terminal UI renderer and relaunch into it.

Docs: /tui [default|fullscreen]
/ultraplan <prompt>

Removed. Use plan mode instead.

Docs: /ultraplan <prompt>
/ultrareview [PR or branch]

Run a deep, multi-agent code review in a cloud sandbox.

Docs: /ultrareview [PR or branch]
/update-config [request]

Skill. Describe a settings change, such as allowing a command, and Claude applies it.

Docs: /update-config [request]
/upgrade

Open the upgrade page in your browser to switch to a higher plan tier.

Docs: /upgrade
/usage

Show session cost, plan usage limits, and activity stats.

Docs: /usage
/usage-credits

Configure usage credits, or request them from your admin.

Docs: /usage-credits
/verify

Skill. Confirm a code change does what it should by building and running your project.

Docs: /verify
/vim

Removed in v2.1.92. Toggle between Vim and Normal editing modes through /config instead.

Docs: /vim
/voice [hold|tap|off]

Toggle voice dictation, or enable it in a specific mode.

Docs: /voice [hold|tap|off]
/web-setup

Connect your GitHub account for cloud sessions using your local gh credentials.

Docs: /web-setup
/workflow-authoring

Skill. Load the reference for writing dynamic workflow scripts.

Docs: /workflow-authoring
/workflows

Open the workflow progress view to watch, pause, resume, or save workflows.

Docs: /workflows
Claude Code CLI flags
FlagDescriptionExample
--add-dir

Add additional working directories for Claude to read and edit files.

Docs: --add-dir
claude --add-dir ../apps ../lib
--advisor <model>

Enable the server-side advisor tool for this session with a model alias or full model ID.

fable, opus, sonnet, or a full model ID

Docs: --advisor <model>
claude --advisor opus
--agent

Specify an agent for the current session (overrides the agent setting)

Docs: --agent
claude --agent my-custom-agent
--agents

Define custom subagents dynamically via JSON.

Docs: --agents
-no example
--allow-dangerously-skip-permissions

Add bypassPermissions to the Shift+Tab mode cycle without starting in it.

Docs: --allow-dangerously-skip-permissions
claude --permission-mode plan --allow-dangerously-skip-permissions
--allowedTools, --allowed-tools

Tools that execute without prompting for permission, apart from reads from network paths.

Docs: --allowedTools, --allowed-tools
"Bash(git log *)" "Bash(git diff *)" "Read"
--append-subagent-system-prompt

Append custom text to the end of every subagent's system prompt. Only applies in non-interactive mode with -p.

Docs: --append-subagent-system-prompt
-no example
--append-subagent-system-prompt-file

Load text from a file and append it to subagent system prompts.

Docs: --append-subagent-system-prompt-file
-no example
--append-system-prompt

Append custom text to the end of the default system prompt

Docs: --append-system-prompt
claude --append-system-prompt "Always use TypeScript"
--append-system-prompt-file

Load additional system prompt text from a file and append to the default prompt

Docs: --append-system-prompt-file
claude --append-system-prompt-file ./extra-rules.txt
--autocompact <auto|tokens>

Set the auto-compact window for this session without changing your saved settings.

Docs: --autocompact <auto|tokens>
claude --autocompact 500k
--ax-screen-reader

Render screen-reader friendly output: flat text without decorative borders or animations.

Docs: --ax-screen-reader
claude --ax-screen-reader
--bare

Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster.

Docs: --bare
claude --bare -p "query"
--betas

Beta headers to include in API requests (API key users only)

Docs: --betas
claude --betas interleaved-thinking
--bg, --background

Start the session as a background agent and return immediately.

Docs: --bg, --background
claude --bg "investigate the flaky test"
--channels

(Research preview) MCP servers whose channel notifications Claude should listen for in this session.

Space-separated plugin:<name>@<marketplace> entries

Docs: --channels
claude --channels plugin:my-notifier@my-marketplace
--chrome

Enable Chrome browser integration for web automation and testing

Docs: --chrome
claude --chrome
--cloud

With a task description, create a new cloud session. With a session ID or claude.ai/code URL, queue a message into that session instead, with -p.

Docs: --cloud
claude --cloud "Fix the login bug"
--continue, -c

Load the most recent conversation in the current directory.

Docs: --continue, -c
claude --continue
--dangerously-load-development-channels

Enable channels that are not on the approved allowlist, for local development.

plugin:<name>@<marketplace> and server:<name> entries

Docs: --dangerously-load-development-channels
claude --dangerously-load-development-channels server:webhook
--dangerously-skip-permissions

Skip permission prompts. Equivalent to --permission-mode bypassPermissions.

Docs: --dangerously-skip-permissions
claude --dangerously-skip-permissions
--debug

Enable debug mode with optional category filtering, such as --debug='mcp,startup' or --debug='!mcp'.

Docs: --debug
claude --debug='mcp,startup'
--debug-file <path>

Write debug logs to a specific file path. Implicitly enables debug mode.

Docs: --debug-file <path>
claude --debug-file /tmp/claude-debug.log
--desktop

Open the Claude Desktop app on the current directory and exit without starting a session in the terminal.

Docs: --desktop
claude --desktop
--disable-slash-commands

Disable all skills and commands for this session

Docs: --disable-slash-commands
claude --disable-slash-commands
--disallowedTools, --disallowed-tools

Deny rules. A bare tool name removes the matching tools from Claude's context; a scoped rule denies only matching calls.

Docs: --disallowedTools, --disallowed-tools
"Bash(git log *)" "Bash(git diff *)" "Edit"
--effort

Set the effort level for the current session. Available levels depend on the model.

low, medium, high, xhigh, max, or ultracode

Docs: --effort
claude --effort high
--enable-auto-mode

Removed in v2.1.111. Auto mode is now in the Shift+Tab cycle by default; use --permission-mode auto to start in it.

Docs: --enable-auto-mode
claude --permission-mode auto
--environment <environment-id>

Create a new cloud session that runs on the self-hosted environment with the given ID. Environment IDs start with ccpool_.

Docs: --environment <environment-id>
claude -p "Fix the login bug" --environment ccpool_abc123
--exclude-dynamic-system-prompt-sections

Move per-user context, such as the auto memory location, out of the system prompt and into the first user message.

Docs: --exclude-dynamic-system-prompt-sections
claude -p --exclude-dynamic-system-prompt-sections "query"
--exec

Run a shell command as a PTY-backed background job instead of starting a Claude session. Use with --bg.

Docs: --exec
claude --bg --exec 'pytest -x'
--fallback-model

Enable automatic fallback to the specified model(s) when the primary model is overloaded or not available.

Comma-separated list tried in order

Docs: --fallback-model
claude --fallback-model sonnet,haiku
--fork-session

When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)

Docs: --fork-session
claude --resume abc123 --fork-session
--forward-subagent-text

Emit subagent text and thinking blocks in the output stream as assistant and user messages with parent_tool_use_id set.

Docs: --forward-subagent-text
-no example
--from-pr

Open the session picker filtered to sessions linked to a specific pull request.

PR number, GitHub/GitHub Enterprise PR URL, GitLab MR URL, or Bitbucket PR URL

Docs: --from-pr
claude --from-pr 123
--ide

Automatically connect to IDE on startup if exactly one valid IDE is available

Docs: --ide
claude --ide
--init

Run Setup hooks with the init matcher before the session (print mode only)

Docs: --init
claude -p --init "query"
--init-only

Run Setup and SessionStart hooks, then exit without starting a conversation

Docs: --init-only
claude --init-only
--include-hook-events

Include hook lifecycle events in the output stream.

Docs: --include-hook-events
-no example
--include-partial-messages

Include partial streaming events in output. Requires --print and --output-format stream-json.

Docs: --include-partial-messages
-no example
--input-format

Specify input format for print mode.

text, stream-json

Docs: --input-format
claude -p --output-format json --input-format stream-json
--json-schema

Get validated JSON output matching a JSON Schema after the agent completes its workflow (print mode only).

Docs: --json-schema
claude -p --json-schema '{"type":"object","properties":{...}}' "query"
--maintenance

Run Setup hooks with the maintenance matcher before the session (print mode only)

Docs: --maintenance
claude -p --maintenance "query"
--max-budget-usd

Stop the run once estimated spend on API calls reaches this amount (print mode only).

Docs: --max-budget-usd
claude -p --max-budget-usd 5.00 "query"
--max-turns

Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached.

No limit by default

Docs: --max-turns
claude -p --max-turns 3 "query"
--mcp-config

Load MCP servers from JSON files or strings (space-separated).

Docs: --mcp-config
claude --mcp-config ./mcp.json
--model

Sets the model for the current session with a model alias such as sonnet, opus, haiku, or fable, or a model's full name.

Docs: --model
claude --model claude-sonnet-5
--name, -n

Set a display name for the session, shown in /resume and the terminal title.

Docs: --name, -n
claude -n "my-feature-work"
--no-chrome

Disable Chrome browser integration for this session

Docs: --no-chrome
claude --no-chrome
--no-session-persistence

Disable session persistence so sessions are not saved to disk and cannot be resumed. Print mode only.

Docs: --no-session-persistence
claude -p --no-session-persistence "query"
--output-format

Specify output format for print mode.

text, json, stream-json

Docs: --output-format
claude -p "query" --output-format json
--permission-mode

Begin in a specified permission mode.

default, acceptEdits, plan, auto, dontAsk, bypassPermissions, or manual (alias for default)

Docs: --permission-mode
claude --permission-mode plan
--permission-prompt-tool

Specify an MCP tool to handle permission prompts in non-interactive mode.

Docs: --permission-prompt-tool
claude -p --permission-prompt-tool mcp_auth_tool "query"
--permission-prompts

Set who answers permission prompts in print mode.

host (default) or none

Docs: --permission-prompts
claude -p --permission-prompts none "query"
--plugin-dir

Load a plugin from a directory or .zip archive, or several from a folder of plugins, for this session only.

Docs: --plugin-dir
claude --plugin-dir ./my-plugin
--plugin-url

Fetch a plugin .zip archive from a URL for this session only.

Docs: --plugin-url
claude --plugin-url https://example.com/plugin.zip
--print, -p

Print response without interactive mode.

Docs: --print, -p
claude -p "query"
--prompt-suggestions

Emit a prompt_suggestion message with a predicted next user prompt after each turn that generates one.

Docs: --prompt-suggestions
-no example
--ref <branch>

With --environment, base the new session's checkout on a named ref instead of local HEAD

Docs: --ref <branch>
claude -p "Run the smoke test" --environment ccpool_abc123 --ref main
--remote

Deprecated alias for --cloud, including the existing-session form

Docs: --remote
claude --remote "Fix the login bug"
--remote-control, --rc

Start an interactive session with Remote Control enabled so you can also control it from claude.ai or the Claude app.

Docs: --remote-control, --rc
claude --remote-control "My Project"
--remote-control-session-name-prefix <prefix>

Prefix for auto-generated Remote Control session names when no explicit name is set.

Defaults to your machine's hostname

Docs: --remote-control-session-name-prefix <prefix>
claude remote-control --remote-control-session-name-prefix dev-box
--replay-user-messages

Re-emit user messages from stdin back on stdout for acknowledgment.

Docs: --replay-user-messages
-no example
--restricted

Start in restricted mode, for evaluation harnesses where Claude Code must not run commands or read the machine's user and project settings.

Docs: --restricted
claude --restricted -p "query"
--resume, -r

Resume a specific session by ID or name, or show an interactive picker to choose a session.

Docs: --resume, -r
claude --resume auth-refactor
--safe-mode

Start with all customizations disabled to troubleshoot a broken configuration.

Docs: --safe-mode
claude --safe-mode
--session-id

Use a specific session ID for the conversation (must be a valid UUID)

Docs: --session-id
claude --session-id "550e8400-e29b-41d4-a716-446655440000"
--setting-sources

Comma-separated list of setting sources to load.

user, project, local

Docs: --setting-sources
claude --setting-sources user,project
--settings

Path to a settings JSON file or an inline JSON string. Values override the same keys in settings.json files for this session.

Docs: --settings
claude --settings ./settings.json
--strict-mcp-config

Only use MCP servers from --mcp-config, ignoring all other MCP configurations.

Docs: --strict-mcp-config
claude --strict-mcp-config --mcp-config ./mcp.json
--system-prompt

Replace the entire system prompt with custom text

Docs: --system-prompt
claude --system-prompt "You are a Python expert"
--system-prompt-file

Load system prompt from a file, replacing the default prompt

Docs: --system-prompt-file
claude --system-prompt-file ./custom-prompt.txt
--system-prompt-snapshot

Pass off to rebuild the system prompt on every request instead of reusing the prompt recorded on the conversation's first request.

on (default) or off

Docs: --system-prompt-snapshot
claude --system-prompt-snapshot off
--teleport

Resume a cloud session in your local terminal

Docs: --teleport
claude --teleport
--teammate-mode

Set how agent team teammates display. Overrides the teammateMode setting for this session.

in-process (default), auto, tmux, or iterm2

Docs: --teammate-mode
claude --teammate-mode auto
--tmux

Create a tmux session for the worktree. Requires --worktree.

--tmux=classic for traditional tmux

Docs: --tmux
claude -w feature-auth --tmux
--tools

Restrict which built-in tools Claude can use.

"" to disable all, "default", or tool names like "Bash,Edit,Read"

Docs: --tools
claude --tools "Bash,Edit,Read"
--verbose

Enable verbose logging, shows full turn-by-turn output.

Docs: --verbose
claude --verbose
--version, -v

Output the version number

Docs: --version, -v
claude -v
--worktree, -w

Start Claude in an isolated git worktree at <repo>/.claude/worktrees/<name>.

Docs: --worktree, -w
claude -w feature-auth
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]

Keyboard shortcuts8

Claude Code keyboard shortcuts
ShortcutDescription
Ctrl+C

Interrupt, or clear input. Interrupts a running operation; with nothing running, the first press clears input and a second press exits.

Context: General controls

Docs: Ctrl+C
Ctrl+X Ctrl+K

Stop all running background subagents in this session.

Context: General controls

Docs: Ctrl+X Ctrl+K
Ctrl+D

Exit Claude Code session. The first press shows a confirmation hint and a second press within 800ms exits.

Context: General controls

Docs: Ctrl+D
Ctrl+G or Ctrl+X Ctrl+E

Open in default text editor to edit your prompt or custom response.

Context: General controls

Docs: Ctrl+G or Ctrl+X Ctrl+E
Ctrl+L

Redraw the screen, keeping input and conversation history.

Context: General controls

Docs: Ctrl+L
Ctrl+O

Toggle transcript viewer. Shows detailed tool usage and execution.

Context: General controls

Docs: Ctrl+O
Ctrl+R

Reverse search command history.

Context: General controls

Docs: Ctrl+R
Ctrl+V or Cmd+V (iTerm2) or Alt+V (Windows and WSL)

Paste image from clipboard. Inserts an [Image #N] chip at the cursor.

Context: General controls

Docs: Ctrl+V or Cmd+V (iTerm2) or Alt+V (Windows and WSL)

Settings8

Claude Code settings keys
KeyDescription
model

Change the model Claude Code starts with. Scope: Any file.

Type: string, a model alias or full model ID

Docs: model
sandbox

Isolate Bash commands from your filesystem and network. Scope: Any file.

Type: object with enabled and related sandbox keys

Docs: sandbox
theme

Pick the interface color theme, built-in or custom. Scope: Any file.

Type: string; Default: "dark"

Docs: theme
agent

Start every session as a named subagent with its prompt, tools, and model. Scope: Any file.

Type: string, the name of a built-in or custom subagent

Docs: agent
env

Set environment variables for every session and its subprocesses. Scope: Any file.

Type: object mapping variable names to values

Docs: env
permissions

Set allow, ask, and deny rules and the starting permission mode. Scope: Any file.

Type: object with allow, ask, deny and related keys

Docs: permissions
hooks

Run your own commands as hooks at points in Claude Code's lifecycle. Scope: Any file.

Type: object keyed by hook event

Docs: hooks
worktree

Configure how Claude Code creates git worktrees. Scope: Any file.

Type: object with baseRef and related keys

Docs: worktree

Environment variables8

Claude Code environment variables
VariableDescription
ANTHROPIC_BASE_URL

Override the API endpoint to route requests through a proxy or gateway.

Docs: ANTHROPIC_BASE_URL
CLAUDE_CONFIG_DIR

Override the configuration directory.

Default: ~/.claude

Docs: CLAUDE_CONFIG_DIR
DISABLE_TELEMETRY

Set to any non-empty value, such as 1, to opt out of telemetry.

Docs: DISABLE_TELEMETRY
ANTHROPIC_MODEL

Name of the model setting to use (see Model Configuration)

Docs: ANTHROPIC_MODEL
API_TIMEOUT_MS

Timeout for API requests in milliseconds.

Default: 600000 (10 minutes)

Docs: API_TIMEOUT_MS
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC

Set to any non-empty value, such as 1, to disable nonessential traffic.

Docs: CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION

Set to false to turn off prompt suggestions.

Docs: CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION
CLAUDE_CODE_NO_FLICKER

Set to 1 to enable fullscreen rendering, a research preview.

Docs: CLAUDE_CODE_NO_FLICKER

Config files8

Claude Code config files
PathDescription
settings.json

Permissions, hooks, env vars, model defaults.

Scope: Project and global; committed to git

Docs: settings.json
.claude/settings.json

Shared project settings file. Affects everyone working in the folder that contains it.

Use it for: team permissions, hooks, plugins, and project environment variables

Docs: .claude/settings.json
managed-settings.json

Enterprise-enforced settings that your own settings files and --settings values can't override, apart from narrow exceptions.

Location: System-level, varies by OS

Docs: managed-settings.json
CLAUDE.md

Instructions loaded every session.

Scope: Project and global; committed to git

Docs: CLAUDE.md
settings.local.json

Your personal overrides, gitignored when Claude Code saves a setting to it.

Scope: Project only

Docs: settings.local.json
.claude/settings.local.json

Project local settings file. Affects you, in this one project only.

Use it for: personal overrides for one project

Docs: .claude/settings.local.json
~/.claude/settings.json

User settings file. Affects you, in every project on this machine.

Use it for: personal preferences such as theme, editor mode, default model

Docs: ~/.claude/settings.json
~/.claude.json

App state, OAuth, UI toggles, personal MCP servers.

Scope: Global only

Docs: ~/.claude.json

More on Claude Code

FAQ

How many commands and options does Claude Code have?

The official Claude Code docs list 285 items: 118 slash commands, 80 CLI flags, 55 subcommands, 8 keyboard shortcuts, 8 settings keys, 8 environment variables and 8 config files. The largest group is slash commands, with 118.

Where does Claude Code keep its configuration?

Claude Code documents 8 config files and locations, including settings.json, .claude/settings.json and managed-settings.json. The docs describe settings.json as: Permissions, hooks, env vars, model defaults.

Which environment variables does Claude Code read?

The docs list 8 environment variables, such as ANTHROPIC_BASE_URL, CLAUDE_CONFIG_DIR, DISABLE_TELEMETRY and ANTHROPIC_MODEL. Each one is in the environment variables table above with what it controls.

Sources

Last verified . Names and examples are copied verbatim from the 9 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.