Claude Code
Claude Code is Anthropic’s agentic coding tool. It runs in your terminal (and in IDEs, the desktop app, and the web), reads and edits your codebase, executes commands, and can delegate work to subagents — all driven by natural language.
Install
# macOS / Linux / WSL — native installer (recommended)
curl -fsSL https://claude.ai/install.sh | bash
# macOS — Homebrew
brew install --cask claude-code
# Windows
winget install Anthropic.ClaudeCode
Packages for apt, dnf, and apk are also available. The old npm install -g @anthropic-ai/claude-code method is deprecated.
Update an existing install:
claude update
First run and authentication
claude # start an interactive session
claude auth login # sign in (--email pre-fills, --sso forces SSO)
claude auth status # show auth status as JSON (--text for human-readable)
claude auth logout # sign out
claude auth status exits 0 when logged in and 1 when not, which makes it useful in scripts.
Quick start
cd your-project
claude
Then, inside the session:
> /init
> explain how authentication works in this repo
/init generates a starter CLAUDE.md — the project-instructions file Claude Code reads automatically on every launch. See Claude Code — Project Instructions (CLAUDE.md).
In this section
| File | What it covers |
|---|---|
| Claude Code — Slash Commands | Every built-in /command, plus deep-dives on the most important ones |
| Claude Code — CLI Commands | Terminal commands and subcommands (claude update, claude auth, claude mcp, …) |
| Claude Code — CLI Flags | CLI flags grouped by purpose (session, models, permissions, output, …) |
| Claude Code — Configuration | settings.json locations, precedence, key settings, environment variables |
| Claude Code — Project Instructions (CLAUDE.md) | CLAUDE.md memory files, @ imports, # shortcut, auto memory |
| Claude Code — Subagents | Subagents: .claude/agents/*.md, frontmatter, built-in agents, limitations |
| Claude Code — Agent Skills | Agent Skills: SKILL.md, frontmatter, discovery, argument substitution |
| Claude Code — MCP | Connecting MCP servers: claude mcp add, scopes, .mcp.json |
| Claude Code — Permissions | The six permission modes, allow/ask/deny rules, sandboxing |
| Claude Code — Workflows | Mini-workflows: understand, build, debug, refactor, review |
For cross-tool comparisons and worked examples, see Feature Matrix and Example: Understand a new repository.
Last verified: 2026-09-07
Official sources:
- https://code.claude.com/docs/en/cli-reference.md
- https://code.claude.com/docs/en/commands.md
- https://docs.claude.com/en/docs/claude-code/overview
- https://raw.githubusercontent.com/anthropics/claude-code/main/README.md
AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.