claude -p ""
Ctrl C / D | Cancel input / Exit session |
Ctrl L | Clear screen + full redraw |
Ctrl O | Toggle verbose output |
Ctrl R | Reverse search history |
Ctrl G | Open prompt in external editor |
Ctrl B | Background running task |
Ctrl T | Toggle task list |
Ctrl V | Paste image from clipboard |
Ctrl X K | Kill background agents (chord, x2) |
Esc Esc | Rewind / undo state |
Tab | Cycle permission modes |
\ P | Switch model |
\ T | Toggle thinking on/off |
\ Enter | Newline (quick) |
Ctrl J | Newline (control seq) |
P / R | Preview / Rename session |
/ | Search sessions |
A / B | Filter All projects / Current branch |
/clear | Clear conversation context |
/compact [focus] | Compact context to free space |
/resume | Display session picker menu |
/rename [name] | Name current session |
/branch [name] | Branch convo (formerly /fork) |
/cost | Token usage & per-model cost breakdown |
/context | Visualize context window (grid) |
/diff | Interactive diff viewer |
/copy | Copy last response |
/export | Export conversation |
/config | Open settings interface |
/model [model] | Switch model manually |
/effort [level] | Set effort (low/med/high/auto) |
/fast [on/off] | Toggle Fast mode |
/permissions | View/update tool permissions |
/color [color] | Set prompt-bar color |
/keybindings | Customize keyboard shortcuts |
/terminal-setup | Configure terminal integration |
/theme | Change color theme |
/release-notes | Interactive version picker for release notes |
/init | Create CLAUDE.md memory |
/memory | Edit CLAUDE.md files directly |
/mcp | Manage MCP servers |
/hooks | Manage event lifecycle hooks |
/skills | List available active skills |
/agents | Manage sub-agents |
/chrome | Chrome browser integration |
/add-dir <path> | Add working directory to context |
/reload-plugins | Hot-reload local plugins |
/btw <query> | Side question (does not alter context) |
/plan [desc] | Switch to Plan Mode directly |
/loop [interval] | Schedule recurring background task |
/schedule | Cloud scheduled tasks |
/voice | Push-to-talk voice prompting |
/doctor | Diagnose installation/env issues |
/pr-comments [PR] | Fetch GitHub PR comments |
/security-review | Security analysis of uncommitted code |
/powerup | Interactive lessons teaching CC features with animated demos |
/stats / /insights | Usage streaks / HTML sessions report |
/desktop | Continue session in Desktop app |
/remote-control | Bridge session to claude.ai/code |
claude | Start interactive REPL |
claude -p "q" | Headless execution (scripting) |
claude -c / -r "n" | Continue last / Resume specific |
claude --from-pr | Resume session linked to a PR |
claude --fork-session | Fork existing session on resume |
--bare | Minimal headless (no hooks/LSP) |
--channels | Permission relay / MCP push msg |
--output-format json | Structured JSON output |
--json-schema | Strict JSON schema validation |
--dangerously-skip-permissions | Skip all approval prompts |
-w / --worktree | Start in isolated git worktree |
--effort | Set effort level (low/med/high) |
--model | Override specific model at launch |
--fallback-model | Fallback if primary is overloaded |
--permission-mode plan | Start in read-only plan mode |
--max-budget-usd | Set cost cap for session |
--remote | Start web-accessible session |
--remote-control-session-name-prefix | Custom hostname prefix for Remote Control session names |
~/.claude/settings.json | User global defaults |
.claude/settings.json | Project shared (committed) |
.claude/settings.local.json | Project local only (gitignored) |
~/.claude.json | OAuth, MCP, state configuration |
.mcp.json | Project-specific MCP servers |
managed-settings.d/ | Drop-in policy fragments (alphabetical merge) |
modelOverrides | Map model picker to custom IDs |
autoMemoryDirectory | Custom auto-loaded memory dir |
worktree.sparsePaths | Sparse checkout dirs for agents |
showThinkingSummaries | Show thinking summaries in interactive sessions (default: false) |
disableSkillShellExecution | Disable inline shell execution in skills and custom slash commands |
forceRemoteSettingsRefresh | Block startup until remote managed settings are freshly fetched; fail-closed on fetch failure |
ANTHROPIC_API_KEY | Auth override |
ANTHROPIC_MODEL | Default model override |
CLAUDE_CODE_EFFORT_LEVEL | Default effort (low/med/high) |
MAX_THINKING_TOKENS | Cap extended thinking limits |
CLAUDE_CODE_PLUGIN_SEED_DIR | Multiple plugin seed directories |
IS_DEMO | Demo mode (hides email/org) |
CLAUDECODE | Detects if running inside CC shell |
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB | Strip credentials from subprocesses |
CLAUDE_CODE_MCP_SERVER_NAME / CLAUDE_CODE_MCP_SERVER_URL | Inject server identity into MCP headerHelper scripts |
CLAUDE_CODE_NO_FLICKER=1 | Opt into flicker-free alt-screen rendering with virtualized scrollback |
MCP_CONNECTION_NONBLOCKING=true | Skip MCP connection wait in headless (-p) mode |
CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE | Keep marketplace cache when git pull fails (offline envs) |
/simplify | Code review (3 parallel agents) |
/batch | Large parallel changes (5-30 worktrees) |
/claude-api | Load API + SDK reference into context |
.claude/skills/<name>/ | Project specific skill directory |
~/.claude/skills/<name>/ | Global personal skill directory |
plugin: bin/ | Plugin executables in bin/ invocable as bare commands from Bash tool |
description | Auto-invocation trigger string |
effort | Override effort level specifically for skill |
allowed-tools | Skip permission prompts for skill |
context: fork | Run skill logic in an isolated subagent |
$ARGUMENTS | User input placeholder replacement |
$FILE_PATH | File path resolution (hook strings only) |
${CLAUDE_SKILL_DIR} | Reference the skill's own directory |
! 'cmd' | Dynamic bash execution context injection |
permissionMode | default / acceptEdits / plan / bypass |
isolation: worktree | Run agent in isolated git worktree |
memory: user|project | Persistent memory storage scope |
background: true | Run entirely as background task |
initialPrompt | Auto-submit first turn on spawn |
SendMessage | Auto-resumes stopped agents |
.claude/rules/*.md | Project specific structural rules |
~/.claude/rules/*.md | User specific global rules |
paths: (frontmatter) | Path-specific rule triggers |
@path/to/file | Import file directly in CLAUDE.md |
.../memory/MEMORY.md | Topic files, automatically loaded |
PreToolUse / PostToolUse | Intercept before/after tool execution |
SubagentStart / Stop | Lifecycle triggers for agent spawning |
SessionEnd | Run cleanup script when session closes |
CwdChanged / FileChanged | React to directory or file changes |
TaskCreated | Fires when task created via TaskCreate |
if: (hook field) | Conditional execution (permission rule syntax) |
PermissionDenied | Fires after auto mode classifier denials; return {retry:true} to allow retry |
"defer" (PreToolUse) | Headless sessions pause at tool call; resume with -p --resume to re-evaluate |
claude mcp list/add/remove | Standard MCP server management |
claude mcp serve | Run Claude Code as an MCP server |
--transport http/stdio/sse | Protocol connection methods |
Elicitation | Servers can request input mid-task |
_meta["anthropic/maxResultSizeChars"] | Override max MCP result size per call (up to 500K chars) |
claude auth login/logout | Session authentication control |
claude auth status | Check current authentication validity |