Quick Reference
Cheat Sheet
Essential Claude Code commands and shortcuts at a glance.
Installation
bash
npm install -g @anthropic-ai/claude-codeStarting Claude Code
bash
claude # Interactive mode
claude "prompt" # With initial prompt
claude -p "prompt" # Print mode (one-shot)
claude --continue # Resume last sessionEssential Slash Commands
| Command | Description |
|---|---|
| /help | Show help |
| /config | Open settings |
| /clear | Clear conversation |
| /compact | Compress context |
| /cost | Show token usage |
| /model | Switch model |
| /memory | Manage memory |
| /mcp | MCP server status |
| /quit | Exit |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+C | Cancel operation |
| Ctrl+D | Exit |
| Escape | Stop generation |
| Tab | Autocomplete |
| Up/Down | History |
File References
@file.ts # Include file
@src/**/*.ts # Include pattern
@image.png # Include imageTool Approval
| Key | Action |
|---|---|
| y | Yes (once) |
| n | No |
| a | Always allow |
| e | Explain |