claude command starts an interactive session by default. Pass a prompt as an argument to send a single message, or use -p / --print for non-interactive pipeline usage.
Global flags
Print the response to stdout and exit immediately. Skips the workspace trust
dialog. Only use this flag in directories you trust.
Model to use for the current session. Accepts a short alias (e.g.
sonnet,
opus) or a full model ID (e.g. claude-sonnet-4-6).Enable debug mode. Optionally pass a comma-separated category filter (e.g.
"api,hooks" or "!1p,!file" to exclude categories).Override the verbose mode setting from config.
Permission mode for the session. Choices:
default, acceptEdits,
bypassPermissions, dontAsk, plan.Bypass all permission checks. Recommended only for sandboxes with no internet
access.
Path to a settings JSON file, or a JSON string, to load additional settings
from.
Resume a conversation. Provide a session ID to resume directly, or omit the
value to open an interactive picker. Optionally pass a search term to
pre-filter the picker.
Continue the most recent conversation in the current directory.
Maximum number of agentic turns in non-interactive mode. Causes an early exit
after the specified number of turns. Only works with
--print.Output format. Only works with
--print. Choices:text(default) — plain textjson— single JSON resultstream-json— realtime streaming JSON
Input format. Only works with
--print. Choices:text(default) — plain textstream-json— realtime streaming JSON input
Additional directories to allow tool access to.
Comma- or space-separated list of tool names to allow (e.g.
"Bash(git:*) Edit").Comma- or space-separated list of tool names to deny (e.g.
"Bash(git:*) Edit").Load MCP servers from JSON files or inline JSON strings (space-separated).
Set a display name for this session (shown in
/resume and the terminal
title).Load plugins from a directory for this session only. Repeatable:
--plugin-dir A --plugin-dir B.System prompt to use for the session.
Append text to the default system prompt.
Disable session persistence — sessions will not be saved to disk and cannot
be resumed. Only works with
--print.Enable automatic fallback to the specified model when the default model is
overloaded. Only works with
--print.Effort level for the session. Choices:
low, medium, high, max.Minimal mode: skips hooks, LSP, plugin sync, attribution, auto-memory,
background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets
CLAUDE_CODE_SIMPLE=1. Auth is strictly ANTHROPIC_API_KEY or
apiKeyHelper via --settings.Usage examples
Subcommands
Subcommands for
auth, doctor, and others follow the same help flag
convention: use -h or --help to see their options.