oboard/claude-code-rev
Runnable ClaudeCode source code
📦 What is claude-code-rev?
A community‑run reconstruction of the Claude Code source tree. The original repository is closed‑source, but enough of its JavaScript/TypeScript code survived in source‑maps that volunteers could piece together a working copy. The project ships a CLI that can run Claude‑style AI agents locally, using inference back‑ends that expose an OpenAI‑compatible API (GitHub Models, GitHub Copilot). It is essentially a runnable, open‑source façade of Anthropic’s Claude Code runtime.
✅ Core capabilities
| Feature | What it does |
|---|---|
| Restored CLI | bun run dev starts the original Claude Code command‑line interface, showing the full command tree. |
| Multi‑provider inference | Supports two providers that forward chat requests to GitHub‑hosted endpoints: |
• github-models |
OpenAI‑compatible GitHub Models API. |
• github-copilot |
GitHub Copilot account‑backed endpoint, currently able to run Claude‑family models. |
| Model picker | Inside the CLI you can run /provider and /model to switch providers and choose a specific model (e.g., claude‑opus‑4.6). |
| Skill bundles | Restored claude‑api and verify skill definitions are now usable reference docs rather than empty placeholders. |
| Compatibility shims | Chrome MCP and Computer‑Use MCP layers expose a realistic tool catalog and return structured fallback responses, allowing the agent’s tool‑use loop to function. |
🛠️ Getting started
# 1️⃣ Install the required runtime
# • Bun 1.3.5+ (https://bun.sh)
# • Node 24+ (for type definitions)
bun install # installs dependencies from package.json
bun run dev # launches the restored Claude Code CLI
bun run version # prints the reconstructed version string
Selecting a provider & model
# Use GitHub Models (OpenAI‑compatible)
bun run dev --settings '{"provider":"github-models"}'
# Or pick a concrete model
bun run dev --settings '{"provider":"github-models"}' --model "openai/gpt-4.1"
# Use GitHub Copilot (Claude models)
bun run dev --settings '{"provider":"github-copilot"}'
# Pick a Claude model
bun run dev --settings '{"provider":"github-copilot"}' --model "claude-opus-4.6"
Inside the CLI you can also type:
/provider– open an interactive provider selector./provider info– show which provider is active and any env‑var overrides./model– list models supported by the current provider.
Authentication is looked up in this order:
- Provider‑specific environment variable (e.g.,
GITHUB_MODELS_TOKEN). GH_TOKENGITHUB_TOKEN- Token stored by the GitHub CLI (
gh auth token).
If you prefer the GitHub CLI login flow, run gh auth login first.
⚠️ Known limitations
- Partial restoration – Some private or native modules could not be recovered from source maps; they are replaced by shims or degraded implementations. Behaviour may differ from the original Claude Code.
- Tooling gaps – The Copilot‑hosted GPT/Grok style models are not yet wired; only Claude‑family models work through the current chat/message shim.
- Provider scope – Only GitHub‑based inference endpoints are supported. No direct Anthropic or self‑hosted back‑ends are included.
- Runtime requirement – The project depends on Bun (a relatively new JavaScript runtime). It will not run under plain Node without modification.
📚 Where to look next
README.md– the source of this summary; contains the full command‑line usage.preview.png– a screenshot of the restored CLI.package.json– lists the exact dependencies and Bun scripts.src/– the reconstructed source tree; files marked as shims are clearly commented.
In short, claude-code-rev gives developers a way to experiment with Claude‑style agents locally, even though the original code is proprietary. It works best for exploring the CLI workflow and testing Claude models via GitHub’s inference services.
Related
- Project
- Dispatch
- Project
- Project
- Dispatch