···11-# Claude Code — Source Analysis
11+# Claude Code — Leaked Source (2026-03-31)
22+33+> **On March 31, 2026, the full source code of Anthropic's Claude Code CLI was leaked** via a `.map` file exposed in their npm registry.
44+55+---
66+77+## How It Leaked
88+99+[Chaofan Shou (@Fried_rice)](https://x.com/Fried_rice) discovered the leak and posted it publicly:
21033-> An archive of [Anthropic](https://www.anthropic.com)'s official CLI tool **Claude Code** source code, for analysis and educational purposes.
1111+> **"Claude code source code has been leaked via a map file in their npm registry!"**
412>
55-> Reference: [Original tweet](https://x.com/Fried_rice/status/2038894956459290963)
1313+> — [@Fried_rice, March 31, 2026](https://x.com/Fried_rice/status/2038894956459290963)
1414+1515+The source map file in the published npm package contained a reference to the full, unobfuscated TypeScript source, which was downloadable as a zip archive from Anthropic's R2 storage bucket.
616717---
818919## Overview
10201111-Claude Code is a CLI tool that lets you interact with Claude directly from the terminal to perform software engineering tasks — editing files, running commands, searching codebases, managing git workflows, and more.
2121+Claude Code is Anthropic's official CLI tool that lets you interact with Claude directly from the terminal to perform software engineering tasks — editing files, running commands, searching codebases, managing git workflows, and more.
12221313-This repository contains the `src/` directory extracted for study.
2323+This repository contains the leaked `src/` directory.
14242525+- **Leaked on**: 2026-03-31
1526- **Language**: TypeScript
1627- **Runtime**: Bun
1728- **Terminal UI**: React + [Ink](https://github.com/vadimdemedes/ink) (React for CLI)
···241252242253---
243254244244-## License
255255+## Disclaimer
245256246246-This repository is for analysis and educational purposes only. All original source code is copyrighted by [Anthropic](https://www.anthropic.com).
257257+This repository archives source code that was leaked from Anthropic's npm registry on **2026-03-31**. All original source code is the property of [Anthropic](https://www.anthropic.com).