>_
Claude Code
$ claude --help — CLI reference for the agentic coding tool
CLI commands
claudeStart an interactive REPL session in your terminal
claude "task"Run a one-shot prompt non-interactively and exit
claude -p "prompt"Pipe a prompt string directly from the command line--print
claude --resumeResume the most recent conversation session
claude --resume <id>Resume a specific past session by its ID
claude --continueContinue the last conversation without re-initializing
claude --modelSpecify which Claude model to use for the session
claude --output-formatSet output as text json stream-json
claude --allowedToolsWhitelist specific tools Claude can use in this session
claude --disallowedToolsBlock specific tools from being used
claude --dangerously-skip-permissionsSkip approval prompts (CI pipelines only — use with caution)
In-session slash commands
/helpList available commands and keybindings
/clearClear the current conversation context
/compactCompress conversation history to free up context window
/costShow token usage and estimated cost for this session
/statusDisplay current model, session ID, and tool permissions
/doctorRun a health check on your Claude Code installation
/mcpView connected MCP servers and their available tools
/permissionsView or edit tool permissions for the current session
Keyboard shortcuts (REPL)
Ctrl+CCancel the current running task
Ctrl+DExit the REPL session
↑ / ↓Navigate prompt history
EscInterrupt a running agentic task mid-execution
TabAutocomplete file paths and slash commands
CLAUDE.md context file
CLAUDE.mdPlace in project root — Claude reads it automatically as persistent context every session
~/.claude/CLAUDE.mdGlobal user-level instructions applied to all projects
~/project $ claude "add unit tests to all functions in src/utils.py"
~/project $ cat error.log | claude -p "explain this error"
~/project $ claude --allowedTools Bash,Edit "refactor login module"
# headless CI pipeline (no prompts)
~/project $ claude --dangerously-skip-permissions -p "run all tests"
Interactive
Full REPL session with back-and-forth dialogue
One-shot
Single task, exits on completion — good for scripts
Piped
Stdin/stdout — compose with unix tools
Headless CI
Fully automated, no human approval prompts