claude-shadow
v1.0.1
Published
Use any LLM provider with Claude Code — one command setup, easy toggle on/off
Maintainers
Readme
Claude Proxy
Use any LLM provider with Claude Code. One command setup. Easy toggle on/off.
Quick Start
npm install -g claude-shadow
claude-shadowThe interactive wizard will ask you:
- Which provider? (DeepSeek, OpenRouter, Ollama, Groq, etc.)
- Your API key
- Which model?
- Start server + enable proxy? → Yes!
That's it. Claude Code now uses your chosen LLM.
Commands
| Command | Description |
|---|---|
| claude-shadow | Interactive setup wizard |
| claude-shadow start | Start proxy server in background |
| claude-shadow stop | Stop proxy server |
| claude-shadow on | Point Claude Code to proxy |
| claude-shadow off | Restore native Anthropic |
| claude-shadow status | Show everything |
| claude-shadow add | Add a custom provider |
| claude-shadow restart | Restart the server |
Toggle Between Proxy and Native Claude
claude-shadow on # Use DeepSeek/Gemini/etc.
claude-shadow off # Back to native AnthropicNo manual settings.json editing. The toggle backs up your settings before modifying.
Manual Setup (Custom Port)
If you want to use a different port or set things up manually:
# Run the wizard, it asks which port you want
claude-shadow setup
# Or edit the config directly
cat ~/.claude-shadow/config.json{
"port": 9999,
"apiKey": "sk-your-key",
"provider": "deepseek",
"model": "deepseek-chat",
"apiBaseUrl": "https://api.deepseek.com/chat/completions"
}Then:
claude-shadow start # Start on port 9999
claude-shadow on # Configure Claude Code
claude-shadow off # Restore original settingsBuilt-in Providers
- DeepSeek — deepseek-chat, deepseek-reasoner
- OpenRouter — Claude, Gemini, GPT models via one API
- Ollama — Local models (no API key needed)
- Groq — Fast inference
- SiliconFlow — Chinese provider with DeepSeek/Qwen models
- Volcengine — ByteDance provider
Custom Providers
claude-shadow addEnter name, API URL, key, and models. Works with any OpenAI-compatible API.
How It Works
Claude Code ──(Anthropic format)──▶ localhost:6666 ──(OpenAI format)──▶ DeepSeek/Gemini/etc.claude-shadow runs a local server that:
- Receives Anthropic-format requests from Claude Code
- Converts them to OpenAI format
- Forwards to your chosen provider
- Converts the response back to Anthropic format
- Returns it to Claude Code
Claude Code has no idea it's not talking to Anthropic.
Files
| Path | Purpose |
|---|---|
| ~/.claude-shadow/config.json | Proxy configuration |
| ~/.claude-shadow/settings-backup.json | Original Claude Code settings backup |
| ~/.claude-shadow/custom-providers.json | Your custom providers |
| ~/.claude-shadow/proxy.pid | Server process ID |
Troubleshooting
Server won't start? Check if port is already in use:
lsof -i :6666Claude Code still using Anthropic? Make sure proxy is enabled:
claude-shadow status
claude-shadow onSwitch back to native Claude:
claude-shadow off