Skip to content

Command-line reference

This page is the table-first companion to Commands and flags. It centralizes the source-visible root flags, command families, aliases, and mode-specific CLI surfaces so narrative pages can link here instead of repeating long option lists.

Scope and caveats

  • This is a source-anchored reference for the analyzed cli.js bundle, not a replacement for live claude --help output.
  • Hidden and feature-gated options are included when existing docs have direct anchors.
  • The bundle is minified, so approximate line numbers and byte offsets are search handles rather than stable public API names.

Source anchors

Semantic aliasSource fileApproximate locationAnchorMeaning
CommanderRootcli.jsline ~19525, byte 0xdbf0e0async function w4ACommander root construction and mode routing.
ClaudeRootCommandcli.jsline ~19525, byte 0xdbf678H.name("claude")Root command name and description.
PrintModeFlagcli.jsline ~19525, byte 0xdbf921-p, --printSelects non-interactive print/headless mode.
ToolAllowListFlagcli.jsline ~19525, byte 0xdc09bd--allowedTools, --allowed-tools <tools...>Tool allow-list flag.
PermissionModeFlagcli.jsline ~19525, byte 0xdc10d9--permission-mode <mode>Session permission mode selector.
ContinueSessionFlagcli.jsline ~19525, byte 0xdc114e-c, --continueContinue the most recent conversation in the current directory.
ResumeSessionFlagcli.jsline ~19525, byte 0xdc11af-r, --resume [value]Resume by session ID or open picker/search.
RemoteSessionFlagcli.jsline ~19550, byte 0xdcb633--remote [description|session_id|url]Remote session creation/attach flag.
RemoteControlFlagcli.jsline ~19550, byte 0xdcb6f2--remote-control [name]Remote Control flag.
DoctorCommandcli.jsline ~19550, byte 0xdcd0b4H.command("doctor")Auto-updater health check command.
UpdateCommandFamilycli.jsline ~19550, byte 0xdcd261H.command("update").alias("upgrade")Update/upgrade command family.

Root invocation modes

ModeRepresentative surfaceBehavior
Interactive TUIdefault TTY invocationStarts the interactive session loop after trust/auth/settings/context setup.
Headless/print-p, --printRuns the scriptable path with stdout result/stream framing.
SDK-style headless--sdk-url, stream/control framesExposes structured frames and control requests for external hosts.
Resume/continue--continue, --resume, --session-idRestores a local JSONL session into the live envelope.
Remote/teleport/control--remote, --teleport, --remote-control, --rcAdds bridge/session-ingress control around the same session model.

Root flag families

FamilyFlagsPrimary owner
Diagnostics-d, --debug [filter], --debug-file, --debug-to-stderr, --mcp-debug, --verboseDiagnostics and debug logs
Headless/SDK output-p, --print, --output-format, --input-format, --json-schema, --sdk-url, --include-partial-messages, --session-mirrorHeadless streaming and resilience
Thinking and budget--thinking, --thinking-display, --max-thinking-tokens, --max-turns, --max-budget-usd, --task-budgetModel selection, calls, usage, quota, and billing
Tools and permissions--tools, --allowedTools, --allowed-tools, --disallowedTools, --disallowed-tools, --permission-mode, --permission-prompt-tool, --dangerously-skip-permissionsTool inventory and schemas
Prompt and context--system-prompt, --system-prompt-file, --append-system-prompt, --append-system-prompt-file, --add-dir, --exclude-dynamic-system-prompt-sections, --plan-mode-instructionsPrompt assembly scenarios
Sessions-c, --continue, -r, --resume, --fork-session, --no-session-persistence, --resume-session-at, --rewind-files, --session-id, --nameSession resume and transcripts
Models and auth--model, --fallback-model, --betasModels, providers, and auth
Settings and integrations--settings, --managed-settings, --setting-sources, --mcp-config, --strict-mcp-config, --plugin-dir, --plugin-url, --agents, --ide, --chrome, --fileSettings schema reference
Remote and deep links--remote, --teleport, --remote-control, --rc, --remote-control-session-name-prefix, --prefill, --deep-link-originRemote control and teleport

Command families

CommandAnchorRuntime role
authH.command("auth")Login, logout, and status flows for account credentials.
mcpMcpCommandRegistrarManages MCP servers and can start the Claude Code MCP server.
mcp servecommand("serve"), line ~9173, byte 0xbf3ccbStarts the Claude Code MCP server.
mcp add-from-claude-desktopline ~9173, byte 0xbf44e2Imports MCP servers from Claude Desktop config.
plugin / pluginsPluginCommandRegistrarManages plugins, marketplaces, local/session plugins, and plugin capabilities.
project purge [path]H.command("project")Deletes project-scoped Claude Code state.
setup-tokenH.command("setup-token")Sets up a long-lived authentication token flow.
agentsH.command("agents")Opens/manages background agents and dispatched sessions.
ultrareview [target]H.command("ultrareview [target]")Runs cloud-hosted multi-agent code review.
auto-modeH.command("auto-mode")Inspects or critiques auto-mode classifier configuration.
remote-control / rcH.command("remote-control", {hidden: true}).alias("rc")Starts local-session Remote Control.
doctorH.command("doctor")Checks auto-updater and related health state.
update / upgradeH.command("update").alias("upgrade")Checks for and installs updates.
install [target]H.command("install [target]")Installs a stable/latest/specific native build.

Aliases and spelling variants

Alias or variantCanonical surface
upgradeupdate
rcremote-control
--rc [name]--remote-control [name]
--allowed-tools--allowedTools
--disallowed-tools--disallowedTools

Parse-time optimization

CommanderRoot has a fast path for -p/--print: when print mode is selected and no cc:// or cc+unix:// URI argument is present, the root options can be parsed before the heavier subcommand tree is registered. This keeps common headless runs lighter.

Created and maintained by Yingting Huang.