claude [prompt] to start an interactive session, or combine flags to control behavior. Use -p / --print for non-interactive (pipe-friendly) output.
--print (-p) is also passed. Using them in interactive mode has no effect.General
-h, --help
-h, --help
-p, --print
-p, --print
--verbose
--verbose
-d, --debug [filter]
-d, --debug [filter]
--debug-file <path>
--debug-file <path>
--bare
--bare
CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1.In --bare mode:- Anthropic auth is strictly
ANTHROPIC_API_KEYorapiKeyHelpervia--settings. OAuth and keychain are never read. - Third-party providers (Bedrock, Vertex, Foundry) use their own credentials as normal.
- Skills still resolve via
/skill-name.
--system-prompt, --append-system-prompt, --add-dir, --mcp-config, --settings, --agents, --plugin-dir.Session control
-c, --continue
-c, --continue
-r, --resume [value]
-r, --resume [value]
--fork-session
--fork-session
--resume or --continue, creates a new forked session from that point instead of continuing the original. Combine with --session-id to specify the ID of the new fork.--from-pr [value]
--from-pr [value]
--session-id <uuid>
--session-id <uuid>
--resume or --continue, requires --fork-session to be present.-n, --name <name>
-n, --name <name>
/resume and in the terminal title bar.--no-session-persistence
--no-session-persistence
Model and compute
--model <model>
--model <model>
sonnet, opus) or a full model name (claude-sonnet-4-6).--effort <level>
--effort <level>
low, medium, high, maxSet the reasoning effort level for the session.--agent <agent>
--agent <agent>
agent setting for this session. Selects which agent definition to use.--agents <json>
--agents <json>
description and prompt.--fallback-model <model>
--fallback-model <model>
--betas <betas...>
--betas <betas...>
Output format
--output-format <format>
--output-format <format>
text, json, stream-json (print-only)Control the output format when running in --print mode.| Value | Description |
|---|---|
text | Plain text (default) |
json | Single JSON object with the complete result |
stream-json | Newline-delimited JSON events streamed in real time |
--input-format <format>
--input-format <format>
text, stream-json (print-only)Control how stdin is interpreted when running in --print mode.| Value | Description |
|---|---|
text | Plain text (default) |
stream-json | Newline-delimited JSON event stream |
--include-hook-events
--include-hook-events
--output-format=stream-json)Include all hook lifecycle events in the output stream. Without this flag only SessionStart and Setup events are emitted.--json-schema <schema>
--json-schema <schema>
--max-turns <n>
--max-turns <n>
--max-budget-usd <amount>
--max-budget-usd <amount>
--replay-user-messages
--replay-user-messages
--input-format=stream-json and --output-format=stream-json)Re-emit user messages from stdin back on stdout for acknowledgment.Tools and permissions
--allowed-tools <tools...>
--allowed-tools <tools...>
--allowedToolsType: string listComma or space-separated list of tool names to allow. Supports glob-style patterns.--disallowed-tools <tools...>
--disallowed-tools <tools...>
--disallowedToolsType: string listComma or space-separated list of tool names to deny.--tools <tools...>
--tools <tools...>
"" to disable all tools, "default" for all tools, or list tool names explicitly.--permission-mode <mode>
--permission-mode <mode>
--dangerously-skip-permissions
--dangerously-skip-permissions
MCP configuration
--mcp-config <configs...>
--mcp-config <configs...>
--strict-mcp-config
--strict-mcp-config
--mcp-config. Ignores all project-level and user-level MCP configurations.System prompt
--system-prompt <prompt>
--system-prompt <prompt>
--append-system-prompt <prompt>
--append-system-prompt <prompt>
File and directory access
--add-dir <directories...>
--add-dir <directories...>
--file <specs...>
--file <specs...>
file_id:relative_path.Settings
--settings <file-or-json>
--settings <file-or-json>
--setting-sources <sources>
--setting-sources <sources>
user, project, local.Plugins
--plugin-dir <path>
--plugin-dir <path>
--disable-slash-commands
--disable-slash-commands
skills/ directories and plugins).IDE integration
--ide
--ide
Chrome integration
--chrome
--chrome
--no-chrome
--no-chrome