Anthropic shipped source maps, so 1,884 TS files walked out
A community effort reconstructed Claude Code's full TypeScript source from an accidentally included source map.

What it does
This repo hosts the reconstructed source of Anthropic’s claude-code CLI tool (v2.1.88), extracted straight from the official npm package’s cli.js.map. Someone at Anthropic left the sourcesContent field populated, and now 4,756 files — including 1,884 .ts/.tsx originals — are browsable on GitHub. The maintainer is upfront: this is unofficial, for research only, and copyright stays with Anthropic.
The interesting bit
Source maps are debug aids, not secrets, yet they routinely carry full source. Anthropic isn’t the first to slip — but the scale here is notable: a full React-based CLI with multi-agent coordination, voice input, a Vim mode, and a plugin system, all laid bare from a single .map file. The extraction was a mechanical sourcesContent dump; the real work was organizing 40+ commands and 30+ tools into a readable tree.
Key highlights
- 1,884 TypeScript files recovered from one source map
- Multi-agent coordinator and KAIROS assistant mode visible in the tree
- MCP, voice, Vim, and plugin systems all present in the restored source
- React Context used throughout a CLI application (not a typo)
- Maintainer explicitly labels it unofficial and research-only
Caveats
- Anthropic could yank or re-release the npm package without source maps at any moment
- Reconstructed structure may not match internal layout; the README warns it “does not represent the original internal development repository structure”
- No build instructions or license to actually run or modify the code
Verdict
Security researchers, CLI tool builders, and the casually nosy should peek. If you’re looking for a maintained fork or a way to self-host Claude Code, this isn’t it — it’s a read-only anatomy lesson, and a reminder to strip your sourcesContent before shipping.