Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rabbit-code-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Rabbit Code CLI
We hacked Claude Code open-source, debugged it from scratch, and made it actually work.
macOS / Linux / Windows (WSL)
The Story · Quick Start · What's Different · Features · License
The Story
Claude Code is arguably the best AI coding CLI in the world. But it's closed-source.
Then claude-code-best did the insane work of decompiling the entire thing — 43 tools, 100+ commands, 5000-line REPL, multi-provider API, MCP protocol, plugin system — all reverse-engineered from the compiled bundle.
We took that, and actually made it run.
It wasn't easy. The decompiled code was riddled with landmines:
- API 500 errors — The
prompt-caching-scope-2026-01-05beta header sendscache_control.scope:"global"on system prompts. The server rejects this from non-official builds. We had to disable all experimental betas. - Empty streaming responses — Opus returns 200 headers but zero events, triggering a non-streaming fallback that sends
thinking: {"type":"adaptive"}— which non-streaming doesn't support. We patchedadjustParamsForNonStreamingto convert adaptive thinking to budget-based. USER_TYPE: undefined— A build-time constant that was never set, causingUser-Agent: (undefined, cli). We inject"external"at runtime.Gates is not defined— A feature-flagged component referenced but never imported. Even wrapped infalse ? ... : [], the assignment still evaluated and crashed.- Version mismatch — Attribution header checked
cc_version, rejecting anything that didn't match the official release.
Every one of these was a dead end until we added file-based debug logging (/tmp/rabbit-code-debug.log) to capture the exact HTTP request/response cycle — because the TUI swallows all stderr output.
The moment it finally worked, we literally said "wow".
Now you can run the full Claude Code experience — with your own API key, your own OAuth, your own branding — completely open.
Quick Start
The fastest way to use Rabbit Code CLI is via npx:
npx rabbit-code-cli
# or shorthand
npx rabbitGlobal Install
You can also install it globally via npm, pnpm, or bun:
# Using npm
npm install -g rabbit-code-cli
# Using pnpm
pnpm add -g rabbit-code-cli
# Using bun
bun add -g rabbit-code-cliUsage
Once installed, you can start the CLI using either:
rabbit
# or
rabbit-code-cliFrom Source
cd rabbit-code-cli
pnpm install
pnpm run build
bun run devThat's it. You should see the RABBIT-CODE ASCII art logo and be ready to code.
Requires Node.js >= 18 (to run) and Bun >= 1.3.11 (to build from source), and an Anthropic API key or Claude Pro subscription.
What's Different
| Official Claude Code | Rabbit Code CLI | |
|---|---|---|
| Source code | Closed | Open |
| Branding | Anthropic | Yours (or ours) |
| API compatibility | Official only | Any Anthropic-compatible endpoint |
| Experimental betas | All enabled | Stable subset only |
| Feature flags | Server-controlled | All false (clean, no dead code paths) |
| Customization | None | Full source access — hack everything |
Key patches we made
fix: disable experimental betas (prompt-caching-scope, redact-thinking, context-management)
fix: set USER_TYPE="external" for correct User-Agent
fix: convert adaptive thinking → budget-based for non-streaming fallback
fix: remove Gates component reference crash
fix: match version for attribution header compatibilityFeatures
Everything from Claude Code, minus the feature-flagged internal stuff:
- Interactive REPL — Rich Ink-based terminal UI, streaming responses, vim mode
- Multi-provider — Anthropic Direct, AWS Bedrock, Google Vertex, Azure Foundry
- 43 Tools — File ops, bash, web search/fetch, glob/grep, agents, MCP, LSP
- 100+ Commands —
/model,/compact,/doctor,/resume,/mcp,/plugin... - MCP Protocol — Full client with stdio, SSE, HTTP transports
- Plugins & Skills — Extensible with custom commands and automation
- Smart Context — Auto git status, CLAUDE.md, memory files, reactive compaction
- Permissions — Granular plan/auto/manual tool permission modes
- Hooks — Pre/post tool use hooks for custom workflows
- Sessions — Resume, export, memory across conversations
Architecture
rabbit-code-cli/
├── src/
│ ├── entrypoints/cli.tsx # Bootstrap + runtime polyfills
│ ├── screens/REPL.tsx # 5000+ line interactive UI
│ ├── services/api/ # Multi-provider API (4 providers)
│ ├── services/mcp/ # MCP client (24 files, 12000+ lines)
│ ├── tools/ # 43 tool implementations
│ ├── commands/ # 100+ slash commands
│ └── components/ # 146 Ink UI components
├── packages/ # Internal workspace packages
├── build.ts # Code-splitting build (→ ~450 chunks)
└── rabbit-code-cli # Launcher scriptContributing
Found a bug? Want to add a feature? PRs welcome.
This project exists because someone was crazy enough to decompile Claude Code, and we were crazy enough to debug it. If that resonates with you — star the repo, fork it, make it yours.
License
Powered by Lovstudio.