Run Claude Code
v2.1.88from leaked source code - one command setup.
git clone https://github.com/yourname/start-claude-code.git
cd start-claude-code
# Set API key
export ANTHROPIC_API_KEY="sk-ant-xxx"
# Run!
./start.shFirst run will automatically install Bun, dependencies, and configure everything.
export ANTHROPIC_API_KEY="sk-ant-xxx"
./start.shexport ANTHROPIC_API_KEY="sk-ant-xxx"
./start.sh -p "explain this code" --dangerously-skip-permissions < /dev/nullexport ANTHROPIC_BASE_URL="https://your-proxy.com" # Don't include /v1
export ANTHROPIC_API_KEY="your-key"
export DISABLE_PROMPT_CACHING=1
./start.sh -p "hello" --model claude-sonnet-4-20250514 \
--dangerously-skip-permissions --no-session-persistence < /dev/null./start.sh --model claude-sonnet-4-20250514
./start.sh --model claude-opus-4-20250514
./start.sh --model claude-haiku-4-5-20241022If you prefer to set up step by step:
# 1. Install Bun
curl -fsSL https://bun.sh/install | bash
export PATH="$HOME/.bun/bin:$PATH"
# 2. Run setup
node scripts/setup.mjs
# 3. Run
bun src/entrypoints/cli.tsx| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY |
Required. Your API key | - |
ANTHROPIC_BASE_URL |
API base URL (no /v1 suffix) |
https://api.anthropic.com |
ANTHROPIC_MODEL |
Default model | claude-sonnet-4-6 |
DISABLE_PROMPT_CACHING |
Disable prompt caching (needed for most proxies) | 0 |
DISABLE_INTERLEAVED_THINKING |
Disable interleaved thinking | 0 |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS |
Disable experimental beta headers | 0 |
On March 31, 2026, the full source code of Anthropic's Claude Code CLI was leaked via a .map file in their npm registry. This repository contains:
- The complete
src/directory (~1,900 files, 512,000+ lines of TypeScript) - Build shims and stubs to make it runnable from source
- A one-click setup script
Source authenticity: Verified by comparing all 1,902 source files against @anthropic-ai/claude-code@2.1.88's source map — 100% byte-identical match, zero differences.
| Component | Technology |
|---|---|
| Runtime | Bun |
| Language | TypeScript |
| Terminal UI | React + Ink |
| CLI Parser | Commander.js |
| API | Anthropic SDK |
| Code Search | ripgrep (bundled) |
| Protocols | MCP, LSP |
src/
├── main.tsx # CLI entrypoint
├── QueryEngine.ts # Core LLM API caller
├── tools/ # ~40 agent tools (Bash, Edit, Read, etc.)
├── commands/ # ~50 slash commands (/commit, /review, etc.)
├── components/ # ~140 Ink UI components
├── services/ # API, MCP, OAuth, analytics
├── bridge/ # IDE integration (VS Code, JetBrains)
├── coordinator/ # Multi-agent orchestration
├── skills/ # Skill system
├── plugins/ # Plugin system
├── memdir/ # Persistent memory
└── ...
Your proxy doesn't support Claude beta headers. The code auto-disables betas for non-Anthropic URLs, but you can also set:
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
export DISABLE_INTERLEAVED_THINKING=1export DISABLE_PROMPT_CACHING=1Your ANTHROPIC_BASE_URL should NOT include /v1:
# Wrong
export ANTHROPIC_BASE_URL="https://proxy.com/v1"
# Correct
export ANTHROPIC_BASE_URL="https://proxy.com"Always pipe /dev/null to stdin:
bun src/entrypoints/cli.tsx -p "hello" < /dev/nullThis repository archives source code that was leaked from Anthropic's npm registry. All original source code is the property of Anthropic.