AI agents

Claude Code

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

FileWhat it covers
Claude Code — Slash CommandsEvery built-in /command, plus deep-dives on the most important ones
Claude Code — CLI CommandsTerminal commands and subcommands (claude update, claude auth, claude mcp, …)
Claude Code — CLI FlagsCLI flags grouped by purpose (session, models, permissions, output, …)
Claude Code — Configurationsettings.json locations, precedence, key settings, environment variables
Claude Code — Project Instructions (CLAUDE.md)CLAUDE.md memory files, @ imports, # shortcut, auto memory
Claude Code — SubagentsSubagents: .claude/agents/*.md, frontmatter, built-in agents, limitations
Claude Code — Agent SkillsAgent Skills: SKILL.md, frontmatter, discovery, argument substitution
Claude Code — MCPConnecting MCP servers: claude mcp add, scopes, .mcp.json
Claude Code — PermissionsThe six permission modes, allow/ask/deny rules, sandboxing
Claude Code — WorkflowsMini-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:

AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.