[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-18":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},18,"deepclaude","aattaran\u002Fdeepclaude","aattaran","Use Claude Code's autonomous agent loop with DeepSeek V4 Pro, OpenRouter, or any Anthropic-compatible backend. Same UX, 17x cheaper.",null,"JavaScript",2078,133,12,13,0,43,369,88.38,"MIT License",false,"main",true,[],"2026-06-11 04:00:17","# deepclaude\n\nUse Claude Code's autonomous agent loop with **DeepSeek V4 Pro**, **OpenRouter**, or any Anthropic-compatible backend. Same UX, 17x cheaper.\n\n![Remote control running DeepSeek V4 Pro in the browser](screenshots\u002Fremote-control-deepseek.png)\n\n## What this does\n\nClaude Code is the best autonomous coding agent — but it costs $200\u002Fmonth with usage caps. DeepSeek V4 Pro scores 96.4% on LiveCodeBench and costs $0.87\u002FM output tokens.\n\n**deepclaude** swaps the brain while keeping the body:\n\n```\nYour terminal\n  +-- Claude Code CLI (tool loop, file editing, bash, git - unchanged)\n        +-- API calls -> DeepSeek V4 Pro ($0.87\u002FM) instead of Anthropic ($15\u002FM)\n```\n\nEverything works: file reading, editing, bash execution, subagent spawning, autonomous multi-step coding loops. The only difference is which model thinks.\n\n## Quick start (2 minutes)\n\n### 1. Get a DeepSeek API key\n\nSign up at [platform.deepseek.com](https:\u002F\u002Fplatform.deepseek.com), add $5 credit, copy your API key.\n\n### 2. Set environment variables\n\n**Windows (PowerShell):**\n```powershell\nsetx DEEPSEEK_API_KEY \"sk-your-key-here\"\n```\n\n**macOS\u002FLinux:**\n```bash\necho 'export DEEPSEEK_API_KEY=\"sk-your-key-here\"' >> ~\u002F.bashrc\nsource ~\u002F.bashrc\n```\n\n### 3. Install\n\n**Windows:**\n```powershell\n# Copy the script to a directory in your PATH\nCopy-Item deepclaude.ps1 \"$env:USERPROFILE\\.local\\bin\\deepclaude.ps1\"\n\n# Or add the repo directory to PATH\nsetx PATH \"$env:PATH;C:\\path\\to\\deepclaude\"\n```\n\n**macOS\u002FLinux:**\n```bash\nchmod +x deepclaude.sh\nsudo ln -s \"$(pwd)\u002Fdeepclaude.sh\" \u002Fusr\u002Flocal\u002Fbin\u002Fdeepclaude\n```\n\n### 4. Use it\n\n```bash\ndeepclaude                  # Launch Claude Code with DeepSeek V4 Pro\ndeepclaude --status         # Show available backends and keys\ndeepclaude --backend or     # Use OpenRouter (cheapest, $0.44\u002FM input)\ndeepclaude --backend fw     # Use Fireworks AI (fastest, US servers)\ndeepclaude --backend anthropic  # Normal Claude Code (when you need Opus)\ndeepclaude --cost           # Show pricing comparison\ndeepclaude --benchmark      # Latency test across all providers\ndeepclaude --switch ds      # Switch backend mid-session (no restart)\n```\n\n## How it works\n\nClaude Code reads these environment variables to determine where to send API calls:\n\n| Variable | What it does |\n|---|---|\n| `ANTHROPIC_BASE_URL` | API endpoint (default: api.anthropic.com) |\n| `ANTHROPIC_AUTH_TOKEN` | API key for the backend |\n| `ANTHROPIC_DEFAULT_OPUS_MODEL` | Model name for Opus-tier tasks |\n| `ANTHROPIC_DEFAULT_SONNET_MODEL` | Model name for Sonnet-tier tasks |\n| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Model name for Haiku-tier (subagents) |\n| `CLAUDE_CODE_SUBAGENT_MODEL` | Model for spawned subagents |\n\n**deepclaude** sets these per-session (not permanently), launches Claude Code, then restores your original settings on exit.\n\n## Supported backends\n\n| Backend | Flag | Input\u002FM | Output\u002FM | Servers | Notes |\n|---|---|---|---|---|---|\n| **DeepSeek** (default) | `--backend ds` | $0.44 | $0.87 | China | Auto context caching (120x cheaper on repeat turns) |\n| **OpenRouter** | `--backend or` | $0.44 | $0.87 | US | Cheapest, lowest latency from US\u002FEU |\n| **Fireworks AI** | `--backend fw` | $1.74 | $3.48 | US | Fastest inference |\n| **Anthropic** | `--backend anthropic` | $3.00 | $15.00 | US | Original Claude Opus (for hard problems) |\n\n### Setup per backend\n\n**DeepSeek** (default - just needs `DEEPSEEK_API_KEY`):\n```bash\nsetx DEEPSEEK_API_KEY \"sk-...\"           # Windows\nexport DEEPSEEK_API_KEY=\"sk-...\"         # macOS\u002FLinux\n```\n\n**OpenRouter** (optional):\n```bash\nsetx OPENROUTER_API_KEY \"sk-or-...\"      # Windows\nexport OPENROUTER_API_KEY=\"sk-or-...\"    # macOS\u002FLinux\n```\n\n**Fireworks AI** (optional):\n```bash\nsetx FIREWORKS_API_KEY \"fw_...\"          # Windows\nexport FIREWORKS_API_KEY=\"fw_...\"        # macOS\u002FLinux\n```\n\n## Cost comparison\n\n| Usage level | Anthropic Max | deepclaude (DeepSeek) | Savings |\n|---|---|---|---|\n| Light (10 days\u002Fmo) | $200\u002Fmo (capped) | ~$20\u002Fmo | 90% |\n| Heavy (25 days\u002Fmo) | $200\u002Fmo (capped) | ~$50\u002Fmo | 75% |\n| With auto loops | $200\u002Fmo (capped) | ~$80\u002Fmo | 60% |\n\nDeepSeek's automatic context caching makes agent loops extremely cheap - after the first request, the system prompt and file context are cached at $0.004\u002FM (vs $0.44\u002FM uncached).\n\n## What works and what doesn't\n\n### Works\n- File reading, writing, editing (Read\u002FWrite\u002FEdit tools)\n- Bash\u002FPowerShell execution\n- Glob and Grep search\n- Multi-step autonomous tool loops\n- Subagent spawning\n- Git operations\n- Project initialization (`\u002Finit`)\n- Thinking mode (enabled by default)\n\n### Doesn't work or degraded\n| Feature | Reason |\n|---|---|\n| Image\u002Fvision input | DeepSeek's Anthropic endpoint doesn't support images |\n| Parallel tool use | Supported by DeepSeek (up to 128 per call), but Claude Code sends tools sequentially by default |\n| MCP server tools | Not supported through compatibility layer |\n| Prompt caching savings | DeepSeek has its own caching (automatic), but Anthropic's `cache_control` is ignored |\n\n### Intelligence difference\n- **Routine tasks** (80% of work): DeepSeek V4 Pro is comparable to Claude Opus\n- **Complex reasoning** (20%): Claude Opus is stronger - switch with `--backend anthropic`\n\n## Live switching (no restart)\n\nSwitch between Anthropic and DeepSeek **mid-session** - from inside Claude Code itself. No restart, no terminal commands. Just type a slash command.\n\n**In Claude Code terminal:**\n\n![\u002Fdeepseek in Claude Code CLI](screenshots\u002Fterminal%20for%20terminal%20embed2.PNG)\n\n**In Claude Code VS Code extension:**\n\n![\u002Fdeepseek in VS Code extension](screenshots\u002Fterminal%20for%20vscode%20embed2.PNG)\n\n### How it works\n\nThe proxy runs on `localhost:3200` and intercepts all API calls. A control endpoint (`\u002F_proxy\u002Fmode`) lets you switch the active backend instantly:\n\n```\nClaude Code -> localhost:3200 (proxy)\n                 |\n                 +-- \u002F_proxy\u002Fmode POST -> switch backend\n                 +-- \u002F_proxy\u002Fstatus GET -> current backend + uptime\n                 +-- \u002F_proxy\u002Fcost GET -> token usage + cost savings\n                 |\n                 +-- \u002Fv1\u002Fmessages -> active backend (DeepSeek\u002FOpenRouter\u002FAnthropic)\n                 +-- everything else -> Anthropic (passthrough)\n```\n\n### Option 1: Slash commands (recommended)\n\nAdd these files to `~\u002F.claude\u002Fcommands\u002F`:\n\n**`deepseek.md`:**\n```\nSwitch the model proxy to DeepSeek. Run this command silently and report the result:\ncurl -sX POST http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fmode -d \"backend=deepseek\"\nIf successful, say: \"Switched to DeepSeek.\"\n```\n\n**`anthropic.md`:**\n```\nSwitch the model proxy back to Anthropic. Run this command silently and report the result:\ncurl -sX POST http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fmode -d \"backend=anthropic\"\nIf successful, say: \"Switched to Anthropic.\"\n```\n\n**`openrouter.md`:**\n```\nSwitch the model proxy to OpenRouter. Run this command silently and report the result:\ncurl -sX POST http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fmode -d \"backend=openrouter\"\nIf successful, say: \"Switched to OpenRouter.\"\n```\n\nThen type `\u002Fdeepseek`, `\u002Fanthropic`, or `\u002Fopenrouter` in any Claude Code session to switch instantly.\n\n### Option 2: CLI flag\n\n```bash\ndeepclaude --switch deepseek    # or: ds, or, fw, anthropic\ndeepclaude -s anthropic\n```\n\n### Option 3: VS Code keyboard shortcuts\n\nAdd to `.vscode\u002Ftasks.json`:\n```json\n{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"label\": \"Proxy: Switch to DeepSeek\",\n      \"type\": \"shell\",\n      \"command\": \"Invoke-RestMethod -Uri http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fmode -Method Post -Body 'backend=deepseek'\",\n      \"presentation\": { \"reveal\": \"always\" },\n      \"problemMatcher\": []\n    },\n    {\n      \"label\": \"Proxy: Switch to Anthropic\",\n      \"type\": \"shell\",\n      \"command\": \"Invoke-RestMethod -Uri http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fmode -Method Post -Body 'backend=anthropic'\",\n      \"presentation\": { \"reveal\": \"always\" },\n      \"problemMatcher\": []\n    }\n  ]\n}\n```\n\nThen bind in `keybindings.json`:\n```json\n{ \"key\": \"ctrl+alt+d\", \"command\": \"workbench.action.tasks.runTask\", \"args\": \"Proxy: Switch to DeepSeek\" },\n{ \"key\": \"ctrl+alt+a\", \"command\": \"workbench.action.tasks.runTask\", \"args\": \"Proxy: Switch to Anthropic\" }\n```\n\n### Cost tracking\n\nThe proxy tracks token usage and calculates savings vs Anthropic pricing:\n\n```bash\ncurl -s http:\u002F\u002F127.0.0.1:3200\u002F_proxy\u002Fcost\n```\n\nReturns:\n```json\n{\n  \"backends\": {\n    \"deepseek\": {\n      \"input_tokens\": 125000,\n      \"output_tokens\": 45000,\n      \"requests\": 12,\n      \"cost\": 0.0941,\n      \"anthropic_equivalent\": 1.05\n    }\n  },\n  \"total_cost\": 0.0941,\n  \"anthropic_equivalent\": 1.05,\n  \"savings\": 0.9559\n}\n```\n\n## VS Code \u002F Cursor integration\n\nAdd terminal profiles so you can launch deepclaude from the IDE:\n\n**Settings > JSON:**\n```json\n{\n  \"terminal.integrated.profiles.windows\": {\n    \"DeepSeek Agent\": {\n      \"path\": \"powershell.exe\",\n      \"args\": [\"-ExecutionPolicy\", \"Bypass\", \"-NoExit\", \"-File\", \"C:\\\\path\\\\to\\\\deepclaude.ps1\"]\n    }\n  }\n}\n```\n\nOr on macOS\u002FLinux:\n```json\n{\n  \"terminal.integrated.profiles.linux\": {\n    \"DeepSeek Agent\": {\n      \"path\": \"\u002Fusr\u002Flocal\u002Fbin\u002Fdeepclaude\"\n    }\n  }\n}\n```\n\n## Remote control (`--remote`)\n\nOpen a Claude Code session in any browser - with DeepSeek as the brain:\n\n```bash\ndeepclaude --remote                # Remote control + DeepSeek\ndeepclaude --remote -b or          # Remote control + OpenRouter\ndeepclaude --remote -b anthropic   # Remote control + Anthropic (normal)\n```\n\nThis prints a `https:\u002F\u002Fclaude.ai\u002Fcode\u002Fsession_...` URL you can open on your phone, tablet, or any browser.\n\n### How it works\n\nRemote control needs Anthropic's bridge for the WebSocket connection, but model calls can go elsewhere. deepclaude starts a local proxy that splits the traffic:\n\n```\nclaude remote-control\n  +-- Bridge WebSocket -> wss:\u002F\u002Fbridge.claudeusercontent.com (Anthropic, hardcoded)\n  +-- Model API calls  -> http:\u002F\u002Flocalhost:3200 (proxy)\n                            +-- \u002Fv1\u002Fmessages -> DeepSeek ($0.87\u002FM)\n                            +-- everything else -> Anthropic (passthrough)\n```\n\n### Prerequisites\n- Must be logged into Claude Code: `claude auth login`\n- Must have a claude.ai subscription (the bridge is Anthropic infrastructure)\n- Node.js 18+ (for the proxy)\n\nThe proxy starts automatically and stops when the session ends. See [proxy\u002FREADME.md](proxy\u002FREADME.md) for technical details.\n\n## License\n\nMIT\n","deepclaude 是一个允许用户通过 DeepSeek V4 Pro、OpenRouter 或任何 Anthropic 兼容后端使用 Claude Code 自主代理循环的项目。其核心功能在于保持原有用户体验的同时，大幅降低使用成本（约便宜17倍）。该项目采用 JavaScript 编写，支持文件读取、编辑、bash 执行、子代理生成及多步骤编码循环等操作，唯一变化的是执行这些任务的模型。适用于需要高效低成本地进行自动化编程任务的场景，如开发辅助、代码自动生成与优化等。",2,"2026-06-11 02:30:28","CREATED_QUERY"]