claude
v2.1.212
Interactive reference · Claude Code

Learn Claude Code by running it.

Not a wall of tables. A working terminal: type or click any command, flag, or shortcut and it runs right here — printing exactly what it does. Every entry in the reference below is live. Start by typing / or pressing a chip.

— claude — ~/my-project — zsh
~/my-project ❯

Tips — / browse & search · Tab autocomplete · ↑ ↓ history · Enter run · type clear to reset

01

The flow of a session

Most commands belong at one moment in a session — from opening a repo to shipping the change. Tap a phase to load its commands into the terminal.

02

Install & launch

Get the CLI, then start, pipe, continue, or resume a session.

03

Slash commands

Typed inside a session at the start of a line. Jump to a group, or click any command to run it above.

04

CLI flags

Passed at launch: claude --flag. Many pair with -p for scripting. claude --help won't list them all.

05

Keyboard shortcuts

Interactive-mode controls. macOS Alt/Option shortcuts need Option-as-Meta in your terminal.

06

Models & effort

Switch with /model; dial reasoning with /effort. Click any card to run it.

models — /model <alias>

effort levels — /effort <level>

07

Permission modes

How much Claude does before asking. Cycle live with Shift+Tab.

08

Files, config & paths

Where Claude Code reads project rules, settings, and state.

common environment variables

09

The playbook

Anthropic's own best practices, distilled. Click a principle to run it in the terminal.

Nearly every tip reduces to one constraint: Claude's context window fills fast, and quality drops as it fills. Manage context like it's your scarcest resource — because it is.

Principles click to run

Prompt it like a senior engineer vague → specific

The more precise the instruction, the fewer corrections. Vague is fine only when you're exploring.

Common failure patterns and the fix

A lean CLAUDE.md to start click to copy

Loaded every session — so keep it short. For each line ask: “would removing this cause a mistake?” If not, cut it.

# Code style
- Use ES modules (import/export), not CommonJS (require)
- Destructure imports when possible

# Workflow
- Typecheck after a series of changes
- Prefer running single tests, not the whole suite, for speed
- Run the linter before committing

# Gotchas
- IMPORTANT: never edit files in /generated — they're built from /schema
- Dev server needs DATABASE_URL set (see .env.example)
10

Vim mode

Enable via /config → Editor mode. Modal editing inside the prompt.

Normal-mode motions & operators