Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
AnyModel Claude CLI — run Claude Code with a local multi-provider gateway (OpenAI, Gemini, DeepSeek, OpenRouter).
Jump to setup instructionsFetched from the repository for this visit.
Run Claude-style CLI workflows through a local LiteLLM gateway with OpenAI, Gemini, DeepSeek, or OpenRouter.
This repo is unofficial, local-first, and layered onto a public Claude Code source snapshot. Upstream ownership remains with Anthropic.
Install the local dependencies:
bun install
python3 -m pip install "litellm[proxy]"
Create a safe local env file and check your machine:
./bootstrap-gateway.sh
Open examples/provider-gateway/gateway.env and fill in one provider key:
OPENAI_API_KEYGOOGLE_API_KEY or GEMINI_API_KEYDEEPSEEK_API_KEYOPENROUTER_API_KEYPick a route:
./use-provider auto
# or
./use-provider openai openai-neon "My Local CLI"
# or
./use-provider openrouter
Validate the setup:
./doctor-gateway
./scripts/smoke-test-gateway.sh
Start LiteLLM in one terminal:
cd examples/provider-gateway
./start-litellm.sh
Start the CLI from the repo root in another terminal:
./run-claude.sh
examples/provider-gateway/gateway.env is local-only and gitignored. Do not commit real API keys.
| Area | Current status | Notes |
|---|---|---|
| Bun build from source | Supported in this fork | bun install && bun run build |
| Local LiteLLM gateway routing | Supported in this fork | Routes included for OpenAI, Gemini, DeepSeek, and OpenRouter |
| Provider switching helpers | Supported in this fork | ./use-provider and ./use-openai update the local gateway env |
| Local diagnostics | Supported in this fork | ./doctor-gateway and ./scripts/smoke-test-gateway.sh |
| Official Anthropic support | Not included | This repo is unofficial and not maintained by Anthropic |
| Exact Anthropic parity on non-Anthropic backends | Not guaranteed | Some models or side features may behave differently through LiteLLM |
| Hosted gateway or managed secrets | Not included | The workflow is designed for local development |
| Clean-room reimplementation or upstream relicensing | Not included | This remains a public research/archive snapshot with fork-added tooling |
In gateway mode, the CLI still speaks Anthropic-shaped HTTP, but it does so against a local LiteLLM server instead of Anthropic's hosted API.
Flow:
examples/provider-gateway/gateway.env.ANTHROPIC_BASE_URL points the CLI at local LiteLLM, usually http://127.0.0.1:4000.ANTHROPIC_MODEL selects one of the route names defined in examples/provider-gateway/litellm.yaml.Default route names in this repo:
openai-via-gatewaygemini-via-gatewaydeepseek-via-gatewayopenrouter-via-gatewayThe bundled litellm.yaml uses drop_params: true for better cross-provider compatibility.
Build the CLI:
bun install
bun run typecheck
bun run build
Bootstrap the local env:
./bootstrap-gateway.sh
Pick a provider:
./use-provider openrouter
./use-provider openai openai-neon
./use-provider gemini cyber-fox "Gemini Gateway CLI"
./use-provider auto
./use-openai
Validate before launch:
./doctor-gateway
./scripts/smoke-test-gateway.sh
Start LiteLLM:
cd examples/provider-gateway
./start-litellm.sh
Run the CLI:
cd /path/to/claude-code-main
./run-claude.sh
| Script | What it does | Typical use |
|---|---|---|
./bootstrap-gateway.sh | Confirms repo context, checks Bun/Python/LiteLLM, and creates a safe local gateway.env if missing | First run on a new machine |
./use-provider | Switches ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL, and optional branding | Swap between OpenAI, Gemini, DeepSeek, and OpenRouter |
./use-openai | Shortcut wrapper for ./use-provider openai | Faster OpenAI selection |
./doctor-gateway | Verifies local env, route names, provider keys, and branding values | Quick readiness check before launch |
./run-claude.sh | Root-level wrapper that launches the example gateway workflow | Normal local CLI entrypoint |
examples/provider-gateway/start-litellm.sh | Starts the local LiteLLM proxy using the bundled config | Terminal 1 |
examples/provider-gateway/run-claude.sh | Builds the CLI if needed, then runs it with the local gateway env | Terminal 2 |
./scripts/smoke-test-gateway.sh | Runs safe local validation without making real provider calls | CI and local sanity checks |
examples/provider-gateway/gateway.env is for local use only and is already gitignored.examples/provider-gateway/gateway.env.example is the safe template meant for the repository.ANTHROPIC_API_KEY is the local LiteLLM master key expected by litellm.yaml, not an Anthropic cloud credential.gateway.env or your shell environment..env file or real API key is staged.| Symptom | Likely cause | Fix |
|---|---|---|
Missing .../gateway.env | Local env file has not been created yet | Run ./bootstrap-gateway.sh |
Selected ... but ... API KEY is empty | The chosen provider route does not have a matching key set | Edit examples/provider-gateway/gateway.env and add the matching key |
model route not found in litellm.yaml | ANTHROPIC_MODEL does not match a configured route name | Run ./use-provider ... again or update litellm.yaml deliberately |
LiteLLM is not on PATH | LiteLLM is not installed in your current Python environment | Run python3 -m pip install "litellm[proxy]" |
bun not found | Bun is not installed or your shell has not reloaded PATH | Install Bun, reopen the terminal, and rerun ./bootstrap-gateway.sh |
dist/cli.js missing | The CLI has not been built yet | Run bun run build or just launch ./run-claude.sh and let it build |
| Smoke test fails in CI for provider keys | The example env intentionally leaves provider keys empty | Run the smoke test with --ci or use a local env file with a real provider key |
For a shorter, task-oriented walkthrough, see docs/PRACTICAL_SETUP.md.
This repository contains a mirrored Claude Code source snapshot plus fork-added gateway tooling.
Only files authored in this fork are licensed under LICENSE.fork-additions (MIT), and only for portions authored by the fork maintainer.
Fork-added or fork-authored files include:
doctor-gatewayuse-provideruse-openairun-claude.sh (root wrapper)bootstrap-gateway.shscripts/smoke-test-gateway.shexamples/provider-gateway/start-litellm.shexamples/provider-gateway/run-claude.shexamples/provider-gateway/SETUP.txtexamples/provider-gateway/litellm.yamlexamples/provider-gateway/gateway.env.exampleBUILD_GUIDE.mddocs/PRACTICAL_SETUP.mdAll other files remain subject to their original copyright and license status (if any), and are excluded from the fork-added MIT grant.
This repository still exists as a defensive research and source-exposure archive.
Related research writing:
The essay is dated March 9, 2026 and serves as companion analysis that predates the March 31, 2026 source exposure documented in this repo.
The snapshot is useful for:
Chaofan Shou (@Fried_rice) publicly noted that Claude Code source material was reachable through an exposed .map file in the npm package, which in turn referenced unobfuscated TypeScript sources hosted in Anthropic's R2 bucket.
Claude Code is Anthropic's CLI for interacting with Claude from the terminal to perform engineering tasks such as editing files, running commands, searching codebases, and coordinating workflows.
This repository contains a mirrored src/ snapshot for research and analysis, plus fork-added local gateway tooling.
examples/provider-gateway/oh-my-codexThe README and archive-context work on this branch were AI-assisted and orchestrated with Yeachan Heo's oh-my-codex (OmX), a Codex workflow layer.
$team mode was used for coordinated review of repo fit, wording risk, and architecture consistency.$ralph mode was used for persistent execution, verification, and final sign-off before completion.src/
├── main.tsx # CLI startup and initialization
├── commands.ts # Command registry
├── tools.ts # Tool registry
├── QueryEngine.ts # LLM query engine
├── commands/ # Slash command implementations
├── tools/ # Tool implementations
├── components/ # Ink UI components
├── services/ # Service integrations
├── bridge/ # IDE bridge system
├── coordinator/ # Multi-agent orchestration
├── plugins/ # Plugin loader
└── skills/ # Skill system
| Subsystem | What it does |
|---|---|
src/tools/ | Tool definitions, schemas, permissions, and execution logic |
src/commands/ | Slash command implementations such as review, config, tasks, and doctor flows |
src/services/ | API, MCP, OAuth, LSP, and integration services |
src/bridge/ | IDE bridge code for editors such as VS Code and JetBrains |
src/coordinator/ | Multi-agent coordination and team workflows |
src/plugins/ | Built-in and third-party plugin support |
src/skills/ | Reusable workflow definitions executed through the skill system |
GitHub checked 207h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.