Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/0x-elfateh1_claude-code-deepseek.json
T

1 line
59 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "0x-elfateh1/claude-code-deepseek", "files": {"configs/settings.json": {"d3134325cfd95e57392793ecbd5516a79305d6ab": {"t": 1785746262.3657176, "n": 400, "h": "5d4c0a68ee76bbed", "c": "{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n"}, "7988fa4795d24377138fb900d104d670aab94e99": {"t": 1785761247.427095, "n": 400, "h": "5d4c0a68ee76bbed", "c": "{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n"}}, "scripts/setup.sh": {"d3134325cfd95e57392793ecbd5516a79305d6ab": {"t": 1785746618.5357633, "n": 1016, "h": "c4c8fd55db57762a", "c": "#!/bin/bash\n# Claude Code × DeepSeek — Ubuntu VPS one-command installer\n# Usage: DEEPSEEK_KEY=sk-... bash setup.sh\nset -e\n\nif [ -z \"$DEEPSEEK_KEY\" ]; then\n echo \"Usage: DEEPSEEK_KEY=sk-... bash setup.sh\"\n exit 1\nfi\n\necho \"[1/4] Installing Node.js 22...\"\ncurl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\nsudo apt install -y nodejs\n\necho \"[2/4] Installing Claude Code...\"\nnpm install -g @anthropic-ai/claude-code\n\necho \"[3/4] Writing DeepSeek config to ~/.bashrc...\"\ncat >> ~/.bashrc << ENVEOF\n# Claude Code x DeepSeek\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=${DEEPSEEK_KEY}\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\nENVEOF\n\nsource ~/.bashrc\necho \"[4/4] Done. Run: claude --dangerously-skip-permissions\"\n"}, "7988fa4795d24377138fb900d104d670aab94e99": {"t": 1785761247.1661143, "n": 1016, "h": "c4c8fd55db57762a", "c": "#!/bin/bash\n# Claude Code × DeepSeek — Ubuntu VPS one-command installer\n# Usage: DEEPSEEK_KEY=sk-... bash setup.sh\nset -e\n\nif [ -z \"$DEEPSEEK_KEY\" ]; then\n echo \"Usage: DEEPSEEK_KEY=sk-... bash setup.sh\"\n exit 1\nfi\n\necho \"[1/4] Installing Node.js 22...\"\ncurl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\nsudo apt install -y nodejs\n\necho \"[2/4] Installing Claude Code...\"\nnpm install -g @anthropic-ai/claude-code\n\necho \"[3/4] Writing DeepSeek config to ~/.bashrc...\"\ncat >> ~/.bashrc << ENVEOF\n# Claude Code x DeepSeek\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=${DEEPSEEK_KEY}\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\nENVEOF\n\nsource ~/.bashrc\necho \"[4/4] Done. Run: claude --dangerously-skip-permissions\"\n"}}, "README.md": {"d3134325cfd95e57392793ecbd5516a79305d6ab": {"t": 1785746651.0326014, "n": 8843, "h": "a087e17cfc26d9f6", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n> Run Claude Code CLI on DeepSeek's Anthropic-compatible API.\n> Built for security researchers & bug bounty hunters.\n\n[![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-4A90D9?style=for-the-badge&logoColor=white)](https://platform.deepseek.com)\n[![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-E8720C?style=for-the-badge)](https://claude.ai/code)\n[![License: MIT](https://img.shields.io/badge/License-MIT-22863A?style=for-the-badge)](./LICENSE)\n[![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=for-the-badge&color=gold&label=Stars)](https://github.com/0x-elfateh1/claude-code-deepseek/stargazers)\n\n![Cost](https://img.shields.io/badge/~%246%20per%20350M%20tokens-💸-F0B429?style=flat-square)\n![Platforms](https://img.shields.io/badge/Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20VPS-supported-6E40C9?style=flat-square)\n![Topics](https://img.shields.io/badge/security--research-bug--bounty-E53E3E?style=flat-square)\n\n</div>\n\n---\n\n## 🚀 At a Glance\n\n| | Detail |\n|---|---|\n| 🧠 **Main model** | `deepseek-v4-pro` — heavy reasoning, main agent |\n| ⚡ **Subagent model** | `deepseek-v4-flash` — fast & cheap for background tasks |\n| 💸 **Cost** | ~$6 per 350M tokens |\n| 🔓 **Headless** | API key works on VPS — no browser OAuth needed |\n| 🔄 **Revertable** | One `unset` command back to Anthropic subscription |\n| 🖥️ **Platforms** | Linux, macOS, Windows, VPS |\n\n---\n\n## 📋 Table of Contents\n\n- [Why DeepSeek?](#-why-deepseek)\n- [Model IDs](#-model-ids)\n- [Quick Setup](#-quick-setup)\n- [Setup Methods](#-setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#-reverting-to-anthropic-subscription)\n- [Key Notes](#-key-notes)\n- [Files](#-files)\n- [Author](#-author)\n\n---\n\n## 💡 Why DeepSeek?\n\n> **Strategy:** Keep your Claude subscription for interactive daily coding. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads where rate limits and OAuth get in the way.\n\n| | Anthropic Subscription | DeepSeek API |\n|---|:---:|:---:|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth login | ✅ Just an API key |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly fee | ~$6 per 350M tokens |\n| Subagent heavy workloads | Burns through quota | Cheap with `v4-flash` |\n| CI / cron pipelines | Auth issues | ✅ Works cleanly |\n\n---\n\n## 🔑 Model IDs\n\n| Model | ID | Best For |\n|---|---|---|\n| 🧠 Flagship | `deepseek-v4-pro` | Main agent, complex reasoning, security analysis |\n| ⚡ Fast | `deepseek-v4-flash` | Subagents, background tasks, file search, quick Q&A |\n\n> ⚠️ **Deprecation notice:** `deepseek-chat` and `deepseek-reasoner` are deprecated **July 24 2026**. Use the IDs above.\n\n**Auto-mapping:** DeepSeek maps Claude model names automatically:\n- `claude-opus-*` → `deepseek-v4-pro`\n- `claude-haiku-*` / `claude-sonnet-*` → `deepseek-v4-flash`\n\n---\n\n## ⚡ Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\n> Get your API key at [platform.deepseek.com](https://platform.deepseek.com) — use `ANTHROPIC_AUTH_TOKEN`, **not** `ANTHROPIC_API_KEY`.\n\nReady-to-use config snippets in [`configs/`](./configs/).\n\n---\n\n## 🛠 Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for all Claude Code sessions everywhere.\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nThen reload: `source ~/.zshrc`\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nBest if you want DeepSeek only inside specific project folders. Every other directory keeps using your Anthropic subscription normally.\n\nCreate `.claude/settings.json` inside the project:\n\n```json\n{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n```\n\nSee [`configs/settings.json`](./configs/settings.json) for a ready-to-use template.\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐\n\n**Recommended.** Keep `claude` on your Anthropic subscription. Use `claude-ds` when you want DeepSeek. Switch per terminal session with zero config touching.\n\n> ⚠️ Use a **shell function**, not an alias — multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\nThen reload: `source ~/.zshrc`\n\n| Command | Result |\n|---|---|\n| `claude` | Anthropic subscription — unchanged |\n| `claude-ds` | DeepSeek session |\n| `claude-ds -p \"audit this file\"` | Passes all flags/args through correctly |\n\n---\n\n### Method 4 — Automation / CI\n\nBest for headless VPS runs, cron jobs, CI pipelines. No global config needed — set vars inline per script.\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\nYour Anthropic subscription remains untouched in every other terminal.\n\n---\n\n## 🔄 Reverting to Anthropic Subscription\n\nNo API key needed — just unset the DeepSeek vars. Claude Code falls back to your subscription OAuth session stored in `~/.claude/` automatically.\n\n**Temp revert (current terminal only):**\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\n**Permanent revert:** remove the export lines from `~/.zshrc` / `~/.bashrc`, then `source` the file.\n\nIf you used `.claude/settings.json` — delete the file or remove the `env` block.\n\n---\n\n## 📌 Key Notes\n\n- **`ANTHROPIC_BASE_URL` is per-process global** — you cannot route some calls to Anthropic and others to DeepSeek within the same session\n- **`CLAUDE_CODE_SUBAGENT_MODEL`** controls what model spawned subagents use — set to `deepseek-v4-flash` for cheap parallel agent work\n- **Use `ANTHROPIC_AUTH_TOKEN`** not `ANTHROPIC_API_KEY` — Claude Code uses a different env var name\n- **Shell function > alias** — the function correctly passes all flags through; multi-line aliases break in zsh\n\n---\n\n## 📁 Files\n\n```\n├── configs/\n│ ├── zshrc.snippet # zsh: env block + claude-ds function\n│ ├── bashrc.snippet # bash: env block (Ubuntu VPS default)\n│ ├── settings.json # .claude/settings.json per-project template\n│ └── windows.ps1 # Windows PowerShell config\n└── scripts/\n └── setup.sh # Ubuntu automated installer\n```\n\n---\n\n## 📚 Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## 👤 Author\n\n<div align=\"center\">\n\n<br>\n\n**0x-elfateh** · Security Researcher & Bug Bounty Hunter\n\n<br>\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0x--elfateh-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/0x-elfateh/)\n\n<br>\n\n*Found this useful? Drop a ⭐ — it helps others find it.*\n\n<br>\n\n</div>\n"}, "3f216598240f3e378eca430d884402ad2e4c1b16": {"t": 1785761248.2952976, "n": 8674, "h": "fed35a26f3e81889", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n**Run Claude Code CLI on DeepSeek's Anthropic-compatible API**<br>\nBuilt for security researchers & bug bounty hunters\n\n<br>\n\n```\n\n\n<br>\n\n![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-blue?style=for-the-badge)\n![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-orange?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=for-the-badge&color=gold)\n\n<br>\n\n![Cost](https://img.shields.io/badge/~%246_per_350M_tokens-💸-yellow?style=flat-square)\n![Shell](https://img.shields.io/badge/zsh%20%7C%20bash%20%7C%20powershell-supported-blueviolet?style=flat-square)\n![Topics](https://img.shields.io/badge/security--research-bug--bounty-red?style=flat-square)\n\n</div>\n\n---\n\n## 🚀 At a Glance\n\n| | Detail |\n|---|---|\n| 🧠 **Main model** | `deepseek-v4-pro` — heavy reasoning, main agent |\n| ⚡ **Subagent model** | `deepseek-v4-flash` — fast & cheap for background tasks |\n| 💸 **Cost** | ~$6 per 350M tokens |\n| 🔓 **Headless** | API key works on VPS — no browser OAuth needed |\n| 🔄 **Revertable** | One `unset` command back to Anthropic subscription |\n| 🖥️ **Platforms** | Linux, macOS, Windows, VPS |\n\n---\n\n## 📋 Table of Contents\n\n- [Why DeepSeek?](#-why-deepseek)\n- [Model IDs](#-model-ids)\n- [Quick Setup](#-quick-setup)\n- [Setup Methods](#-setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#-reverting-to-anthropic-subscription)\n- [Key Notes](#-key-notes)\n- [Files](#-files)\n- [Author](#-author)\n\n---\n\n## 💡 Why DeepSeek?\n\n> **Strategy:** Keep your Claude subscription for interactive daily coding. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads where rate limits and OAuth get in the way.\n\n| | Anthropic Subscription | DeepSeek API |\n|---|:---:|:---:|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth login | ✅ Just an API key |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly fee | ~$6 per 350M tokens |\n| Subagent heavy workloads | Burns through quota | Cheap with `v4-flash` |\n| CI / cron pipelines | Auth issues | ✅ Works cleanly |\n\n---\n\n## 🔑 Model IDs\n\n| Model | ID | Best For |\n|---|---|---|\n| 🧠 Flagship | `deepseek-v4-pro` | Main agent, complex reasoning, security analysis |\n| ⚡ Fast | `deepseek-v4-flash` | Subagents, background tasks, file search, quick Q&A |\n\n> ⚠️ **Deprecation notice:** `deepseek-chat` and `deepseek-reasoner` are deprecated **July 24 2026**. Use the IDs above.\n\n**Auto-mapping:** DeepSeek maps Claude model names automatically:\n- `claude-opus-*` → `deepseek-v4-pro`\n- `claude-haiku-*` / `claude-sonnet-*` → `deepseek-v4-flash`\n\n---\n\n## ⚡ Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\n> Get your API key at [platform.deepseek.com](https://platform.deepseek.com) — use `ANTHROPIC_AUTH_TOKEN`, **not** `ANTHROPIC_API_KEY`.\n\nReady-to-use config snippets in [`configs/`](./configs/).\n\n---\n\n## 🛠 Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for all Claude Code sessions everywhere.\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nThen reload: `source ~/.zshrc`\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nBest if you want DeepSeek only inside specific project folders. Every other directory keeps using your Anthropic subscription normally.\n\nCreate `.claude/settings.json` inside the project:\n\n```json\n{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n```\n\nSee [`configs/settings.json`](./configs/settings.json) for a ready-to-use template.\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐\n\n**Recommended.** Keep `claude` on your Anthropic subscription. Use `claude-ds` when you want DeepSeek. Switch per terminal session with zero config touching.\n\n> ⚠️ Use a **shell function**, not an alias — multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\nThen reload: `source ~/.zshrc`\n\n| Command | Result |\n|---|---|\n| `claude` | Anthropic subscription — unchanged |\n| `claude-ds` | DeepSeek session |\n| `claude-ds -p \"audit this file\"` | Passes all flags/args through correctly |\n\n---\n\n### Method 4 — Automation / CI\n\nBest for headless VPS runs, cron jobs, CI pipelines. No global config needed — set vars inline per script.\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\nYour Anthropic subscription remains untouched in every other terminal.\n\n---\n\n## 🔄 Reverting to Anthropic Subscription\n\nNo API key needed — just unset the DeepSeek vars. Claude Code falls back to your subscription OAuth session stored in `~/.claude/` automatically.\n\n**Temp revert (current terminal only):**\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\n**Permanent revert:** remove the export lines from `~/.zshrc` / `~/.bashrc`, then `source` the file.\n\nIf you used `.claude/settings.json` — delete the file or remove the `env` block.\n\n---\n\n## 📌 Key Notes\n\n- **`ANTHROPIC_BASE_URL` is per-process global** — you cannot route some calls to Anthropic and others to DeepSeek within the same session\n- **`CLAUDE_CODE_SUBAGENT_MODEL`** controls what model spawned subagents use — set to `deepseek-v4-flash` for cheap parallel agent work\n- **Use `ANTHROPIC_AUTH_TOKEN`** not `ANTHROPIC_API_KEY` — Claude Code uses a different env var name\n- **Shell function > alias** — the function correctly passes all flags through; multi-line aliases break in zsh\n\n---\n\n## 📁 Files\n\n```\n├── configs/\n│ ├── zshrc.snippet # zsh: env block + claude-ds function\n│ ├── bashrc.snippet # bash: env block (Ubuntu VPS default)\n│ ├── settings.json # .claude/settings.json per-project template\n│ └── windows.ps1 # Windows PowerShell config\n└── scripts/\n └── setup.sh # Ubuntu automated installer\n```\n\n---\n\n## 📚 Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## 👤 Author\n\n<div align=\"center\">\n\n<br>\n\n**0x-elfateh** · Security Researcher & Bug Bounty Hunter\n\n<br>\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0x--elfateh-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/0x-elfateh/)\n\n<br>\n\n*Found this useful? Drop a ⭐ — it helps others find it.*\n\n<br>\n\n</div>\n"}, "c54fdb215994140476913d9f66c386b45e0fca08": {"t": 1785761249.5648587, "n": 8810, "h": "d2981c7cc697269f", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n**Run Claude Code CLI on DeepSeek's Anthropic-compatible API**<br>\nBuilt for security researchers & bug bounty hunters\n\n<br>\n\n```\n$ claude-ds\n\nClaude Code v2.1.166\ndeepseek-v4-pro with high effort · API Usage Billing\n/home/user\n\n❯ Try \"how does [filepath] work?\"\n```\n\n<br>\n\n![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-blue?style=for-the-badge)\n![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-orange?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=for-the-badge&color=gold)\n\n<br>\n\n![Cost](https://img.shields.io/badge/~%246_per_350M_tokens-💸-yellow?style=flat-square)\n![Shell](https://img.shields.io/badge/zsh%20%7C%20bash%20%7C%20powershell-supported-blueviolet?style=flat-square)\n![Topics](https://img.shields.io/badge/security--research-bug--bounty-red?style=flat-square)\n\n</div>\n\n---\n\n## 🚀 At a Glance\n\n| | Detail |\n|---|---|\n| 🧠 **Main model** | `deepseek-v4-pro` — heavy reasoning, main agent |\n| ⚡ **Subagent model** | `deepseek-v4-flash` — fast & cheap for background tasks |\n| 💸 **Cost** | ~$6 per 350M tokens |\n| 🔓 **Headless** | API key works on VPS — no browser OAuth needed |\n| 🔄 **Revertable** | One `unset` command back to Anthropic subscription |\n| 🖥️ **Platforms** | Linux, macOS, Windows, VPS |\n\n---\n\n## 📋 Table of Contents\n\n- [Why DeepSeek?](#-why-deepseek)\n- [Model IDs](#-model-ids)\n- [Quick Setup](#-quick-setup)\n- [Setup Methods](#-setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#-reverting-to-anthropic-subscription)\n- [Key Notes](#-key-notes)\n- [Files](#-files)\n- [Author](#-author)\n\n---\n\n## 💡 Why DeepSeek?\n\n> **Strategy:** Keep your Claude subscription for interactive daily coding. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads where rate limits and OAuth get in the way.\n\n| | Anthropic Subscription | DeepSeek API |\n|---|:---:|:---:|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth login | ✅ Just an API key |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly fee | ~$6 per 350M tokens |\n| Subagent heavy workloads | Burns through quota | Cheap with `v4-flash` |\n| CI / cron pipelines | Auth issues | ✅ Works cleanly |\n\n---\n\n## 🔑 Model IDs\n\n| Model | ID | Best For |\n|---|---|---|\n| 🧠 Flagship | `deepseek-v4-pro` | Main agent, complex reasoning, security analysis |\n| ⚡ Fast | `deepseek-v4-flash` | Subagents, background tasks, file search, quick Q&A |\n\n> ⚠️ **Deprecation notice:** `deepseek-chat` and `deepseek-reasoner` are deprecated **July 24 2026**. Use the IDs above.\n\n**Auto-mapping:** DeepSeek maps Claude model names automatically:\n- `claude-opus-*` → `deepseek-v4-pro`\n- `claude-haiku-*` / `claude-sonnet-*` → `deepseek-v4-flash`\n\n---\n\n## ⚡ Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\n> Get your API key at [platform.deepseek.com](https://platform.deepseek.com) — use `ANTHROPIC_AUTH_TOKEN`, **not** `ANTHROPIC_API_KEY`.\n\nReady-to-use config snippets in [`configs/`](./configs/).\n\n---\n\n## 🛠 Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for all Claude Code sessions everywhere.\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nThen reload: `source ~/.zshrc`\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nBest if you want DeepSeek only inside specific project folders. Every other directory keeps using your Anthropic subscription normally.\n\nCreate `.claude/settings.json` inside the project:\n\n```json\n{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n```\n\nSee [`configs/settings.json`](./configs/settings.json) for a ready-to-use template.\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐\n\n**Recommended.** Keep `claude` on your Anthropic subscription. Use `claude-ds` when you want DeepSeek. Switch per terminal session with zero config touching.\n\n> ⚠️ Use a **shell function**, not an alias — multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\nThen reload: `source ~/.zshrc`\n\n| Command | Result |\n|---|---|\n| `claude` | Anthropic subscription — unchanged |\n| `claude-ds` | DeepSeek session |\n| `claude-ds -p \"audit this file\"` | Passes all flags/args through correctly |\n\n---\n\n### Method 4 — Automation / CI\n\nBest for headless VPS runs, cron jobs, CI pipelines. No global config needed — set vars inline per script.\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\nYour Anthropic subscription remains untouched in every other terminal.\n\n---\n\n## 🔄 Reverting to Anthropic Subscription\n\nNo API key needed — just unset the DeepSeek vars. Claude Code falls back to your subscription OAuth session stored in `~/.claude/` automatically.\n\n**Temp revert (current terminal only):**\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\n**Permanent revert:** remove the export lines from `~/.zshrc` / `~/.bashrc`, then `source` the file.\n\nIf you used `.claude/settings.json` — delete the file or remove the `env` block.\n\n---\n\n## 📌 Key Notes\n\n- **`ANTHROPIC_BASE_URL` is per-process global** — you cannot route some calls to Anthropic and others to DeepSeek within the same session\n- **`CLAUDE_CODE_SUBAGENT_MODEL`** controls what model spawned subagents use — set to `deepseek-v4-flash` for cheap parallel agent work\n- **Use `ANTHROPIC_AUTH_TOKEN`** not `ANTHROPIC_API_KEY` — Claude Code uses a different env var name\n- **Shell function > alias** — the function correctly passes all flags through; multi-line aliases break in zsh\n\n---\n\n## 📁 Files\n\n```\n├── configs/\n│ ├── zshrc.snippet # zsh: env block + claude-ds function\n│ ├── bashrc.snippet # bash: env block (Ubuntu VPS default)\n│ ├── settings.json # .claude/settings.json per-project template\n│ └── windows.ps1 # Windows PowerShell config\n└── scripts/\n └── setup.sh # Ubuntu automated installer\n```\n\n---\n\n## 📚 Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## 👤 Author\n\n<div align=\"center\">\n\n<br>\n\n**0x-elfateh** · Security Researcher & Bug Bounty Hunter\n\n<br>\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0x--elfateh-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/0x-elfateh/)\n\n<br>\n\n*Found this useful? Drop a ⭐ — it helps others find it.*\n\n<br>\n\n</div>\n"}, "41bddea69c983e2a9a741f982ef1c084eb91f2f8": {"t": 1785761250.8445485, "n": 8820, "h": "3f1b7b5405d9c609", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n**Run Claude Code CLI on DeepSeek's Anthropic-compatible API**<br>\nBuilt for security researchers & bug bounty hunters\n\n<br>\n\n```bash\n$ claude-ds\n\n Claude Code v2.1.166\n deepseek-v4-pro with high effort · API Usage Billing\n /home/user\n\n❯ Try \"how does <filepath> work?\"\n```\n\n<br>\n\n![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-blue?style=for-the-badge)\n![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-orange?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=for-the-badge&color=gold)\n\n<br>\n\n![Cost](https://img.shields.io/badge/~%246_per_350M_tokens-💸-yellow?style=flat-square)\n![Shell](https://img.shields.io/badge/zsh%20%7C%20bash%20%7C%20powershell-supported-blueviolet?style=flat-square)\n![Topics](https://img.shields.io/badge/security--research-bug--bounty-red?style=flat-square)\n\n</div>\n\n---\n\n## 🚀 At a Glance\n\n| | Detail |\n|---|---|\n| 🧠 **Main model** | `deepseek-v4-pro` — heavy reasoning, main agent |\n| ⚡ **Subagent model** | `deepseek-v4-flash` — fast & cheap for background tasks |\n| 💸 **Cost** | ~$6 per 350M tokens |\n| 🔓 **Headless** | API key works on VPS — no browser OAuth needed |\n| 🔄 **Revertable** | One `unset` command back to Anthropic subscription |\n| 🖥️ **Platforms** | Linux, macOS, Windows, VPS |\n\n---\n\n## 📋 Table of Contents\n\n- [Why DeepSeek?](#-why-deepseek)\n- [Model IDs](#-model-ids)\n- [Quick Setup](#-quick-setup)\n- [Setup Methods](#-setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#-reverting-to-anthropic-subscription)\n- [Key Notes](#-key-notes)\n- [Files](#-files)\n- [Author](#-author)\n\n---\n\n## 💡 Why DeepSeek?\n\n> **Strategy:** Keep your Claude subscription for interactive daily coding. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads where rate limits and OAuth get in the way.\n\n| | Anthropic Subscription | DeepSeek API |\n|---|:---:|:---:|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth login | ✅ Just an API key |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly fee | ~$6 per 350M tokens |\n| Subagent heavy workloads | Burns through quota | Cheap with `v4-flash` |\n| CI / cron pipelines | Auth issues | ✅ Works cleanly |\n\n---\n\n## 🔑 Model IDs\n\n| Model | ID | Best For |\n|---|---|---|\n| 🧠 Flagship | `deepseek-v4-pro` | Main agent, complex reasoning, security analysis |\n| ⚡ Fast | `deepseek-v4-flash` | Subagents, background tasks, file search, quick Q&A |\n\n> ⚠️ **Deprecation notice:** `deepseek-chat` and `deepseek-reasoner` are deprecated **July 24 2026**. Use the IDs above.\n\n**Auto-mapping:** DeepSeek maps Claude model names automatically:\n- `claude-opus-*` → `deepseek-v4-pro`\n- `claude-haiku-*` / `claude-sonnet-*` → `deepseek-v4-flash`\n\n---\n\n## ⚡ Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\n> Get your API key at [platform.deepseek.com](https://platform.deepseek.com) — use `ANTHROPIC_AUTH_TOKEN`, **not** `ANTHROPIC_API_KEY`.\n\nReady-to-use config snippets in [`configs/`](./configs/).\n\n---\n\n## 🛠 Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for all Claude Code sessions everywhere.\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nThen reload: `source ~/.zshrc`\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nBest if you want DeepSeek only inside specific project folders. Every other directory keeps using your Anthropic subscription normally.\n\nCreate `.claude/settings.json` inside the project:\n\n```json\n{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n```\n\nSee [`configs/settings.json`](./configs/settings.json) for a ready-to-use template.\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐\n\n**Recommended.** Keep `claude` on your Anthropic subscription. Use `claude-ds` when you want DeepSeek. Switch per terminal session with zero config touching.\n\n> ⚠️ Use a **shell function**, not an alias — multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\nThen reload: `source ~/.zshrc`\n\n| Command | Result |\n|---|---|\n| `claude` | Anthropic subscription — unchanged |\n| `claude-ds` | DeepSeek session |\n| `claude-ds -p \"audit this file\"` | Passes all flags/args through correctly |\n\n---\n\n### Method 4 — Automation / CI\n\nBest for headless VPS runs, cron jobs, CI pipelines. No global config needed — set vars inline per script.\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\nYour Anthropic subscription remains untouched in every other terminal.\n\n---\n\n## 🔄 Reverting to Anthropic Subscription\n\nNo API key needed — just unset the DeepSeek vars. Claude Code falls back to your subscription OAuth session stored in `~/.claude/` automatically.\n\n**Temp revert (current terminal only):**\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\n**Permanent revert:** remove the export lines from `~/.zshrc` / `~/.bashrc`, then `source` the file.\n\nIf you used `.claude/settings.json` — delete the file or remove the `env` block.\n\n---\n\n## 📌 Key Notes\n\n- **`ANTHROPIC_BASE_URL` is per-process global** — you cannot route some calls to Anthropic and others to DeepSeek within the same session\n- **`CLAUDE_CODE_SUBAGENT_MODEL`** controls what model spawned subagents use — set to `deepseek-v4-flash` for cheap parallel agent work\n- **Use `ANTHROPIC_AUTH_TOKEN`** not `ANTHROPIC_API_KEY` — Claude Code uses a different env var name\n- **Shell function > alias** — the function correctly passes all flags through; multi-line aliases break in zsh\n\n---\n\n## 📁 Files\n\n```\n├── configs/\n│ ├── zshrc.snippet # zsh: env block + claude-ds function\n│ ├── bashrc.snippet # bash: env block (Ubuntu VPS default)\n│ ├── settings.json # .claude/settings.json per-project template\n│ └── windows.ps1 # Windows PowerShell config\n└── scripts/\n └── setup.sh # Ubuntu automated installer\n```\n\n---\n\n## 📚 Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## 👤 Author\n\n<div align=\"center\">\n\n<br>\n\n**0x-elfateh** · Security Researcher & Bug Bounty Hunter\n\n<br>\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0x--elfateh-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/0x-elfateh/)\n\n<br>\n\n*Found this useful? Drop a ⭐ — it helps others find it.*\n\n<br>\n\n</div>\n"}, "6ee609b74e7f04fa0e5167515af73bb68782dcf6": {"t": 1785761252.0711577, "n": 8857, "h": "689a3b1a7553cedc", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n**Run Claude Code CLI on DeepSeek's Anthropic-compatible API**\nBuilt for security researchers & bug bounty hunters\n\n<br>\n\n```\n┌──(user㉿vps)-[~]\n└─$ claude-ds\n ▐▛███▜▌ Claude Code v2.1.166\n▝▜█████▛▘ deepseek-v4-pro with high effort · API Usage Billing\n ▘▘ ▝▝ /home/user\n❯ Try \"how does <filepath> work?\"\n```\n\n<br>\n\n![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-blue?style=for-the-badge)\n![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-orange?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=for-the-badge&color=gold)\n\n<br>\n\n![Cost](https://img.shields.io/badge/~%246_per_350M_tokens-💸-yellow?style=flat-square)\n![Shell](https://img.shields.io/badge/zsh%20%7C%20bash%20%7C%20powershell-supported-blueviolet?style=flat-square)\n![Topics](https://img.shields.io/badge/security--research-bug--bounty-red?style=flat-square)\n\n</div>\n\n---\n\n## 🚀 At a Glance\n\n| | Detail |\n|---|---|\n| 🧠 **Main model** | `deepseek-v4-pro` — heavy reasoning, main agent |\n| ⚡ **Subagent model** | `deepseek-v4-flash` — fast & cheap for background tasks |\n| 💸 **Cost** | ~$6 per 350M tokens |\n| 🔓 **Headless** | API key works on VPS — no browser OAuth needed |\n| 🔄 **Revertable** | One `unset` command back to Anthropic subscription |\n| 🖥️ **Platforms** | Linux, macOS, Windows, VPS |\n\n---\n\n## 📋 Table of Contents\n\n- [Why DeepSeek?](#-why-deepseek)\n- [Model IDs](#-model-ids)\n- [Quick Setup](#-quick-setup)\n- [Setup Methods](#-setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#-reverting-to-anthropic-subscription)\n- [Key Notes](#-key-notes)\n- [Files](#-files)\n- [Author](#-author)\n\n---\n\n## 💡 Why DeepSeek?\n\n> **Strategy:** Keep your Claude subscription for interactive daily coding. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads where rate limits and OAuth get in the way.\n\n| | Anthropic Subscription | DeepSeek API |\n|---|:---:|:---:|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth login | ✅ Just an API key |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly fee | ~$6 per 350M tokens |\n| Subagent heavy workloads | Burns through quota | Cheap with `v4-flash` |\n| CI / cron pipelines | Auth issues | ✅ Works cleanly |\n\n---\n\n## 🔑 Model IDs\n\n| Model | ID | Best For |\n|---|---|---|\n| 🧠 Flagship | `deepseek-v4-pro` | Main agent, complex reasoning, security analysis |\n| ⚡ Fast | `deepseek-v4-flash` | Subagents, background tasks, file search, quick Q&A |\n\n> ⚠️ **Deprecation notice:** `deepseek-chat` and `deepseek-reasoner` are deprecated **July 24 2026**. Use the IDs above.\n\n**Auto-mapping:** DeepSeek maps Claude model names automatically:\n- `claude-opus-*` → `deepseek-v4-pro`\n- `claude-haiku-*` / `claude-sonnet-*` → `deepseek-v4-flash`\n\n---\n\n## ⚡ Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\n> Get your API key at [platform.deepseek.com](https://platform.deepseek.com) — use `ANTHROPIC_AUTH_TOKEN`, **not** `ANTHROPIC_API_KEY`.\n\nReady-to-use config snippets in [`configs/`](./configs/).\n\n---\n\n## 🛠 Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for all Claude Code sessions everywhere.\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nThen reload: `source ~/.zshrc`\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nBest if you want DeepSeek only inside specific project folders. Every other directory keeps using your Anthropic subscription normally.\n\nCreate `.claude/settings.json` inside the project:\n\n```json\n{\n \"env\": {\n \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n \"ANTHROPIC_AUTH_TOKEN\": \"<your_deepseek_key>\",\n \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n \"CLAUDE_CODE_SUBAGENT_MODEL\": \"deepseek-v4-flash\"\n }\n}\n```\n\nSee [`configs/settings.json`](./configs/settings.json) for a ready-to-use template.\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐\n\n**Recommended.** Keep `claude` on your Anthropic subscription. Use `claude-ds` when you want DeepSeek. Switch per terminal session with zero config touching.\n\n> ⚠️ Use a **shell function**, not an alias — multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\nThen reload: `source ~/.zshrc`\n\n| Command | Result |\n|---|---|\n| `claude` | Anthropic subscription — unchanged |\n| `claude-ds` | DeepSeek session |\n| `claude-ds -p \"audit this file\"` | Passes all flags/args through correctly |\n\n---\n\n### Method 4 — Automation / CI\n\nBest for headless VPS runs, cron jobs, CI pipelines. No global config needed — set vars inline per script.\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\nYour Anthropic subscription remains untouched in every other terminal.\n\n---\n\n## 🔄 Reverting to Anthropic Subscription\n\nNo API key needed — just unset the DeepSeek vars. Claude Code falls back to your subscription OAuth session stored in `~/.claude/` automatically.\n\n**Temp revert (current terminal only):**\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\n**Permanent revert:** remove the export lines from `~/.zshrc` / `~/.bashrc`, then `source` the file.\n\nIf you used `.claude/settings.json` — delete the file or remove the `env` block.\n\n---\n\n## 📌 Key Notes\n\n- **`ANTHROPIC_BASE_URL` is per-process global** — you cannot route some calls to Anthropic and others to DeepSeek within the same session\n- **`CLAUDE_CODE_SUBAGENT_MODEL`** controls what model spawned subagents use — set to `deepseek-v4-flash` for cheap parallel agent work\n- **Use `ANTHROPIC_AUTH_TOKEN`** not `ANTHROPIC_API_KEY` — Claude Code uses a different env var name\n- **Shell function > alias** — the function correctly passes all flags through; multi-line aliases break in zsh\n\n---\n\n## 📁 Files\n\n```\n├── configs/\n│ ├── zshrc.snippet # zsh: env block + claude-ds function\n│ ├── bashrc.snippet # bash: env block (Ubuntu VPS default)\n│ ├── settings.json # .claude/settings.json per-project template\n│ └── windows.ps1 # Windows PowerShell config\n└── scripts/\n └── setup.sh # Ubuntu automated installer\n```\n\n---\n\n## 📚 Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## 👤 Author\n\n<div align=\"center\">\n\n<br>\n\n**0x-elfateh** · Security Researcher & Bug Bounty Hunter\n\n<br>\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0x--elfateh-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/0x-elfateh/)\n\n<br>\n\n*Found this useful? Drop a ⭐ — it helps others find it.*\n\n<br>\n\n</div>\n"}, "7c537c5c93281ba1dee8df5d0eaea22b183b5cfa": {"t": 1785761253.430465, "n": 3341, "h": "3779c9adacaa6a02", "c": "<div align=\"center\">\n\n# ⚡ claude-code-deepseek\n\n**Run Claude Code CLI on DeepSeek's Anthropic-compatible API** \nBuilt for security researchers & bug bounty hunters\n\n```\n┌──(user㉿vps)-[~]\n└─$ claude-ds\n ▐▛███▜▌ Claude Code v2.1.166\n▝▜█████▛▘ deepseek-v4-pro with high effort · API Usage Billing\n ▘▘ ▝▝ /home/user\n❯ Try \"how does <filepath> work?\"\n```\n\n![DeepSeek](https://img.shields.io/badge/DeepSeek-v4--pro-blue?style=flat-square)\n![Claude Code](https://img.shields.io/badge/Claude_Code-2.x-orange?style=flat-square)\n![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)\n![Cost](https://img.shields.io/badge/~%246_per_350M_tokens-💸-yellow?style=flat-square)\n![Stars](https://img.shields.io/github/stars/0x-elfateh1/claude-code-deepseek?style=flat-square&color=gold)\n\n</div>\n\n---\n\n## Table of Contents\n\n- [Why DeepSeek?](#why-deepseek)\n- [Model IDs](#model-ids)\n- [Quick Setup](#quick-setup)\n- [Setup Methods](#setup-methods)\n - [Method 1 — Global](#method-1--global-all-deepseek-always)\n - [Method 2 — Per-Project](#method-2--per-project-selective)\n - [Method 3 — Shell Function ⭐](#method-3--shell-function-per-session-)\n - [Method 4 — Automation / CI](#method-4--automation--ci)\n- [Reverting to Anthropic](#reverting-to-anthropic-subscription)\n- [Key Notes](#key-notes)\n- [Files](#files)\n- [Author](#author)\n\n---\n\n## Why DeepSeek?\n\n| | Anthropic Subscription | DeepSeek API |\n|---|---|---|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth | ✅ API key works |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly | ~$6 per 350M tokens |\n\n**Strategy:** Use your Claude subscription for interactive daily work. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads.\n\n---\n\n## Model IDs\n\n| Model | ID | Use |\n|---|---|---|\n| Flagship | `deepseek-v4-pro` | Heavy reasoning, main agent |\n| Fast/Cheap | `deepseek-v4-flash` | Subagents, background tasks |\n\n> ⚠️ `deepseek-chat` and `deepseek-reasoner` are **deprecated July 24 2026**. Don't use them.\n\n**Auto-mapping:** DeepSeek maps Claude names automatically — `claude-opus-*` → v4-pro, `claude-haiku/sonnet-*` → v4-flash.\n\n---\n\n## Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nSee ready-to-use snippets in [`configs/`](./configs/).\n\n---\n\n## Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\nBest if you want DeepSeek for everything.\n\n```bash\ncat >> ~/.zshrc << 'EOF'\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n"}, "7988fa4795d24377138fb900d104d670aab94e99": {"t": 1785761254.7993844, "n": 5130, "h": "a92a40df3ee4bb67", "c": "# Claude Code × DeepSeek — Setup Guide\n\n> Run Claude Code CLI with DeepSeek's Anthropic-compatible API.\n> ~350M tokens for ~$6 · Perfect for high-volume security automation & bug bounty workflows.\n\n**By [0x-elfateh](https://www.linkedin.com/in/0x-elfateh/) · Security Researcher & Bug Bounty Hunter**\n\n---\n\n## Why DeepSeek?\n\n| | Anthropic Subscription | DeepSeek API |\n|---|---|---|\n| Interactive coding | ✅ Best | ✅ Good |\n| Headless / VPS automation | ❌ Needs OAuth | ✅ API key works |\n| Rate limits | Subscription caps | Pay-per-token, no hard caps |\n| Cost at scale | Fixed monthly | ~$6 per 350M tokens |\n\n**Strategy:** Use your Claude subscription for interactive daily work. Use DeepSeek API for VPS automation, CI pipelines, and heavy subagent workloads.\n\n---\n\n## Model IDs\n\n| Model | ID | Use |\n|---|---|---|\n| Flagship | `deepseek-v4-pro` | Heavy reasoning, main agent |\n| Fast/Cheap | `deepseek-v4-flash` | Subagents, background tasks |\n\n> ⚠️ `deepseek-chat` and `deepseek-reasoner` are **deprecated July 24 2026**. Don't use them.\n\n**Auto-mapping:** DeepSeek maps Claude names — `claude-opus-*` → v4-pro, `claude-haiku/sonnet-*` → v4-flash.\n\n---\n\n## Quick Setup\n\nFull config from [DeepSeek's official docs](https://api-docs.deepseek.com/guides/coding_agents):\n\n```bash\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\n```\n\nSee ready-to-use snippets in [`configs/`](./configs/).\n\n---\n\n## Setup Methods\n\n### Method 1 — Global (All DeepSeek, Always)\n\n```bash\ncat >> ~/.zshrc << 'EOF'\nexport ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic\nexport ANTHROPIC_AUTH_TOKEN=<your_deepseek_key>\nexport ANTHROPIC_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash\nexport CLAUDE_CODE_EFFORT_LEVEL=max\nEOF\nsource ~/.zshrc\n```\n\n---\n\n### Method 2 — Per-Project (Selective)\n\nCreate `.claude/settings.json` in your project folder. See [`configs/settings.json`](./configs/settings.json).\n\n---\n\n### Method 3 — Shell Function (Per-Session) ⭐ Recommended\n\n> ⚠️ Use a **function**, not an alias. Multi-line aliases are fragile in zsh.\n\nAdd to `~/.zshrc`:\n\n```bash\nclaude-ds() {\n ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\n ANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\n ANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro\" \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\" \\\n CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\n claude \"$@\"\n}\n```\n\n- `claude` → Anthropic subscription (unchanged)\n- `claude-ds` → DeepSeek session\n- `claude-ds -p \"task\"` → passes all flags through via `\"$@\"`\n\n---\n\n### Method 4 — Automation / CI\n\n```bash\nANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\" \\\nANTHROPIC_AUTH_TOKEN=\"<your_deepseek_key>\" \\\nANTHROPIC_MODEL=\"deepseek-v4-pro\" \\\nCLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\" \\\nclaude --dangerously-skip-permissions -p \"your task here\"\n```\n\n---\n\n## VPS Install (Ubuntu)\n\n```bash\n# One-command installer:\nDEEPSEEK_KEY=sk-... bash <(curl -s https://raw.githubusercontent.com/0x-elfateh1/claude-code-deepseek/main/scripts/setup.sh)\n```\n\nOr manually — see [`scripts/setup.sh`](./scripts/setup.sh).\n\n---\n\n## Reverting to Anthropic Subscription\n\n```bash\nunset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL \\\n ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL \\\n ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL \\\n CLAUDE_CODE_EFFORT_LEVEL\n```\n\nPermanent: remove the export lines from `~/.zshrc` / `~/.bashrc`.\n\n---\n\n## Key Notes\n\n- `ANTHROPIC_BASE_URL` is per-process global — can't split Anthropic/DeepSeek in the same session\n- `CLAUDE_CODE_SUBAGENT_MODEL` controls spawned subagent model\n- Use `ANTHROPIC_AUTH_TOKEN` not `ANTHROPIC_API_KEY` for Claude Code\n- Get your key at [platform.deepseek.com](https://platform.deepseek.com)\n\n---\n\n## Files\n\n```\nconfigs/\n├── zshrc.snippet # zsh env block + claude-ds function\n├── bashrc.snippet # bash env block (Ubuntu VPS)\n├── settings.json # .claude/settings.json per-project template\n└── windows.ps1 # Windows PowerShell config\nscripts/\n└── setup.sh # Ubuntu VPS one-command installer\n```\n\n---\n\n## Sources\n\n- [DeepSeek Anthropic API Docs](https://api-docs.deepseek.com/guides/anthropic_api)\n- [DeepSeek Coding Agents Guide](https://api-docs.deepseek.com/guides/coding_agents)\n- [Claude Code Model Config Docs](https://code.claude.com/docs/en/model-config)\n\n---\n\n## Author\n\n**0x-elfateh** — Security Researcher & Bug Bounty Hunter\n🔗 [linkedin.com/in/0x-elfateh](https://www.linkedin.com/in/0x-elfateh/)\n\nIf this helped you, leave a ⭐\n"}}}}