Disclaimer: This repository contains source code reverse-engineered from the published
cli.js.mapsource map file of@anthropic-ai/claude-code(v2.1.88). This code is proprietary software owned by Anthropic PBC. All rights reserved. Use is subject to Anthropic's Legal Agreements.
Claude Code is Anthropic's official CLI tool that brings Claude, their AI assistant, directly to your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.
| Field | Details |
|---|---|
| Package | @anthropic-ai/claude-code |
| Version | 2.1.88 |
| Runtime | Node.js >= 18.0.0 |
| Build Tool | Bun (with conditional compilation via bun:bundle) |
| Language | TypeScript / TSX |
| License | Proprietary (see Anthropic's Terms) |
- Terminal-based AI Assistant — Interactive REPL interface powered by React + Ink
- Code Understanding — Parses and understands entire codebases
- File Operations — Read, write, and edit files with AI assistance
- Shell Execution — Run terminal commands safely with sandboxing
- MCP (Model Context Protocol) — Extensible tool/server integration
- Multi-cloud API — Supports Anthropic Direct, AWS Bedrock, Google Vertex AI
- OAuth Authentication — Supports Claude.ai (Pro/Max/Team/Enterprise) and API Key auth
- Remote Sessions — Full remote session support with REPL bridging and JWT auth
- Plugin System — Extensible plugin and skill architecture
- Vim Mode — Built-in Vim keybinding support
- Voice Mode — Voice input/output capabilities
src/
├── assistant/ # Assistant session history management
├── bootstrap/ # Startup state management
├── bridge/ # Remote bridging (REPL, JWT auth, device trust)
├── buddy/ # Visual companion character
├── cli/ # CLI utilities (exit handling, NDJSON, structured IO)
├── commands/ # Slash commands (commit, review, init, etc.)
├── components/ # React UI components (100+ components)
├── constants/ # Constants (API limits, betas, OAuth, prompts)
├── context/ # React contexts (messages, modals, notifications)
├── coordinator/ # Coordinator mode
├── entrypoints/ # Entry points (CLI, MCP server, Agent SDK, Sandbox)
├── hooks/ # React Hooks (80+ hooks)
├── ink/ # Custom Ink terminal rendering engine
├── keybindings/ # Keybinding system (Vim mode, custom bindings)
├── memdir/ # Memory directory (search, aging, team memory)
├── migrations/ # Configuration migrations (v1–v11)
├── plugins/ # Plugin system (built-in plugins)
├── screens/ # Screens (REPL, diagnostics, session recovery)
├── server/ # Direct-connect session & manager
├── services/ # Service layer (analytics, rate limiting, voice)
├── skills/ # Skill system (bundled skills, MCP skill builder)
├── state/ # Application state (AppState, Store, selectors)
├── tasks/ # Task management
├── tools/ # AI tools (30+ tools)
├── types/ # TypeScript type definitions
├── upstreamproxy/ # Upstream proxy relay
├── utils/ # Utility functions (200+ files)
└── vendor/ # Native module sources
| Tool | Description |
|---|---|
BashTool |
Execute shell commands (with sandboxing) |
FileReadTool |
Read files (including images) |
FileWriteTool |
Write files |
FileEditTool |
Edit files with search/replace |
GlobTool |
File pattern matching |
GrepTool |
Content search (powered by ripgrep) |
WebSearchTool |
Web search |
WebFetchTool |
Fetch web page content |
MCPTool |
MCP server tool calls |
AgentTool |
Sub-agent execution (Explore, Plan, General) |
AskUserQuestionTool |
Ask user questions |
TodoWriteTool |
Todo list management |
NotebookEditTool |
Jupyter Notebook editing |
LSPTool |
Language Server Protocol integration |
ScheduleCronTool |
Cron job management |
SkillTool |
Skill execution |
| ...and more |
- Runtime: Bun / Node.js
- Language: TypeScript, TSX
- UI Framework: React + Ink (terminal rendering)
- CLI Framework: Commander.js
- Validation: Zod
- Image Processing: Sharp
- Search: ripgrep
- API SDKs: @anthropic-ai/bedrock-sdk, @anthropic-ai/foundry-sdk
npm install -g @anthropic-ai/claude-codeThis source code was extracted from the cli.js.map source map file included in the npm package. The source map (57MB) contained embedded source content for all 4,756 files, which were parsed and restored to their original file paths.
# Extraction process
python3 extract_sources.py cli.js.map ./restored-src
# Result: 4,756 files restored- Official Product: claude.com/product/claude-code
- Documentation: code.claude.com/docs
- npm Package: @anthropic-ai/claude-code
This software is proprietary and owned by Anthropic PBC. All rights reserved. Use is subject to Anthropic's Legal Agreements. This repository is provided for educational and research purposes only.