Anthropic's official CLI. A Claude model (Opus 4.7 by default) running in your terminal with Read/Write/Edit/Bash tools, MCP integrations, a hook system, and project-scoped skills + memory. Ships on macOS, Linux, Windows (WSL2). Integrates with VS Code + JetBrains.
| Key | Value |
|---|---|
| Default model | claude-opus-4-7 (1M context) |
| Fast mode | claude-opus-4-6 (same class, faster streaming) |
| Install | npm install -g @anthropic-ai/claude-code |
| Project config | .claude/settings.json |
| User config | ~/.claude/settings.json |
| Session store | ~/.claude/projects/<encoded-path>/*.jsonl |
| Docs | docs.claude.com |
| Source | anthropics/claude-code |
Two minutes from blank machine to a running session.
| Platform | Notes |
|---|---|
| macOS | First-class. Apple Silicon preferred for local-model interop. |
| Linux | First-class. Any distro with Node 20+. |
| Windows | Via WSL2. Native Windows is experimental. |
| Docker | Official image for sandboxed runs. Good with --dangerously-skip-permissions. |
ANTHROPIC_API_KEY in the environment or via claude login.CLAUDE_CODE_USE_BEDROCK=1 + your AWS credentials.CLAUDE_CODE_USE_VERTEX=1 + ADC credentials.Every flag worth knowing, grouped by what they do.
| Flag | Effect |
|---|---|
| One-shot mode. Read prompt from args or stdin, write response to stdout, exit. Ideal for scripting. | |
| --continue | Resume the most recent session in the current directory. |
| --resume <id> | Resume a specific session by id. |
| --model <name> | Pin the session's model. Aliases: opus, sonnet, haiku. |
| --dangerously-skip-permissions | Bypass the runtime permission prompt entirely. For sandboxed or CI runs. |
| --mcp-config <path> | Load MCP servers from a file instead of settings.json. |
| --cwd <path> | Run with a specific working directory (overrides auto-detection). |
! prefix — run a shell command in-band (output lands in the conversation).~/.claude/keybindings.json.Built-in slashes + how to author your own.
| Command | Purpose |
|---|---|
| /help | Inline help — built-ins + registered user commands |
| /clear | Wipe the visible transcript + context; settings + MCP stay loaded |
| /compact | Summarise + compact the conversation to reclaim tokens |
| /fast | Toggle Claude Opus 4.6 (faster streaming, same weight class) |
| /model <name> | Switch model mid-session |
| /init | Bootstrap a CLAUDE.md for the current repo |
| /review | Review a pull request or the current diff |
| /security-review | Scan pending changes for security issues |
| /loop [interval] <cmd> | Run a command on a recurring interval (or self-paced) |
| /schedule | Create/manage scheduled remote triggers |
| /statusline | Configure the status line above the input |
| /resume | Open the session picker |
| /usage | Unified usage view — /cost + /stats merged (both stay as shortcuts) · 2.1.118 |
| /theme | Create/switch named custom themes; JSON files live in ~/.claude/themes/ · 2.1.118 |
| /color | Set session accent color; syncs to claude.ai/code when Remote Control connected · 2.1.118 |
| /doctor | Health check — now openable mid-response · 2.1.116 |
| /ultrareview | Parallelized deep review with diffstat · 2.1.113 |
| /extra-usage | Extended usage view; works from Remote Control · 2.1.113 |
| /add-dir | Add a directory to the session scope |
| /fork | Fork the current conversation (pointer-based, cheap as of 2.1.118) |
| /mcp | Manage MCP server connections + OAuth |
| /plugin | Manage installed plugins + marketplace |
Any .claude/skills/<name>/SKILL.md registers as /<name>. Minimum shape:
/<name>.
Markdown files that teach Claude how to do something specific. Lazy-loaded, versioned with the repo.
./.claude/skills/<name>/SKILL.md — versioned with the repo. Shared across contributors.
~/.claude/skills/<name>/SKILL.md — per-user, cross-project. Personal shortcuts + preferences.
Installed via the plugin system; pinned in skills-lock.json. Shared across repos; reproducible across machines.
Shell commands that fire at well-defined points inside the agent loop. Gate, rewrite, notify, log.
Edit|Write running Biome / Prettier / ruff.Bash checking the command against an approved pattern list.git status into context when a prompt mentions commits.say / flashes the Dock.Built-in tools ship with the CLI. MCP servers extend the surface to anything with an integration.
Read · Write · Edit · NotebookEdit · Glob · Grep. The core loop for touching code.
Bash (with run_in_background) + Monitor for tailing async processes.
Agent (spawn subagents) · SendMessage (continue a named agent) · TaskCreate/List/Update (progress tracking).
WebFetch (specific URL) · WebSearch (query). Distilled results, not raw HTML.
ScheduleWakeup for /loop dynamic pacing. CronCreate/List/Delete for persistent schedules.
Invoke a user-authored skill by name. Registered automatically from .claude/skills/.
Fetch schemas for deferred MCP tools so they become callable in the current session.
AskUserQuestion (structured question) · ExitPlanMode (leave plan mode) · Config (get/set a subset of settings).
Large MCP tool libraries (100+ tools) use deferred registration — names appear in the system reminder but schemas load on demand via ToolSearch. Keeps the initial prompt small. Call ToolSearch "select:<name>" before invoking a deferred tool.
Spawn scoped agents. Isolate risky work in a git worktree. Run in the background with Monitor.
| Type | Use |
|---|---|
| general-purpose | Catch-all. Can use any tool. Default choice for open-ended tasks. |
| Explore | Codebase search — Glob / Grep / Read with no write tools. Cheap reconnaissance. |
| Plan | Read-only planning. Produces an implementation plan without touching files. |
| statusline-setup | Configure the status line. |
| keybindings-help | Edit ~/.claude/keybindings.json. |
| (project-defined) | Drop .claude/agents/<name>.md to register a custom persona + tool allowlist. |
isolation: "worktree" creates a temporary git worktree on a new branch, runs the subagent there, cleans up if no changes are made, and returns the worktree path + branch name if changes land. Use for any mutation you might need to throw away.
Background agents notify on completion automatically — don't poll. The Monitor tool streams stdout line-by-line if you need tail-style visibility. For one-shot waits ("run this, block until done"), use Bash run_in_background=true + Monitor instead of Agent.
Three files, a merge order, and the blocks that matter.
| File | Scope | Commits? |
|---|---|---|
| ~/.claude/settings.json | User · machine-wide | No (outside repo) |
| .claude/settings.json | Project | Yes — shared with contributors |
| .claude/settings.local.json | Project-local overrides | No — gitignored |
Merge order: local > project > user. Most-specific wins on scalar keys; arrays concatenate.
allow / deny rules for tools. Glob-pattern match. Most restrictive wins.
Per-event arrays of {matcher, hooks: [{type:"command", command}]}. See the Hooks tab.
Map of server-name → transport config. See the MCP tab.
Environment variables injected into the Claude Code process.
Default model for the project. Override with --model or /model.
Script or template that produces the line above the input.
Tool names to hide for this scope. Useful to disable WebFetch in offline/secure workflows.
Formatting preset for model output — concise, verbose, etc.
Separate file: ~/.claude/keybindings.json. Configurable via the keybindings-help subagent — just ask Claude Code to remap something, and it'll write the JSON.
Runtime mode + allowlist rules. Two layers that compose.
--dangerously-skip-permissions.Tie-break: deny wins over allow. Most-specific wins when both match.
Great for high-trust planning before touching code. Claude Code can Read, Grep, Glob, WebFetch — it cannot Write, Edit, or run a destructive Bash command. Exit plan mode with the ExitPlanMode tool after user approves the plan.
--dangerously-skip-permissions bypasses the runtime prompt but does not bypass settings.json deny rules. Use both if you really want unfettered access.deny list for anything you never want the model touching.CLAUDE.md + auto-memory. What Claude Code remembers between sessions and between projects.
Repo root. Auto-loaded into every session in that project. Overview · stack · commands · conventions · invariants. /init bootstraps one.
~/.claude/CLAUDE.md. Loaded into every session across every project. Tone, idioms, global preferences.
~/.claude/projects/<path>/memory/. Agent-managed notes keyed by type (user / feedback / project / reference). Grows over time.
| Type | Purpose |
|---|---|
| user | Your role, responsibilities, knowledge level. Informs how Claude frames answers. |
| feedback | Corrections + confirmed approaches. Survives across sessions so you don't re-correct. |
| project | Facts about the current project — who's doing what, deadlines, decisions. |
| reference | Pointers to external systems — Linear project, Slack channel, Grafana dashboard. |
MEMORY.md under the project memory dir is an index — one line per memory file, under ~150 chars: - [Title](file.md) — one-line hook. Always loaded into context. Keep it tight (lines past ~200 get truncated).
Tracked via the organized_ai/openclaw-changelog-tracker Apify actor pointed at anthropics/claude-code CHANGELOG.md. Highlights from the last five releases below; full changelog in the source link.
/usage replaces /cost and /stats (both stay as typing shortcuts that open the relevant tab)./theme — named custom themes, stored as JSON in ~/.claude/themes/. Plugins can ship themes via a themes/ directory./color syncs the session accent color to claude.ai/code when Remote Control is connected.--dangerously-skip-permissions.type: "mcp_tool" — no shell shim needed./mcp OAuth flow fixes: servers with headersHelper, servers whose token response omits expires_in, step-up re-consent on insufficient_scope 403, concurrent-refresh keychain race on macOS.DISABLE_UPDATES env var blocks all update paths, including manual claude update (stricter than DISABLE_AUTOUPDATER).wslInheritsWindowsSettings."$defaults" in autoMode.allow / soft_deny / environment to compose with built-in rules instead of replacing them.claude plugin tag — create release git tags for plugins with version validation.CLAUDE_CODE_FORK_SUBAGENT=1.mcpServers now loads for main-thread --agent sessions./model selections persist across restarts; startup header shows when a model is project- or managed-settings-pinned.Glob + Grep tools replaced by embedded bfs + ugrep available through Bash — faster searches, no separate tool round-trip. (Windows and npm installs unchanged.)user_prompt events include command_name + command_source; usage/error events include effort when the model supports effort levels.high (was medium).cleanupPeriodDays retention now sweeps ~/.claude/tasks/, shell-snapshots/, backups/./resume up to 67% faster on 40MB+ sessions; handles dead-fork entries efficiently.resources/templates/list is deferred to first @-mention./doctor now opens while Claude is responding — no wait for the current turn.hooks: fire for main-thread --agent runs.rm/rmdir on /, $HOME, or other critical system dirs.storage.googleapis.com/claude-code-dist-… to downloads.claude.ai/claude-code-releases.sandbox.network.deniedDomains setting blocks specific domains even under broader allowedDomains wildcards./ultrareview — parallelized checks, diffstat in the launch dialog, animated launching state./extra-usage now works from Remote Control (mobile/web) clients.env/sudo/watch/ionice/setsid; Bash(find:*) allow rules no longer auto-approve find -exec/-delete; on macOS /private/{etc,var,tmp,home} are treated as dangerous removal targets.Scheduled daily. Dataset items at api.apify.com/v2/datasets/<default-ds-id>/items.