An agentic AI coding assistant — built for developers who want to delegate real coding tasks directly from their terminal.
Claude Code is a powerful command-line tool that brings Claude's intelligence to your development workflow. It can read and edit files, run shell commands, browse the web, manage tasks, and orchestrate multi-agent pipelines — all from within your terminal.
- Agentic Coding — Claude autonomously reads, writes, and edits code across your entire project
- Bash Execution — Run shell commands with safety checks and permission controls
- File Operations — Read, write, edit, and glob files with full context awareness
- Web Search & Fetch — Search the web and retrieve content to inform decisions
- Multi-Agent Orchestration — Spawn and coordinate sub-agents (agent swarms) for complex tasks
- MCP (Model Context Protocol) — Extend Claude with external tools and data sources via MCP servers
- Plugins & Skills — Install and run community or custom plugins and reusable skill bundles
- Notebook Support — Edit Jupyter notebooks directly
- Voice Input — Interact via voice with built-in STT (speech-to-text) support
- IDE Integrations — Works seamlessly with VS Code, JetBrains, and other editors
- Scheduled Tasks / Cron — Set up recurring or one-time automated agent runs
- Plan Mode — Review and approve Claude's action plan before execution
- Git & GitHub Integration — Commit, push, open PRs, and review code via CLI
- Cost & Token Tracking — Monitor usage and costs per session
- Memory & Context — Persistent session memory via
CLAUDE.mdfiles - OAuth & Keychain — Secure authentication with keychain-backed credential storage
- Remote Sessions — Connect to and manage remote agent sessions
- Policy & Rate Limits — Configurable limits and managed settings for teams and enterprises
- Hooks System — Configure event hooks that fire before/after tool calls
- Theming — Customizable terminal themes and output styles
- LSP Integration — Language Server Protocol support for richer code awareness
- Worktree Support — Git worktree isolation for safe parallel experimentation
- Teleport — Jump between remote and local environments seamlessly
- Desktop Handoff — Hand off sessions between terminal and desktop app
claude-code/
├── main.tsx # Entry point — CLI bootstrapping & command registration
├── Tool.ts # Base tool interface and builder
├── tools.ts # Tool registry and assembly
├── context.ts # System context and CLAUDE.md loading
├── commands.ts # CLI command definitions
├── tasks.ts # Task management helpers
├── history.ts # Session history tracking
├── cost-tracker.ts # Token and cost tracking
│
├── tools/ # All built-in tools
│ ├── AgentTool/ # Spawn sub-agents
│ ├── BashTool/ # Execute shell commands (with AST security parsing)
│ ├── FileReadTool/ # Read files
│ ├── FileEditTool/ # Diff-based file editing
│ ├── FileWriteTool/ # Write new files
│ ├── GlobTool/ # File pattern matching
│ ├── GrepTool/ # Content search (ripgrep)
│ ├── WebFetchTool/ # Fetch and parse web content
│ ├── WebSearchTool/ # Web search
│ ├── MCPTool/ # MCP server tool calls
│ ├── NotebookEditTool/ # Jupyter notebook editing
│ ├── SkillTool/ # Run installed skills
│ ├── TodoWriteTool/ # Task list management
│ ├── ScheduleCronTool/ # Cron/scheduled tasks
│ ├── EnterPlanModeTool/ # Switch to plan mode
│ ├── EnterWorktreeTool/ # Git worktree isolation
│ ├── SendMessageTool/ # Send messages between agents
│ ├── TaskCreateTool/ # Create background tasks
│ ├── TaskListTool/ # List running tasks
│ ├── TaskStopTool/ # Stop running tasks
│ ├── TeamCreateTool/ # Create agent teams
│ ├── AskUserQuestionTool/ # Ask user clarifying questions
│ ├── LSPTool/ # Language Server Protocol queries
│ ├── REPLTool/ # Interactive REPL execution
│ ├── PowerShellTool/ # Windows PowerShell support
│ ├── SleepTool/ # Pause agent execution
│ ├── ToolSearchTool/ # Search available tools
│ └── SyntheticOutputTool/ # Synthetic output generation
│
├── commands/ # All slash commands
│ ├── commit.ts # /commit — Git commit with auto message
│ ├── review.ts # /review — Code review
│ ├── model/ # /model — Switch AI model
│ ├── mcp/ # /mcp — Manage MCP servers
│ ├── plugin/ # /plugin — Plugin management
│ ├── skills/ # /skills — Skills management
│ ├── hooks/ # /hooks — View & configure hooks
│ ├── theme/ # /theme — Change terminal theme
│ ├── voice/ # /voice — Toggle voice mode
│ ├── plan/ # /plan — Enter plan mode
│ ├── memory/ # /memory — Manage CLAUDE.md memory
│ ├── session/ # /session — Session management
│ ├── tasks/ # /tasks — Background task management
│ ├── agents/ # /agents — View running agents
│ ├── cost/ # /cost — Show cost breakdown
│ ├── diff/ # /diff — Show file diffs
│ ├── compact/ # /compact — Compact conversation history
│ ├── export/ # /export — Export session
│ ├── share/ # /share — Share session
│ ├── doctor/ # /doctor — Diagnose issues
│ ├── login/logout/ # /login, /logout — Auth commands
│ ├── permissions/ # /permissions — View permission rules
│ ├── keybindings/ # /keybindings — Configure shortcuts
│ ├── config/ # /config — Edit settings
│ ├── ide/ # /ide — IDE connection management
│ ├── upgrade/ # /upgrade — Upgrade Claude Code
│ ├── issue/ # /issue — Report issues
│ ├── feedback/ # /feedback — Send feedback
│ ├── stats/ # /stats — Session statistics
│ ├── status/ # /status — Connection status
│ └── vim/ # /vim — Toggle vim mode
│
├── services/ # Core services
│ ├── api/ # Anthropic API client & bootstrap
│ ├── analytics/ # Telemetry, GrowthBook feature flags
│ ├── mcp/ # MCP server connection management
│ ├── lsp/ # Language Server Protocol
│ ├── oauth/ # OAuth authentication flows
│ ├── plugins/ # Plugin loading & registry
│ ├── policyLimits/ # Usage policy enforcement
│ ├── AgentSummary/ # Agent run summarization
│ ├── compact/ # Conversation compaction
│ ├── extractMemories/ # Memory extraction from sessions
│ ├── remoteManagedSettings/# Enterprise remote settings
│ ├── settingsSync/ # Settings synchronization
│ ├── tips/ # In-app tip delivery
│ └── voice/ # Voice mode & STT
│
├── utils/ # Utility modules
│ ├── auth.ts # Authentication helpers
│ ├── config.ts # Global config management
│ ├── git.ts # Git utilities
│ ├── permissions/ # Full permission system
│ │ ├── PermissionMode.ts # Permission modes (default, plan, auto, etc.)
│ │ ├── bashClassifier.ts # Bash command safety classification
│ │ ├── dangerousPatterns.ts # Dangerous command detection
│ │ └── yoloClassifier.ts # Auto-accept classifier
│ ├── bash/ # Bash AST parsing & security
│ ├── secureStorage/ # Keychain credential storage
│ ├── model/ # Model selection & routing
│ ├── startupProfiler.ts # Startup performance profiling
│ └── ...
│
├── entrypoints/ # Application entry points
│ ├── cli.tsx # Interactive REPL launcher
│ ├── init.ts # Initialization logic
│ ├── mcp.ts # MCP server entrypoint
│ └── sdk/ # Agent SDK entrypoints
│
├── tasks/ # Task execution layer
│ ├── LocalAgentTask/ # Local agent execution
│ ├── RemoteAgentTask/ # Remote agent execution
│ ├── LocalShellTask/ # Shell task management
│ ├── InProcessTeammateTask/# In-process teammate agents
│ └── DreamTask/ # Background dream tasks
│
├── screens/ # Full-screen UI views
│ ├── App.tsx # Root application screen
│ ├── Doctor.tsx # Diagnostics screen
│ └── REPL.tsx # Main REPL interface
│
├── components/ # Reusable UI components (Ink/React)
│ ├── Message.tsx # Message rendering
│ ├── PromptInput/ # User input component
│ ├── StructuredDiff/ # Visual diff display
│ ├── Settings/ # Settings UI
│ ├── HighlightedCode/ # Syntax-highlighted code
│ ├── Markdown.tsx # Markdown renderer
│ ├── StatusLine.tsx # Bottom status bar
│ ├── ModelPicker.tsx # Model selection UI
│ ├── ThemePicker.tsx # Theme selection UI
│ ├── mcp/ # MCP management UI
│ ├── permissions/ # Permission dialog UI
│ ├── tasks/ # Task list UI
│ └── ...
│
├── types/ # TypeScript type definitions
├── schemas/ # Zod validation schemas
├── bootstrap/ # App bootstrap & global state
├── coordinator/ # Multi-agent coordinator mode
├── plugins/ # Plugin infrastructure
├── voice/ # Voice mode implementation
├── vim/ # Vim keybinding mode
└── memdir/ # Memory directory management
- Bun runtime (recommended) or Node.js 18+
- An Anthropic API key or Claude.ai subscription
# Install via npm
npm install -g @anthropic-ai/claude-code
# Or via Bun
bun install -g @anthropic-ai/claude-code# Log in with your Anthropic account
claude login# Start an interactive session in your project
claude
# Run a one-off task
claude "refactor the auth module to use async/await"
# Ask a question about your codebase
claude "explain how the permission system works"
# Commit changes with an auto-generated message
claude commit
# Review code changes
claude reviewInside an interactive session, you can use slash commands to control Claude Code:
| Command | Description |
|---|---|
/model |
Switch the AI model |
/plan |
Enter plan mode — review before execution |
/mcp |
Manage MCP servers |
/plugin |
Manage plugins |
/skills |
Manage skills |
/hooks |
View and configure tool event hooks |
/theme |
Change the terminal theme |
/voice |
Toggle voice input mode |
/memory |
Edit CLAUDE.md memory files |
/commit |
Git commit with auto-generated message |
/diff |
Show pending file diffs |
/review |
Code review mode |
/compact |
Compact conversation history |
/cost |
Show session cost breakdown |
/export |
Export the session |
/share |
Share the session |
/tasks |
View background tasks |
/agents |
View running sub-agents |
/session |
Manage sessions |
/permissions |
View active permission rules |
/keybindings |
Configure keyboard shortcuts |
/config |
Edit Claude Code settings |
/ide |
Manage IDE connections |
/doctor |
Run diagnostics |
/stats |
Show session statistics |
/status |
Show connection status |
/vim |
Toggle vim keybinding mode |
/login / /logout |
Authentication |
/upgrade |
Upgrade Claude Code |
/feedback |
Send feedback |
/issue |
Report a bug |
/help |
Show help |
Claude Code has a configurable permission system to control how much autonomy Claude has:
| Mode | Description |
|---|---|
default |
Ask before executing potentially dangerous operations |
plan |
Show a full plan and require approval before taking any action |
acceptEdits |
Auto-accept file edits, ask for shell commands |
bypassPermissions |
Skip all permission prompts (use with caution) |
dontAsk |
Never ask for permission — fully autonomous mode |
Switch modes using /plan in session, or configure via settings.
Claude Code uses a rich set of built-in tools to interact with your environment. Each tool has defined input schemas (via Zod), permission requirements, and React/Ink UI rendering. Tools cover file I/O, shell execution, web access, MCP calls, agent spawning, and more.
MCP servers extend Claude's capabilities with external integrations — databases, APIs, project management tools, Slack, GitHub, and more. Configure MCP servers globally or per-project in your settings.
Skills are reusable prompt bundles that give Claude specialized instructions for specific tasks (e.g., creating Excel files, PowerPoint decks, Word docs, or PDFs). Install community skills or author your own in a skills/ directory.
Plugins bundle MCPs, skills, and tools together into installable .plugin packages for teams and organizations — making it easy to share workflows.
Place a CLAUDE.md file in your project root (or ~/.claude/CLAUDE.md globally) to give Claude persistent memory, project-specific instructions, coding conventions, and context about your codebase.
Enable plan mode (/plan) to have Claude show you its intended actions before executing them — giving you full review and control before any changes are made.
Hooks fire before or after tool executions. They let you run custom scripts, logging, validation, or notifications at specific points in Claude's workflow.
Claude Code supports multi-agent orchestration where a coordinator agent spawns specialized sub-agents to work on different parts of a task in parallel, dramatically speeding up complex workflows.
The EnterWorktreeTool creates an isolated Git worktree so Claude can safely experiment with changes without affecting your main branch.
Claude Code stores its configuration in ~/.claude/. Key settings include:
| Setting | Description |
|---|---|
model |
The Claude model to use (e.g., claude-opus-4-5, claude-sonnet-4-5) |
permissionMode |
Controls auto-approval of tool calls |
mcpServers |
MCP server configurations |
env |
Environment variable overrides |
theme |
Terminal color theme |
outputStyle |
Response formatting style |
vim |
Enable vim keybindings |
hooks |
Tool event hook configurations |
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Language | TypeScript |
| CLI Framework | Commander.js |
| Terminal UI | Ink (React for CLIs) |
| Validation | Zod |
| AI SDK | @anthropic-ai/sdk |
| Search | ripgrep |
| Feature Flags | GrowthBook |
| Telemetry | OpenTelemetry |
| Bundler | Bun bundler with feature flags |
| Linting | Biome |
Claude Code integrates directly with popular editors:
- VS Code — Auto-connects and syncs file context
- JetBrains IDEs — IntelliJ, WebStorm, PyCharm, etc.
- Cursor — Native support
- Zed — Supported via LSP bridge
Connect your IDE using /ide inside a Claude Code session.
MCP (Model Context Protocol) servers extend what Claude can access and do. Some popular integrations:
- GitHub — Read/write issues, PRs, code
- Slack — Read/send messages
- Databases — Query SQL/NoSQL databases
- File systems — Access remote file systems
- APIs — Connect to any REST or GraphQL API
Manage servers with /mcp or edit ~/.claude/settings.json.
Contributions, bug reports, and feature requests are welcome! Please open an issue or pull request.
This source code is the property of Anthropic. All rights reserved. This repository is for personal and educational reference only and is not intended for redistribution or commercial use.