Skip to main content
Claude Code brings the full intelligence of Claude into your terminal. It reads, writes, and edits your files, executes shell commands, searches your codebase, and orchestrates multi-agent workflows — all from a single command-line interface built by Anthropic.

Key capabilities

File editing

Read, write, and apply AI-powered edits to files. Supports range reading, full rewrites, and structured diffs.

Shell execution

Run shell commands with intelligent sandboxing. Executes bash commands, scripts, and manages your dev environment.

Codebase search

Search code using ripgrep (grep), glob patterns, and the Language Server Protocol for precise navigation.

MCP integration

Connect to Model Context Protocol servers to extend Claude Code with custom tools and data sources.

Multi-agent orchestration

Spawn sub-agents, create agent teams, and coordinate parallel workstreams using the swarm system.

Voice mode

Input prompts via speech-to-text with real-time streaming and voice keyterm detection.

Architecture overview

Claude Code is built around a central agentic loop that drives all interactions. Query loop — The core of Claude Code is an async generator function in query.ts that manages the model call → tool execution → model call cycle. It handles context compaction, token budget tracking, streaming tool execution, and automatic recovery from API errors. Tool system — Over 40 built-in tools implement a common interface defined in Tool.ts. Each tool is independently sandboxed and subject to the permission system. Tools cover file I/O, shell execution, web search, MCP proxying, agent spawning, Jupyter notebooks, and more. Slash commands — Over 100 slash commands (e.g., /init, /commit, /review, /doctor) are registered via commands.ts and provide structured workflows on top of the query loop. Hooks system — An event-driven lifecycle system (utils/hooks.ts) allows external scripts to intercept tool calls, modify behavior, and automate responses to Claude Code events. Hooks can approve or deny tool usage and respond to file change events.

Technology stack

TechnologyRole
TypeScriptPrimary language across all 1,884 source files
BunRuntime and bundler — feature flags use bun:bundle for dead-code elimination
React / InkTerminal UI framework powering 140+ UI components and the full REPL screen
Commander.jsCLI argument parsing via @commander-js/extra-typings
Anthropic SDKOfficial Claude API client
ZodRuntime schema validation
MCP SDKModel Context Protocol client for server integrations

Internal codename

Claude Code’s internal project name is Tengu — visible as the tengu_* prefix on all analytics events logged through the telemetry pipeline. The codebase also references feature-flagged internal builds that differ from the public @anthropic-ai/claude-code npm package.
The public package is distributed as a compiled JavaScript bundle. Feature flags using bun:bundle perform dead-code elimination so internal-only features (COORDINATOR_MODE, VOICE_MODE, BRIDGE_MODE, etc.) are stripped from external builds.

Next steps

Quickstart

Get Claude Code running in your terminal in minutes.

Installation

Full installation instructions, environment variables, and platform notes.

Build docs developers (and LLMs) love