Anthropic just accidentally leaked the entire source code for Claude Code! It was exposed on npm, and this backup repo is an absolute engineering goldmine. Want to see exactly how top-tier developers build flagship AI agents? Look under the hood! It runs natively on Bun and uses React with Ink for a beautifully slick terminal UI. A rare look under the hood of a flagship AI product. Worth reading before it disappears.
https://github.com/instructkr/claude-code
Leaked? It’s JS, source code was already available, just minified. This made it easier to read, but nothing groundbreaking.
I'm among the lucky 70k people that actually fetched it from npm before it was yanked.
Probably going to make a plausible git history for all versions leading up to this one as a treat.
I guess Anthropic vibed too hard 😅. It's a goldmine for seeing how professional AI agents are structured, but it’s not the entire source code for Claude Code, just the cli wrapper. So, no, you can’t run Claude locally or for free using this code.