🐍 Python Port - Complete Python implementation (1,805 modules, 149k lines, 925 tests)
The Complete Leaked TypeScript Source Code
Extracted from Anthropic's npm package via source maps
Overview · Disclaimer · Architecture · Tools · Commands
📚 EDUCATIONAL & RESEARCH PURPOSES ONLY
This repository contains source code that was accidentally leaked by Anthropic through their npm package (version 2.1.88) on March 31, 2026. A source map file was inadvertently bundled into production.
❌ DO NOT ✅ DO Use for commercial purposes Use for learning and research Create competing products Study AI coding assistant architecture Redistribute for profit Understand agentic tool systems This code is proprietary and owned by Anthropic. All rights reserved.
Claude Code is Anthropic's agentic coding assistant that can read/write files, execute shell commands, search code, spawn sub-agents, fetch web content, and connect to external tools via MCP.
| Metric | Count |
|---|---|
| TypeScript Files | 1,900+ |
| Lines of Code | 512,000+ |
| Agent Tools | 40+ |
| Slash Commands | 85+ |
| Feature Flags | 44+ |
claude-code-source/
├── QueryEngine.ts # 🧠 Core LLM engine (46K lines)
├── Tool.ts / Task.ts # 🔧 Tool & task system
├── commands/ # ⌨️ 85+ slash commands
├── tools/ # 🛠️ 40+ agent tools
├── components/ # 🎨 React UI (146 components)
├── services/ # 🔌 API, MCP, OAuth
├── hooks/ # ⚡ React hooks
├── bridge/ # 🌉 Remote sessions
└── utils/ # 🧰 Utilities (330+ files)
| Tools | Commands | Feature Flags |
|---|---|---|
| FileRead, FileWrite, FileEdit | /commit, /review, /pr_comments | KAIROS (autonomous mode) |
| Glob, Grep, LSP | /compact, /clear, /resume | PROACTIVE |
| Bash, PowerShell, Agent | /config, /permissions, /theme | BUDDY 🐾 |
| WebFetch, WebSearch, MCP | /doctor, /mcp, /skills | VOICE_MODE |
| TodoWrite, TaskCreate | /buddy, /dream, /ultraplan | CACHED_MICROCOMPACT |
🌐 Live Analysis · 🐍 Python Port · 📦 Official CLI · 📚 Docs
This source code is proprietary and owned by Anthropic. This repository exists strictly for educational purposes. If you are from Anthropic and wish to have this removed, please open an issue.