Claude Code CLI flags

All 31 flags from the official CLI reference, checked 2026-10-24, each with an example.

FlagWhat it does
-p, --printPrint a response without interactive mode, then exit.claude -p "explain this function"
-c, --continueLoad the most recent conversation in the current directory.claude -c
-r, --resumeResume a session by ID or name, or open the picker.claude -r "auth-refactor"
--modelSet the model for the session by alias or full name.claude --model opus
--add-dirAdd more working directories Claude can read and edit.claude --add-dir ../lib
--allowedToolsTools that run without asking for permission.claude --allowedTools "Bash(git log *)"
--disallowedToolsDeny rules that remove or block tools.claude --disallowedTools "Edit"
--permission-modeStart in a permission mode such as plan or acceptEdits.claude --permission-mode plan
--dangerously-skip-permissionsSkip permission prompts (same as bypassPermissions mode).claude --dangerously-skip-permissions
--output-formatPrint mode output: text, json or stream-json.claude -p "query" --output-format json
--input-formatPrint mode input: text or stream-json.claude -p --input-format stream-json
--max-turnsLimit agentic turns in print mode.claude -p --max-turns 3 "query"
--max-budget-usdStop a print mode run once estimated spend reaches this amount.claude -p --max-budget-usd 5 "query"
--append-system-promptAppend text to the default system prompt.claude --append-system-prompt "Always use TypeScript"
--system-promptReplace the entire system prompt.claude --system-prompt "You are a Python expert"
--mcp-configLoad MCP servers from JSON files or strings.claude --mcp-config ./mcp.json
--strict-mcp-configOnly use MCP servers from --mcp-config.claude --strict-mcp-config --mcp-config ./mcp.json
--settingsLoad a settings file or inline JSON for this session.claude --settings ./settings.json
--session-idUse a specific session UUID.claude --session-id "550e8400-e29b-41d4-a716-446655440000"
--fork-sessionWhen resuming, create a new session ID instead of reusing the original.claude --resume abc123 --fork-session
--effortSet the effort level for the session.claude --effort high
--worktree, -wStart in an isolated git worktree.claude -w feature-auth
--name, -nSet a display name for the session.claude -n auth-refactor
--fallback-modelFall back to other models when the primary is overloaded.claude -p --fallback-model sonnet "query"
--debugEnable debug mode, optionally filtered by category.claude --debug='mcp,startup'
--verboseShow full turn-by-turn output.claude --verbose
--bareMinimal mode: skip auto-discovery of hooks, skills, plugins, MCP and CLAUDE.md.claude -p --bare "query"
--toolsRestrict which built-in tools Claude can use.claude --tools "Bash,Edit,Read"
--ideConnect to your IDE on startup.claude --ide
--chromeEnable Chrome browser integration.claude --chrome
-v, --versionPrint 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.