Skip to content

mimran-khan/claude-code-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Python Port - Complete Python implementation (1,805 modules, 149k lines, 925 tests)


Leaked

Claude Code Source

The Complete Leaked TypeScript Source Code

Extracted from Anthropic's npm package via source maps

Stars Forks Watchers Views

TypeScript Files Lines License

Overview · Disclaimer · Architecture · Tools · Commands


⚠️ DISCLAIMER

📚 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.


🌟 Overview

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+

🏗️ Architecture

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

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

🔗 Related

🌐 Live Analysis · 🐍 Python Port · 📦 Official CLI · 📚 Docs


📜 Legal Notice

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.


Repo Size Last Commit

📚 For Educational Purposes Only · Not affiliated with Anthropic

About

Claude Code Source Code - Leaked/Extracted from Anthropic npm package (Educational & Research purposes)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages