Overview
deepclaude keeps the Claude Code CLI exactly as it is — the tool loop, file editing, bash execution, subagent spawning — and changes only where the model calls go. It works by setting the environment variables Claude Code reads to decide its endpoint (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and the per-tier model names), launching the CLI with them, and restoring your original settings when the session ends. Nothing is written permanently, so a normal `claude` run is unaffected.
Four backends ship out of the box: DeepSeek (the default), OpenRouter, Fireworks AI and Anthropic itself, each selected with a `--backend` flag. The project's own comparison table lists DeepSeek and OpenRouter at $0.44 per million input and $0.87 per million output tokens against Anthropic's $3.00 / $15.00, which is where the README's "17x cheaper" headline comes from.
A second mode runs a local proxy on port 3200 that intercepts `/v1/messages` and passes everything else through to Anthropic. Because the proxy exposes a control endpoint, you can flip the active backend from inside a running session — the README wires it to `/deepseek`, `/anthropic` and `/openrouter` slash commands — and read token usage and accumulated savings from `/_proxy/cost`. The README is explicit about the limits of the compatibility layer: image input, MCP server tools and Anthropic-style `cache_control` prompt caching do not carry over.
What it does
- Per-session environment shim: launches Claude Code against a different backend without changing your permanent configuration
- Four backends behind one flag — DeepSeek, OpenRouter, Fireworks AI and Anthropic — plus `--status`, `--cost` and `--benchmark` helpers
- Local proxy on port 3200 with a control endpoint, so you can switch models mid-session from a slash command instead of restarting
- Cost tracking: `/_proxy/cost` returns tokens, spend and the Anthropic-equivalent price for the same traffic
- `--remote` splits traffic so Claude Code's browser remote-control bridge stays on Anthropic while model calls go to the cheap backend
- Shell scripts for macOS/Linux and PowerShell for Windows, plus VS Code and Cursor terminal-profile snippets
Getting started
deepclaude wraps an existing Claude Code install, so set up the CLI first. The steps below follow the README's two-minute quick start on macOS/Linux; Windows uses `deepclaude.ps1` and `setx` instead.
Set a backend API key
Sign up at platform.deepseek.com and export the key. OPENROUTER_API_KEY and FIREWORKS_API_KEY are optional extras.
echo 'export DEEPSEEK_API_KEY="sk-your-key-here"' >> ~/.bashrc
source ~/.bashrcInstall the launcher
Clone the repo, make the script executable and link it onto your PATH.
chmod +x deepclaude.sh
sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaudeLaunch Claude Code on another backend
With no flags you get DeepSeek. `--status` shows which backends have keys, `--cost` prints the pricing comparison.
deepclaude # DeepSeek
deepclaude --backend or # OpenRouter
deepclaude --backend anthropic # back to ClaudeSwitch backends without restarting
Drop the README's command files into ~/.claude/commands/ and type /deepseek or /anthropic inside a session; each one POSTs to the local proxy.
curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=deepseek"
curl -s http://127.0.0.1:3200/_proxy/costCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Run long autonomous coding loops on a cheap model and reserve the expensive one for the hard problems
- Try a Claude Code workflow against several providers and compare latency with the built-in `--benchmark` mode
- Keep an audit of what an agent session actually cost, and what the same traffic would have cost on Anthropic
- Work from a phone or tablet with `--remote` while the model calls run on a lower-cost backend
How deepclaude compares
deepclaude alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OmniRoute | ★ 81.6k | A local-first AI gateway that fronts hundreds of model providers with one OpenAI-compatible endpoint, quota-aware auto-fallback, many routing strategies and prompt compression. |
| Free Claude Code | ★ 63.8k | A local proxy that points Claude Code, Codex, Pi, OpenCode, Cline and other agent CLIs at 50 free, paid, subscription or local model providers, with automatic failover and an admin UI. |
| LiteLLM | ★ 62.1k | A Python SDK and proxy server that gives one OpenAI-compatible API to 100+ LLM providers, with cost tracking, budgets, fallbacks, rate limiting, and an admin UI. |
| Kong Gateway | ★ 44.3k | A Lua/NGINX API gateway whose AI Gateway plugins put one universal endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and other providers, with semantic routing, caching and MCP traffic governance. |
| 9Router | ★ 31.5k | Local OpenAI-compatible router for coding CLIs that tracks per-provider quota, falls back from subscription to cheap to free models, and compresses tool results to cut tokens. |
| magpie | ★ 22.8k | Menu bar app and local gateway that lets Claude Code, Codex, Gemini CLI and dozens of other coding agents run on any provider's model, with routing groups that fail over across accounts when a quota runs out. |
| OpenCodex | ★ 17.9k | Local proxy that translates the Codex Responses API to 40+ providers, so Codex CLI, Claude Code and Grok Build can run on any model, with routing combos, failover and account pooling. |
| deepclaude | ★ 2.3k | Point Claude Code's agent loop at DeepSeek, OpenRouter or Fireworks and switch backends mid-session |