Where the truth is
The command list changes with the version
Slash commands, flags and permission modes are added, renamed and removed between releases. The correct source is the help output of the session you are actually running: /help inside a session, claude --help in a shell. This page was checked against 2.1.310 on 25 October 2026. Check the version with claude --version and treat any difference as a reason to read the help output first.
Official documentation: CLI reference and commands.
Tier 1: enter, exit, orient
| Command | Purpose | Note |
|---|---|---|
claude | Start an interactive session in the current directory. | |
claude "query" | Start an interactive session with an initial prompt. | |
claude -c | Continue the most recent conversation in the current directory. | Long form --continue. |
claude -r | Resume a conversation by session ID or name, or open a picker. | Long form --resume. |
claude --version | Print the version. | Short form -v. |
claude --help | List flags and subcommands for this version. | The authoritative flag list. |
claude doctor | Check the health of the installation (read-only diagnostics). | /doctor inside a session runs the longer checkup. |
claude update | Check for updates and install if available. | Package-manager installs update through the package manager. |
claude auth status | Show the authentication state. | Also claude auth login and claude auth logout. |
/help | Show help and the available commands. | Authoritative list for the running version. |
/status | Show version, model, account, connectivity and which setting sources are loaded. | |
Ctrl+D | Exit the session. | Press twice; Ctrl+C on an idle prompt also exits on the second press. |
Tier 2: daily work
| Command | Purpose | Note |
|---|---|---|
/clear | Start a new conversation with an empty context. | Aliases /reset, /new. |
/compact | Summarise the conversation to free context. | Accepts optional focus instructions. |
/resume | Open a picker of past sessions. | |
/rewind | Restore code and conversation to an earlier point. | Aliases /checkpoint, /undo. Pressing Esc twice on an empty prompt opens the rewind menu. |
/diff | Open a diff viewer for changes. | See /help for what it covers in your version. |
/plan | Enter plan mode, optionally with a description of the task. | Edits stay blocked until a plan is approved. |
/export | Export the conversation. | |
/tasks | List running shells and subagents. | Alias /bashes. |
/usage | Show session cost and activity. | /cost is an alias. |
!<command> | At the start of the prompt: run a shell command and add its output to the session. | |
@<path> | Mention a file by path; autocompletes. | See shortcuts and habits. |
Tier 3: context and configuration
| Command | Purpose | Note |
|---|---|---|
/init | Create a CLAUDE.md guide for the project. | A starting point to edit by hand. See configuration. |
/memory | Edit CLAUDE.md files, toggle auto memory, view auto-memory entries. | |
/config | Open settings. | Alias /settings. |
/permissions | Manage allow, ask and deny rules. | Alias /allowed-tools. |
/model | Switch model. | Saves as the default for new sessions unless the picker says this session only. |
/mcp | MCP server status and reconnect. | |
/hooks | View hook configuration. | |
/agents | Manage subagents. | |
--model <alias-or-name> | Choose the model for this session. | An alias follows the latest model; a full name pins one. See the CI checklist. |
--permission-mode <mode> | Start in a permission mode. | Values in 2.1.310: acceptEdits, auto, bypassPermissions, manual, dontAsk, plan. |
--add-dir <dir> | Allow tool access to an additional directory. | |
--settings <file-or-json> | Load extra settings from a file or an inline JSON string. | |
--setting-sources <list> | Choose which of user, project and local settings are loaded. | |
--worktree [name] | Create a git worktree for the session and start in it. | Short form -w. See tool behaviour. |
Tier 4: non-interactive (CI)
With -p the tool prints the response and exits. The workspace trust dialog is skipped in this mode, so use it only in directories you trust.
| Command | Purpose | Note |
|---|---|---|
-p, --print | Print the response and exit. | Exit code is non-zero on failure. |
--output-format <f> | text (default), json (one result) or stream-json (events as they happen). | The json result includes result, session_id and total_cost_usd. |
--input-format <f> | text (default) or stream-json. | |
--json-schema <schema> | Validate structured output against a JSON Schema. | With -p only. |
--allowedTools <tools> | Tools that may run without a prompt, for example "Bash(git diff *),Read". | Alias --allowed-tools. |
--disallowedTools <tools> | Tools that are denied. | Alias --disallowed-tools. |
--permission-mode dontAsk | Deny anything that would otherwise prompt. | Suited to unattended runs; see permission modes. |
--permission-prompts none | Nobody answers prompts; anything that would prompt is denied. | With -p only. |
--max-budget-usd <n> | Stop at a maximum spend on API calls. | With -p only. |
--no-session-persistence | Do not save the session to disk. | With -p only. The session cannot be resumed, and no transcript is kept. |
--bare | Minimal mode: skip hooks, plugin sync, auto-memory and CLAUDE.md auto-discovery. | Authenticates only with ANTHROPIC_API_KEY or an apiKeyHelper. Supply context explicitly. |
--append-system-prompt <text> | Append text to the default system prompt. | |
--verbose, --debug | More output; --debug-file <path> writes debug logs to a file. |
Not listed here on purpose
Flags that appear in the documentation but not in claude --help for this version are left out, as are flags whose exact spelling could not be confirmed. If a script depends on one, read the help output of the version it will run on.
Shape of a CI call
An illustration of how the flags combine, not a recommended configuration. It reads a diff, may not run anything else, and cannot prompt. jq is assumed to be installed.
claude -p "List obvious defects in the staged diff, one per line." \
--allowedTools "Bash(git diff *),Read" \
--permission-mode dontAsk \
--output-format json \
| jq -r '.result'Pinning the model, limiting loops and keeping the transcript are covered in the CI checklist.
Unofficial notes, not affiliated with or endorsed by Anthropic. Command names, flags and behaviour change between versions; the official documentation and the tool's own help output are authoritative.