Mirror of r420/sauer/claude-code
Go to file
2026-04-01 11:57:42 -04:00
assistant claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
bootstrap claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
bridge claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
buddy claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
cli claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
commands claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
components claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
constants claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
context claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
coordinator claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
entrypoints claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
hooks claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
ink claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
keybindings claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
memdir claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
migrations claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
moreright claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
native-ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
outputStyles claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
plugins claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
query claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
remote claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
schemas claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
screens claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
server claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
services add LOCAL_MODEL_BASE_URL for local model proxy support (ollama, litellm) 2026-03-31 20:11:46 -04:00
skills claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
state claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
tasks claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
tools claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
types claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
upstreamproxy claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
utils claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
vendor claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
vim claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
voice claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
.gitignore claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
april-fools.png add april fools asset 2026-04-01 11:57:42 -04:00
buddy.mjs add buddy.mjs: standalone BUDDY pet hatching from leaked source algorithms 2026-04-01 02:09:29 -04:00
bun.lock claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
cli.js claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
commands.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
context.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
cost-tracker.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
costHook.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
dialogLaunchers.tsx claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
history.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
ink.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
interactiveHelpers.tsx claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
LICENSE.md claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
main.tsx claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
ollama-proxy.mjs add ollama-proxy.mjs: direct Anthropic-to-Ollama translation, no litellm needed 2026-03-31 20:43:49 -04:00
package.json claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
projectOnboardingState.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
query.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
QueryEngine.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
README.md add ollama-proxy.mjs: direct Anthropic-to-Ollama translation, no litellm needed 2026-03-31 20:43:49 -04:00
replLauncher.tsx claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
sdk-tools.d.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
setup.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
Task.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
tasks.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
Tool.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00
tools.ts claude code v2.1.88 — full source from npm source maps 2026-03-31 19:18:59 -04:00

Claude Code v2.1.88 — Full Source

Source code extracted from @anthropic-ai/claude-code@2.1.88 npm package via source maps.

The 57MB source map (cli.js.map) shipped inside the npm package and pointed to a Cloudflare R2 bucket containing the full TypeScript source. No reverse engineering was performed — Anthropic published it themselves.


Quick Start

Requirements: Node.js 18+

git clone https://github.com/antonoly/claude-code.git
cd claude-code
node cli.js

On first launch, you'll be prompted to log in with your Anthropic account. If you have a Claude Max/Pro subscription, it works immediately — no API key needed.

With an API Key

export ANTHROPIC_API_KEY=sk-ant-...
node cli.js

With AWS Bedrock

export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
node cli.js

With Google Vertex AI

export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
node cli.js

Custom API Endpoint

export ANTHROPIC_BASE_URL=https://your-proxy.example.com
export ANTHROPIC_API_KEY=your-key
node cli.js

With Local Models (Ollama + Qwen3-Coder)

Run Claude Code's UI with a local open-source model. The included ollama-proxy.mjs translates between the Anthropic API format and Ollama, routing model calls locally while auth goes to Anthropic normally.

Requirements: Node.js 18+, Ollama, a Claude subscription (for auth only)

# Step 1: Pull a model with 128K+ context
ollama pull qwen3-coder:30b

# Step 2: Start the proxy (included in this repo)
node ollama-proxy.mjs

# Step 3: Run Claude Code (in another terminal)
ANTHROPIC_BASE_URL=http://localhost:9090 node cli.js

The proxy terminal shows color-coded routing:

  • 🟢 [OLLAMA] — model calls going to your local Qwen3-Coder
  • 🟡 [ANTHROPIC] — auth/config calls going to Anthropic

How it works: Claude Code's bundled cli.js uses the Anthropic SDK which reads ANTHROPIC_BASE_URL. The proxy intercepts /v1/messages (model API) and translates them to Ollama's format, while passing everything else (auth, bootstrap, feature flags) through to api.anthropic.com.

To change the model, edit line 7 in ollama-proxy.mjs. Works with any Ollama model that has 128K+ context — qwen3-coder, qwen3.5, deepseek-r1:32b, llama4, etc.


What's Inside

Stat Value
Lines of TypeScript 512K
Source files 1,923
Built-in tools 43
Package version 2.1.88

Key Findings

  • buddy/ — Full Tamagotchi pet system: 18 species, rarity tiers (1% legendary, 0.01% shiny legendary), 5 stats, gacha PRNG seeded per-user, ASCII art sprites
  • utils/undercover.ts — Auto-activates on public repos. Injects system prompt: "Do not blow your cover." No force-OFF switch
  • outputStyles/ — Anti-distillation defenses: strips tool lists, model info, and thinking content to prevent competitors from scraping behavior
  • coordinator/ — KAIROS/Auto-Dream: autonomous multi-step planning with self-reflection loops
  • context/ — 4-layer context compression: pruning → summarization → truncation → eviction

Source Tree

├── cli.js              # Bundled CLI entry point (12MB)
├── package.json        # Original npm package metadata
├── vendor/             # Native binaries (ripgrep, audio-capture)
├── buddy/              # BUDDY pet system
├── tools/              # 43 built-in tools
├── commands/           # Slash commands
├── components/         # React/Ink terminal UI
├── context/            # Context window management
├── coordinator/        # Multi-agent orchestration
├── hooks/              # Pre/post tool execution hooks
├── plugins/            # Plugin/skill marketplace
├── services/           # API clients, auth, billing
├── skills/             # Built-in skills
├── utils/              # Undercover mode, anti-distillation, models
│   ├── undercover.ts   # "Do not blow your cover"
│   └── model/          # Model definitions, codename stripping
├── voice/              # Voice mode
└── vim/                # Vim keybindings

Full Analysis

Independent architecture analysis with source code evidence:

verified-skill.com/insights/claude-code


Disclaimer

This repository contains source code that was publicly exposed via npm source maps on March 31, 2026. All code was directly readable from the published npm package @anthropic-ai/claude-code@2.1.88. No reverse engineering, decompilation, or circumvention of technical protection measures was performed.