We Love Claude

Claude Code (CLI)

The terminal version of Claude Code — install, CLAUDE.md context files, plans, slash commands, and power-user tips.

Available on
Desktop

What it is

Claude Code is Anthropic’s agentic coding tool. The CLI is the terminal version: you cd into a repo, run claude, and Claude reads files, edits them, runs tests, and commits — on demand and with your approval. It’s the same engine that powers Claude Code Desktop and the web app at claude.ai/code; the CLI is where the team ships first and where every knob is exposed.

Where to find it

Install with one of the following, then run claude:

Your setupCommand
macOS / Linux / WSLcurl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell)irm https://claude.ai/install.ps1 | iex
Homebrewbrew install --cask claude-code
npm (Node 18+)npm install -g @anthropic-ai/claude-code

Don’t use sudo with the npm install — it causes permission issues later. Verify with claude --version.

How to use it

First-day flow

  1. cd path/to/your/project and run claude.
  2. On first launch, /login authenticates via browser (Enterprise/SSO) or use ANTHROPIC_API_KEY / Bedrock / Vertex env vars.
  3. Ask a question. Claude reads files on demand — nothing to upload.
  4. When Claude proposes an edit you’ll see a diff. Choose Yes, Yes, don’t ask again, or No.
  5. Run /init once per project to generate a starter CLAUDE.md capturing conventions and commands.

Permission modes

Press Shift+Tab to cycle: default → acceptEdits → plan (and auto if you launched with --enable-auto-mode). Plan mode is read-only; use it to let Claude outline big changes before touching files.

CLAUDE.md — project memory

Drop a CLAUDE.md at your repo root. Claude reads it automatically at the start of every session. Keep it under ~200 lines. Include build/test/lint commands, naming conventions, hard constraints, and gotchas. Leave out full API docs, changelogs, and aspirational rules. Prompt caching keeps the cost low.

Slash commands worth knowing

  • /clear — wipe conversation, keep project memory. Start fresh between unrelated tasks.
  • /compact — summarize conversation to free context mid-task.
  • /model — switch between Sonnet (default), Opus (deeper reasoning), Haiku (fastest/cheapest). Use /model opusplan to plan with Opus and execute with Sonnet.
  • /cost — token and dollar usage for this session (API billing).
  • /usage — Enterprise plan limits and rate-limit status.
  • /permissions — pre-approve safe commands per project.
  • /agents, /hooks, /skills — customize subagents, lifecycle hooks, and packaged workflows.
  • /doctor — diagnostic report for support tickets.

Full keybindings: ? inside a session.

Good to know

  • Models: Sonnet for most coding, Opus when stuck or for wide changes, Haiku for quick mechanical edits. /model is always the source of truth for what’s available to your account.
  • Usage meter depends on auth. Enterprise seats get a pool that resets on a rolling window. API-key auth (Console, Bedrock, Vertex, Foundry) is pay-per-token with no hard stop.
  • 1M context is available in Claude Code for Max, Team, and Enterprise users on Opus 4.6 or 4.7.
  • Worktrees: claude --worktree launches an isolated git worktree session. Run 3–5 in parallel. /batch distributes large migrations across many worktree agents.
  • Chrome extension & Desktop app close the verification loop for web code — Claude can read console logs, errors, and DOM state. Power-user tip #1 is to give Claude a way to verify its own work.
  • Teleport and remote control (Pro/Max/Team/Enterprise, CLI v2.1.51+) move sessions between terminal, desktop, web, and mobile.
  • Troubleshooting quick hits: command not found → reopen terminal. EACCES on npm install → use the native installer or fix npm prefix. /login hangs → paste the URL manually. 403 on every request → /model to a model your seat has access to. Last resort: claude doctor.

What’s changed recently

  • 2026-04-18 — Page created from official help-center articles.

Related

Sources