Skip to main content
reopt Handbook
reopt Handbook
Claude Code Command MasterLabels and command selectionHow to read a detail guideComplete command listTerminal CLI Commands and Flags

Task guides

Core command basicsStarting and resuming workSkills and Custom CommandsAutomation and Web CommandsOperations and Safety CommandsCustom commands and skillsMCP connections and commands

Conversation and context

Cmd. /add-dirCmd. /backgroundCmd. /compactCmd. /contextCmd. /copyCmd. /exportCmd. /forkCmd. /importCmd. /initCmd. /memoryCmd. /recapCmd. /renameCmd. /resumeCmd. /rewindCmd. claude project purge

Planning and execution

Cmd. /autofix-prCmd. /batchCmd. /desktopCmd. /goalCmd. /loopCmd. /planCmd. /remote-envCmd. /scheduleCmd. /tasksCmd. /teleportCmd. /workflows

Review and verification

Cmd. /code-reviewCmd. /runCmd. /run-skill-generatorCmd. /security-reviewCmd. /simplifyCmd. /verify

Models and settings

Cmd. /claude-apiCmd. /configCmd. /effortCmd. /fastCmd. /modelCmd. /output-styleCmd. /update-config

Permissions and integrations

Cmd. /agentsCmd. /hooksCmd. /ideCmd. /mcpCmd. /permissionsCmd. /pluginCmd. /reload-pluginsCmd. /reload-skillsCmd. /sandboxCmd. /skillsCmd. /web-setup

Status and diagnostics

Cmd. /debugCmd. /diffCmd. /doctorCmd. /fewer-permission-promptsCmd. /release-notesCmd. /team-onboarding

Display and input

Cmd. /colorCmd. /focusCmd. /keybindingsCmd. /powerupCmd. /statuslineCmd. /terminal-setupCmd. /themeCmd. /tui

Account and usage

Cmd. /upgradeCmd. /usageCmd. /usage-credits

Legacy

Cmd. /costCmd. /pr-commentsCmd. /reviewCmd. /statsCmd. /ultrareviewCmd. /vimCmd. /approved-toolsCmd. /commandsCmd. /extra-usageCmd. /settingsCmd. /tagCmd. /todos

Verification and history

Current verification scopeHandbook updatesRelease coverage historyEarlier verification recordsCommand change history
Handbook›Claude Code Command Master›Terminal CLI Commands and Flags
한국어English

Terminal CLI Commands and Flags

All 34 invocation forms and 79 common flags from the official Claude Code CLI reference, plus recent subcommand options

Key takeaways

  • Includes 34 invocation forms and 79 common flags.
  • Check plugin/runner additions and constraints through v2.1.278.

Checked against the official CLI reference on September 22, 2026. The 34 rows are invocation forms, not distinct top-level commands. The 79 common flags include removed/deprecated entries. Use each command’s --help and the linked official reference for specialized options.

All slash commands · Official CLI reference

34 invocation forms

CommandUse
claudeStart a conversation
claude "query"Start with an initial request
claude -p "query"Print a result and exit
cat file | claude -p "query"Process piped input
claude -cContinue the latest local conversation
claude -c -p "query"Continue in print mode
claude -r "<session>" "query"Resume by session ID or name
claude updateUpdate the installation
claude gatewayRun the administrator gateway with --config
claude install [version]Install a native version or channel
claude auth loginSign in; supports --email, --sso, and --console
claude auth logoutSign out
claude auth statusInspect authentication; --text for readable output
claude agentsMonitor and dispatch background sessions
claude attach <id>Attach to a background session
claude auto-mode defaultsInspect default classifier rules; filter with --label
claude auto-mode resetReset user autoMode settings; retain managed rules
claude daemon statusInspect the background supervisor
claude daemon stop --anyStop the supervisor; --keep-workers preserves workers
claude doctorRead-only installation and configuration diagnostics
claude import [source]Import another agent's configuration
claude logs <id>Read recent background output
claude mcpConfigure MCP servers
claude mcp login <name>Authenticate MCP OAuth; supports --no-browser
claude mcp logout <name>Clear MCP OAuth credentials
claude pluginManage plugins; alias: plugins
claude project purge [path]Purge project records; preview with --dry-run
claude remote-controlRun a Remote Control server without a local TUI
claude respawn <id>Restart a background session with its conversation
claude rm <id>Remove background entries/worktrees; retain transcripts
claude self-hosted-runnerRun cloud sessions on your infrastructure
claude setup-tokenGenerate an OAuth token for CI
claude stop <id>Stop a background session; alias: kill
claude ultrareview [target]Run a cloud review; supports --json and --timeout

79 common flags

FlagUse and constraints
--add-dirAdditional directory access
--advisor <model>Advisor model
--agentSession agent
--agentsSubagent definitions as JSON
--allow-dangerously-skip-permissionsMake bypassPermissions selectable
--allowedTools, --allowed-toolsTool permission allow rules
--append-subagent-system-promptAppend text to subagent prompts
--append-subagent-system-prompt-fileAppend a file to subagent prompts; print mode
--append-system-promptAppend system-prompt text
--append-system-prompt-fileAppend a system-prompt file
--autocompact <auto|tokens>Session auto-compaction window
--ax-screen-readerScreen-reader rendering
--bareMinimal discovery mode
--betasAPI beta headers
--bg, --backgroundBackground execution
--channelsChannel notifications; preview
--chromeEnable Chrome integration
--cloudCreate or message a cloud session
--continue, -cContinue a local session
--dangerously-load-development-channelsDevelopment channel opt-in
--dangerously-skip-permissionsBypass permission prompts
--debugDebug output; filters use = syntax
--debug-file <path>Debug log file
--disable-slash-commandsDisable skills and commands
--disallowedTools, --disallowed-toolsTool permission deny rules
--effortReasoning effort
--enable-auto-modeRemoved in v2.1.111; use --permission-mode auto
--environment <environment-id>Self-hosted cloud environment ID
--exclude-dynamic-system-prompt-sectionsMove machine-specific prompt sections; print mode
--execShell job with --bg
--fallback-modelOrdered fallback models
--fork-sessionFork on resume
--forward-subagent-textInclude subagent text/thinking in the stream
--from-prFilter sessions by PR/MR
--ideAutomatic IDE connection
--initSetup init hook; print mode
--init-onlyRun initialization hooks and exit
--include-hook-eventsEmit hook lifecycle events
--include-partial-messagesPartial events; requires print and stream-json
--input-formatInput text/stream-json; print mode
--json-schemaResult JSON Schema; print mode
--maintenanceSetup maintenance hook; print mode
--max-budget-usdAPI spend cap including subagents; print mode
--max-turnsAgent-turn cap; print mode
--mcp-configMCP JSON configuration
--modelSession model
--name, -nSession display name
--no-chromeDisable Chrome integration
--no-session-persistenceDisable session persistence; print mode
--output-formatOutput text/json/stream-json; print mode
--permission-modeInitial permission mode
--permission-prompt-toolMCP permission responder for headless runs
--permission-promptsPrint-mode permission responder: host/none
--plugin-dirLocal plugin path, zip, or parent folder
--plugin-urlSession plugin archive URL
--print, -pNon-interactive result output
--prompt-suggestionsPrompt suggestion events; print/stream-json/verbose
--ref <branch>Checkout ref with --environment
--remoteDeprecated alias of --cloud
--remote-control, --rcRemote Control for an interactive session
--remote-control-session-name-prefix <prefix>Generated remote-session name prefix
--replay-user-messagesReplay stream-json user messages
--restrictedRestricted evaluation profile
--resume, -rResume by ID, name, or transcript
--safe-modeTroubleshoot with customizations disabled
--session-idExplicit session UUID
--setting-sourcesSelect user/project/local setting sources
--settingsJSON file or inline setting overrides
--strict-mcp-configExplicit MCP config only; respect managed policy
--system-promptReplace the system prompt
--system-prompt-fileReplace the system prompt from a file
--system-prompt-snapshotUse off to rebuild prompts on each request
--teleportResume a cloud session locally
--teammate-modeTeammate display mode
--tmuxWorktree tmux session; requires --worktree
--toolsLimit available built-in tools
--verboseVerbose execution output
--version, -vInstalled version
--worktree, -wIsolated Git worktree

Subcommands and recent options

CommandOptions and distinctions
claude auto-mode configEffective classifier configuration
claude plugin install / claude plugin update--json, --accept-command <sha256> (v2.1.271+)
/plugin install <plugin> --marketplace <source>Offer marketplace registration (v2.1.275+)
claude plugin evalJSON/HTML evaluation reports
claude self-hosted-runner setupOperator setup walkthrough
claude self-hosted-runner doctorDeployed runner diagnostics
claude self-hosted-runner orchestratorOn-demand runner orchestration
claude self-hosted-runner --drain-marker-file <path>Report host drain on SIGTERM when the file exists; telemetry only (v2.1.271+)

--accept-command takes the SHA-256 shown by the preceding --json run. Review that command before accepting its exact hash; it is not a blanket -y approval.

Command-specific operating options

CommandAdditional options and scope
claude agentsFilter with --cwd <path>; --json --all includes completed sessions. Dispatch defaults: --permission-mode, --model, --effort, --agent.
claude auto-mode reset-y / --yes skips confirmation of the user-settings reset; managed rules remain.
claude respawn <id>--all restarts every running background session.
claude rm <id>After inspecting the refusal, use its exact --discard-unpushed <commit>@<worktree-id> or --force-remove-worktree <worktree-id> value. The former also discards unpushed commits.
claude project purge [path]--dry-run, -i / --interactive, -y / --yes, --all; preview first.
claude ultrareview [target]--json, --timeout <minutes> (default 45), --post / --no-post (default). --post publishes a comment on a github.com PR using your account.

Examples

claude --version
claude auth status --text
claude doctor
claude import cursor --dry-run
claude auto-mode config
claude -p "Explain this repository" --max-turns 3 --output-format json

The -p example invokes a model. /doctor is an in-session skill that can apply fixes; claude doctor is read-only. --allowedTools controls approval rules; --tools limits availability. --bare and --safe-mode have different discovery and troubleshooting purposes.

Sources

  • CLI reference
  • Changelog
  • Plugin CLI reference

Stream and budget details

With --forward-subagent-text, parent_tool_use_id identifies the originating Agent or Skill call. Forwarding agents spawned by forked skills, and nested forked skills, requires v2.1.275 or later.

--max-budget-usd includes subagent spend, but excludes prior-run totals restored through --continue or --resume from the current run's cap.

Related docs

Headless and CI/CD

Claude Code Complete Guide · Run Claude Code in non-interactive workflows with clear inputs, outputs, and guardrails.

Operations and Safety Commands

Commands for permission control, MCP, plugins, cleanup, sandboxing, and troubleshooting.

Automation and Web Commands

Commands for Claude Code on the web, PR automation, routines, Agent View background sessions, Desktop, and remote control.

Subagents

Claude Code Complete Guide · Delegate bounded work while keeping the main Claude Code session accountable.

Hooks

Claude Code Complete Guide · Use Claude Code hooks for predictable automation and repository guardrails.

Complete command list

Syntax, type, availability, and guide links for all 114 entries in the official Claude Code slash table.

Core command basics

Read help and session status, start a fresh conversation, and exit or detach from Claude Code.

On this page

34 invocation forms79 common flagsSubcommands and recent optionsCommand-specific operating optionsExamplesSourcesStream and budget details