Claude Code CLI flags
All 31 flags from the official CLI reference, checked 2026-10-24, each with an example.
| Flag | What it does |
|---|---|
| -p, --print | Print a response without interactive mode, then exit.claude -p "explain this function" |
| -c, --continue | Load the most recent conversation in the current directory.claude -c |
| -r, --resume | Resume a session by ID or name, or open the picker.claude -r "auth-refactor" |
| --model | Set the model for the session by alias or full name.claude --model opus |
| --add-dir | Add more working directories Claude can read and edit.claude --add-dir ../lib |
| --allowedTools | Tools that run without asking for permission.claude --allowedTools "Bash(git log *)" |
| --disallowedTools | Deny rules that remove or block tools.claude --disallowedTools "Edit" |
| --permission-mode | Start in a permission mode such as plan or acceptEdits.claude --permission-mode plan |
| --dangerously-skip-permissions | Skip permission prompts (same as bypassPermissions mode).claude --dangerously-skip-permissions |
| --output-format | Print mode output: text, json or stream-json.claude -p "query" --output-format json |
| --input-format | Print mode input: text or stream-json.claude -p --input-format stream-json |
| --max-turns | Limit agentic turns in print mode.claude -p --max-turns 3 "query" |
| --max-budget-usd | Stop a print mode run once estimated spend reaches this amount.claude -p --max-budget-usd 5 "query" |
| --append-system-prompt | Append text to the default system prompt.claude --append-system-prompt "Always use TypeScript" |
| --system-prompt | Replace the entire system prompt.claude --system-prompt "You are a Python expert" |
| --mcp-config | Load MCP servers from JSON files or strings.claude --mcp-config ./mcp.json |
| --strict-mcp-config | Only use MCP servers from --mcp-config.claude --strict-mcp-config --mcp-config ./mcp.json |
| --settings | Load a settings file or inline JSON for this session.claude --settings ./settings.json |
| --session-id | Use a specific session UUID.claude --session-id "550e8400-e29b-41d4-a716-446655440000" |
| --fork-session | When resuming, create a new session ID instead of reusing the original.claude --resume abc123 --fork-session |
| --effort | Set the effort level for the session.claude --effort high |
| --worktree, -w | Start in an isolated git worktree.claude -w feature-auth |
| --name, -n | Set a display name for the session.claude -n auth-refactor |
| --fallback-model | Fall back to other models when the primary is overloaded.claude -p --fallback-model sonnet "query" |
| --debug | Enable debug mode, optionally filtered by category.claude --debug='mcp,startup' |
| --verbose | Show full turn-by-turn output.claude --verbose |
| --bare | Minimal mode: skip auto-discovery of hooks, skills, plugins, MCP and CLAUDE.md.claude -p --bare "query" |
| --tools | Restrict which built-in tools Claude can use.claude --tools "Bash,Edit,Read" |
| --ide | Connect to your IDE on startup.claude --ide |
| --chrome | Enable Chrome browser integration.claude --chrome |
| -v, --version | Print the version number.claude -v |
Source: https://code.claude.com/docs/en/cli-reference
Drill the CLI flags deck in /cards
Flip cards for every flag, next to all 112 slash commands.