### Start Model Proxy Source: https://github.com/aattaran/deepclaude/blob/main/proxy/README.md Initiates the model proxy server. Configure the target URL for DeepSeek and provide your API key. The proxy will listen on a specific port, which should be set as ANTHROPIC_BASE_URL for remote control. ```javascript import { startModelProxy } from './model-proxy.js'; const proxy = await startModelProxy({ targetUrl: 'https://api.deepseek.com/anthropic', apiKey: process.env.DEEPSEEK_API_KEY, }); console.log(`Proxy on port ${proxy.port}`); // Set env vars for claude remote-control: // ANTHROPIC_BASE_URL=http://127.0.0.1:${proxy.port} // ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro // (do NOT set ANTHROPIC_AUTH_TOKEN — OAuth handles bridge auth) // When done: proxy.close(); ``` -------------------------------- ### Install deepclaude on Windows Source: https://github.com/aattaran/deepclaude/blob/main/README.md Instructions for installing the deepclaude script on Windows, either by copying it to a directory in your PATH or by adding the repository directory to your PATH. ```powershell # Copy the script to a directory in your PATH Copy-Item deepclaude.ps1 "$env:USERPROFILE\.local\bin\deepclaude.ps1" # Or add the repo directory to PATH setx PATH "$env:PATH;C:\path\to\deepclaude" ``` -------------------------------- ### Install deepclaude on macOS/Linux Source: https://github.com/aattaran/deepclaude/blob/main/README.md Make the deepclaude script executable and create a symbolic link to it in /usr/local/bin for system-wide access on macOS or Linux. ```bash chmod +x deepclaude.sh sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude ``` -------------------------------- ### Get Cost Tracking Information Source: https://github.com/aattaran/deepclaude/blob/main/README.md Retrieve token usage, cost, and potential savings compared to Anthropic pricing from the proxy. ```bash curl -s http://127.0.0.1:3200/_proxy/cost ``` -------------------------------- ### Cost Tracking Response Source: https://github.com/aattaran/deepclaude/blob/main/README.md Example JSON response from the cost tracking endpoint, detailing token usage, costs, and savings for different backends. ```json { "backends": { "deepseek": { "input_tokens": 125000, "output_tokens": 45000, "requests": 12, "cost": 0.0941, "anthropic_equivalent": 1.05 } }, "total_cost": 0.0941, "anthropic_equivalent": 1.05, "savings": 0.9559 } ``` -------------------------------- ### Start Deepclaude Proxy Source: https://github.com/aattaran/deepclaude/blob/main/README.md Initiates the deepclaude proxy for remote control. The proxy automatically routes WebSocket traffic to Anthropic's bridge and model API calls to a local endpoint, which can then be forwarded to other services like DeepSeek or Anthropic. ```bash claude remote-control ``` -------------------------------- ### Switch to DeepSeek Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Use this command to switch the model proxy to DeepSeek. It's recommended to run this command silently and report the result. ```bash curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=deepseek" If successful, say: "Switched to DeepSeek." ``` -------------------------------- ### Basic deepclaude Usage Commands Source: https://github.com/aattaran/deepclaude/blob/main/README.md A list of common commands for interacting with the deepclaude CLI, including launching with different backends, checking status, and comparing costs. ```bash deepclaude # Launch Claude Code with DeepSeek V4 Pro deepclaude --status # Show available backends and keys deepclaude --backend or # Use OpenRouter (cheapest, $0.44/M input) deepclaude --backend fw # Use Fireworks AI (fastest, US servers) deepclaude --backend anthropic # Normal Claude Code (when you need Opus) deepclaude --cost # Show pricing comparison deepclaude --benchmark # Latency test across all providers deepclaude --switch ds # Switch backend mid-session (no restart) ``` -------------------------------- ### CLI: Switch Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Switch the active AI backend using a command-line flag. Supports various aliases for backends. ```bash deepclaude --switch deepseek # or: ds, or, fw, anthropic deepclaude -s anthropic ``` -------------------------------- ### Switch to OpenRouter Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Use this command to switch the model proxy to OpenRouter. It's recommended to run this command silently and report the result. ```bash curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=openrouter" If successful, say: "Switched to OpenRouter." ``` -------------------------------- ### VS Code Keybindings: Switch Proxy Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Bind keyboard shortcuts to VS Code tasks for quickly switching the proxy backend. ```json { "key": "ctrl+alt+d", "command": "workbench.action.tasks.runTask", "args": "Proxy: Switch to DeepSeek" }, { "key": "ctrl+alt+a", "command": "workbench.action.tasks.runTask", "args": "Proxy: Switch to Anthropic" } ``` -------------------------------- ### Switch to Anthropic Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Use this command to switch the model proxy back to Anthropic. It's recommended to run this command silently and report the result. ```bash curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=anthropic" If successful, say: "Switched to Anthropic." ``` -------------------------------- ### VS Code Tasks: Switch Proxy Backend Source: https://github.com/aattaran/deepclaude/blob/main/README.md Configure VS Code tasks to switch the proxy backend. These tasks can then be bound to keyboard shortcuts. ```json { "version": "2.0.0", "tasks": [ { "label": "Proxy: Switch to DeepSeek", "type": "shell", "command": "Invoke-RestMethod -Uri http://127.0.0.1:3200/_proxy/mode -Method Post -Body 'backend=deepseek'", "presentation": { "reveal": "always" }, "problemMatcher": [] }, { "label": "Proxy: Switch to Anthropic", "type": "shell", "command": "Invoke-RestMethod -Uri http://127.0.0.1:3200/_proxy/mode -Method Post -Body 'backend=anthropic'", "presentation": { "reveal": "always" }, "problemMatcher": [] } ] } ``` -------------------------------- ### Set OpenRouter API Key on Windows Source: https://github.com/aattaran/deepclaude/blob/main/README.md Configure the OpenRouter API key as an environment variable on Windows using PowerShell. ```powershell setx OPENROUTER_API_KEY "sk-or-..." ``` -------------------------------- ### Remote Control with Different Backends Source: https://github.com/aattaran/deepclaude/blob/main/README.md Launch Deepclaude in remote control mode, specifying the desired AI backend. ```bash deepclaude --remote # Remote control + DeepSeek deepclaude --remote -b or # Remote control + OpenRouter deepclaude --remote -b anthropic # Remote control + Anthropic (normal) ``` -------------------------------- ### Set OpenRouter API Key on macOS/Linux Source: https://github.com/aattaran/deepclaude/blob/main/README.md Set the OpenRouter API key as an environment variable on macOS or Linux by exporting it and adding it to your .bashrc. ```bash export OPENROUTER_API_KEY="sk-or-..." ``` -------------------------------- ### Set DeepSeek API Key on macOS/Linux Source: https://github.com/aattaran/deepclaude/blob/main/README.md Append the export command to your .bashrc file to set the DeepSeek API key as an environment variable on macOS or Linux. Remember to source the file afterwards. ```bash echo 'export DEEPSEEK_API_KEY="sk-your-key-here"' >> ~/.bashrc source ~/.bashrc ``` -------------------------------- ### VS Code Terminal Profile (Windows) Source: https://github.com/aattaran/deepclaude/blob/main/README.md Configure a VS Code integrated terminal profile for Windows to launch the DeepSeek agent. ```json { "terminal.integrated.profiles.windows": { "DeepSeek Agent": { "path": "powershell.exe", "args": ["-ExecutionPolicy", "Bypass", "-NoExit", "-File", "C:\\path\\to\\deepclaude.ps1"] } } } ``` -------------------------------- ### Set DeepSeek API Key on Windows Source: https://github.com/aattaran/deepclaude/blob/main/README.md Use this command in PowerShell to set the DeepSeek API key as an environment variable for Windows. ```powershell setx DEEPSEEK_API_KEY "sk-your-key-here" ``` -------------------------------- ### VS Code Terminal Profile (Linux/macOS) Source: https://github.com/aattaran/deepclaude/blob/main/README.md Configure a VS Code integrated terminal profile for Linux or macOS to launch the DeepSeek agent. ```json { "terminal.integrated.profiles.linux": { "DeepSeek Agent": { "path": "/usr/local/bin/deepclaude" } } } ``` -------------------------------- ### Set Fireworks AI API Key on Windows Source: https://github.com/aattaran/deepclaude/blob/main/README.md Set the Fireworks AI API key as an environment variable on Windows using PowerShell. ```powershell setx FIREWORKS_API_KEY "fw_..." ``` -------------------------------- ### Set Fireworks AI API Key on macOS/Linux Source: https://github.com/aattaran/deepclaude/blob/main/README.md Set the Fireworks AI API key as an environment variable on macOS or Linux by exporting it and adding it to your .bashrc. ```bash export FIREWORKS_API_KEY="fw_..." ``` -------------------------------- ### Proxy Communication Flow Source: https://github.com/aattaran/deepclaude/blob/main/README.md Diagram illustrating how Claude Code communicates with the proxy and different backends. The proxy intercepts API calls and routes them to the active backend. ```text Claude Code -> localhost:3200 (proxy) | +-- /_proxy/mode POST -> switch backend +-- /_proxy/status GET -> current backend + uptime +-- /_proxy/cost GET -> token usage + cost savings | +-- /v1/messages -> active backend (DeepSeek/OpenRouter/Anthropic) +-- everything else -> Anthropic (passthrough) ``` -------------------------------- ### Log in to Claude Code Source: https://github.com/aattaran/deepclaude/blob/main/README.md Authenticates the user with Claude Code. This is a prerequisite for using the deepclaude proxy, as it relies on Anthropic's infrastructure for the bridge WebSocket connection. ```bash claude auth login ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.