I reverse-engineered Claude Code
r/LocalLLaMA
•
Generative AI
I reverse-engineered Claude Code and rebuilt the entire SDK in 4 languages. Single file. Uses your existing Pro/Max subscription. Why: Claude Code is a 190MB Bun bundle. I wanted to use its capabilities (streaming, tool calling, multi-turn agent loop) inside my own projects without depending on a massive binary or npm. One file I can copy into any repo was the goal. What I found: The subscription auth protocol requires four things at once - an OAuth token from macOS keychain, specific beta headers, a billing header hidden inside the system prompt, and a browser access header.