| Command | What it does |
| claude | Start interactive session in current project |
| claude "query" | Start session with an initial prompt |
| claude -p "query" | Print mode -- run prompt, then exit (good for scripts/CI) |
| claude -c | Continue the most recent conversation in this directory |
| claude -r "name" "query" | Resume a session by ID or name |
| claude update | Update to the latest version |
| cat file | claude -p "query" | Pipe file content as input |
| Command | What it does |
| /help | List all available commands -- run this first in a new session |
| /clear | Wipe conversation, keep project memory. Aliases: /reset, /new |
| /compact | Summarize the conversation to free up context |
| /exit | Quit the CLI. Alias: /quit |
| /status | Show account, model, working directory, version |
| /cost | Show token usage and spend for this session |
| /usage | Show plan usage limits and rate-limit status |
| /model | View or switch the active model |
| Command | What it does |
| /resume | Reopen a previous session by ID or name. Alias: /continue |
| /rewind | Roll conversation and/or code back to an earlier checkpoint |
| /diff | Interactive viewer of uncommitted changes and per-turn diffs |
| /copy | Copy the last response (or a code block) to clipboard |
| /export | Save the current conversation to a file or clipboard |
| /btw | Ask a quick side question without adding it to the conversation |
| /context | Visualize what's loaded into the context window and where it's spent |
| /memory | View or edit the CLAUDE.md files in scope |
| /add-dir | Grant file access to an additional directory for this session |
| Command | What it does |
| /init | Explore the codebase and generate a starter CLAUDE.md |
| /config | Open settings (theme, defaults, editor mode). Alias: /settings |
| /permissions | View/edit allow, ask, deny rules for tool permissions |
| /mcp | Manage MCP server connections and authentication |
| /agents | List, create, or edit subagents |
| /hooks | View hook configuration for tool events |
| /skills | List the skills available in this session |
| /doctor | Diagnose install and environment issues |
| /login / /logout | Authenticate, switch accounts, or sign out |
| /feedback | Report an issue to Anthropic with session context. Alias: /bug |
| Key | Action |
| Shift + Tab | Cycle permission mode: auto → manual → acceptEdits → plan |
| Esc | Interrupt Claude mid-response so you can type again |
| Esc, Esc | Open the rewind/checkpoint menu to roll back |
| Ctrl + C | Cancel current input, or exit on an empty prompt |
| Ctrl + R | Reverse search through prompt history |
| Ctrl + O | Expand to the verbose, full transcript view |
| ↑ / ↓ | Scroll through prompt history |
| @ + path | Reference a file or directory in your prompt |
| / | Open the command menu |
| ? | Show shortcuts for your current terminal/IDE |
| Flag | What it does |
| --model | Set the model (alias like "sonnet" or a full ID) |
| --permission-mode | Start in a specific mode (default/plan/acceptEdits/bypassPermissions) |
| --allowedTools | Tools that execute without prompting |
| --output-format | Output format for print mode: text, json, stream-json |
| --max-turns | Limit agentic turns in print mode |
| --verbose | Full turn-by-turn logging |
| --continue / -c | Load most recent conversation |
| --resume / -r | Resume session by ID or name |