메뉴
HN
Hacker News 27일 전

DeepClaude: Claude 코드 에이전트, 17배 저렴하게

IMP
8/10
핵심 요약

최고의 자율 코딩 에이전트로 꼽히는 Claude Code의 API를 DeepSeek V4 Pro 등 저렴한 백엔드로 우회하여 사용할 수 있게 해주는 도구입니다. 기존 Anthropic API 대비 최대 90%의 비용을 절감할 수 있으며, 기존 Claude Code의 파일 수정 및 터미널 제어 등 모든 에이전트 루프 기능을 동일하게 유지합니다.

번역된 본문

DeepClaude – DeepSeek V4 Pro와 함께하는 Claude Code 에이전트 루프, 17배 저렴하게

소개 및 특징 deepclaude는 Claude Code의 자율 에이전트 루프를 DeepSeek V4 Pro, OpenRouter 또는 Anthropic 호환 백엔드와 함께 사용할 수 있게 해줍니다. 동일한 사용자 경험(UX)을 제공하면서도 비용은 17배 저렴합니다.

Claude Code는 최고의 자율 코딩 에이전트이지만, 사용량 제한이 있는 월 200달러의 비용이 듭니다. 반면 DeepSeek V4 Pro는 LiveCodeBench에서 96.4%의 점수를 기록했으며, 출력 100만 토큰당 $0.87의 비용만 발생합니다.

deepclaude는 '몸체는 유지하면서 두뇌만 교체'합니다:

사용자의 터미널 └── Claude Code CLI (도구 루프, 파일 편집, bash, git — 변경 없음) └── API 호출 → Anthropic($15/M) 대신 DeepSeek V4 Pro($0.87/M) 사용

파일 읽기, 편집, bash 실행, 서브에이전트 생성, 자율 다단계 코딩 루프 등 모든 기능이 완벽하게 작동합니다. 유일한 차이점은 '어떤 모델이 생각하는가'뿐입니다.

빠른 시작 (2분)

  1. DeepSeek API 키 발급 platform.deepseek.com에서 회원가입 후 $5 크레딧을 충전하고 API 키를 복사합니다.

  2. 환경 변수 설정 Windows (PowerShell): setx DEEPSEEK_API_KEY "sk-여러분의-키"

macOS/Linux: echo 'export DEEPSEEK_API_KEY="sk-여러분의-키"' >> ~/.bashrc source ~/.bashrc

  1. 설치 Windows:

스크립트를 PATH가 설정된 디렉토리에 복사

Copy-Item deepclaude.ps1 "$env:USERPROFILE.local\bin\deepclaude.ps1"

또는 리포지토리 디렉토리를 PATH에 추가

setx PATH "$env:PATH;C:\path\to\deepclaude"

macOS/Linux: chmod +x deepclaude.sh sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude

  1. 사용법 deepclaude # DeepSeek V4 Pro로 Claude Code 실행 deepclaude --status # 사용 가능한 백엔드 및 키 표시 deepclaude --backend or # OpenRouter 사용 (가장 저렴, 입력 $0.44/M) deepclaude --backend fw # Fireworks AI 사용 (가장 빠름, 미국 서버) deepclaude --backend anthropic # 일반 Claude Code (Opus 모델이 필요할 때) deepclaude --cost # 가격 비교 표시 deepclaude --benchmark # 모든 제공업체에 대한 지연 시간 테스트

작동 원리 Claude Code는 다음 환경 변수를 읽어 API 호출을 보낼 위치를 결정합니다:

  • ANTHROPIC_BASE_URL: API 엔드포인트 (기본값: api.anthropic.com)
  • ANTHROPIC_AUTH_TOKEN: 백엔드용 API 키
  • ANTHROPIC_DEFAULT_OPUS_MODEL: Opus 등급 작업을 위한 모델 이름
  • ANTHROPIC_DEFAULT_SONNET_MODEL: Sonnet 등급 작업을 위한 모델 이름
  • ANTHROPIC_DEFAULT_HAIKU_MODEL: Haiku 등급 (서브에이전트) 작업을 위한 모델 이름
  • CLAUDE_CODE_SUBAGENT_MODEL: 생성된 서브에이전트용 모델

deepclaude는 세션별로 이러한 변수를 설정하고(영구적이지 않음) Claude Code를 실행한 다음, 종료 시 원래 설정을 복원합니다.

지원 백엔드

  • DeepSeek (기본값, --backend ds): 입력 $0.44/M, 출력 $0.87/M, 중국 서버. 자동 컨텍스트 캐싱 지원 (반복 작업 시 120배 저렴)
  • OpenRouter (--backend or): 입력 $0.44/M, 출력 $0.87/M, 미국 서버. 미국/유럽에서 가장 저렴하고 지연 시간이 가장 짧음
  • Fireworks AI (--backend fw): 입력 $1.74/M, 출력 $3.48/M, 미국 서버. 가장 빠른 추론 속도
  • Anthropic (--backend anthropic): 입력 $3.00/M, 출력 $15.00/M, 미국 서버. 기존 Claude Opus (어려운 문제에 적합)

참고: 위 명령어의 --backend 옵션에서 생략 시 기본값인 DeepSeek가 사용됩니다.

각 백엔드 설정은 DEEPSEEK_API_KEY, OPENROUTER_API_KEY, FIREWORKS_API_KEY 등의 환경 변수를 설정하여 간편하게 구성할 수 있습니다.

비용 비교

  • 가벼운 사용 (월 10일 사용): Anthropic Max $200/월 (한도 있) → deepclaude 약 $20/월 (90% 절약)
  • 많은 사용 (월 25일 사용): Anthropic Max $200/월 (한도 있) → deepclaude 약 $50/월 (75% 절약)
  • 자동 루프 사용 시: Anthropic Max $200/월 (한도 있) → deepclaude 약 $80/월 (60% 절약)

DeepSeek의 자동 컨텍스트 캐싱 덕분에 에이전트 루프의 비용이 극도로 저렴해집니다. 첫 번째 요청 이후에는 시스템 프롬프트와 파일 컨텍스트가 $0.004/M에 캐싱됩니다 (캐싱되지 않은 경우 $0.44/M 대비).

작동 여부 및 제한 사항 작동하는 기능:

  • 파일 읽기, 쓰기, 편집 (Read/Write/Edit 도구)
  • Bash/PowerShell 실행
  • Glob 및 Grep 검색
  • 다단계 자율 도구 루프
  • 서브에이전트 생성
  • Git 작업
  • 프로젝트 초기화 (/init)
  • 사고 모드 (기본적으로 활성화됨)

작동하지 않거나 제한되는 기능:

  • 이미지/비전 입력: DeepSeek의 Anthropic 엔드포인트가 이미지를 지원하지 않음
  • 병렬 도구 사용: 비활성화됨 — 도구가 한 번에 하나씩 순차적으로 실행됨
  • MCP 서버 도구: 지원하지 않음
원문 보기
원문 보기 (영어)
deepclaude Use Claude Code's autonomous agent loop with DeepSeek V4 Pro , OpenRouter , or any Anthropic-compatible backend. Same UX, 17x cheaper. What this does Claude Code is the best autonomous coding agent — but it costs $200/month with usage caps. DeepSeek V4 Pro scores 96.4% on LiveCodeBench and costs $0.87/M output tokens. deepclaude swaps the brain while keeping the body: Your terminal └── Claude Code CLI (tool loop, file editing, bash, git — unchanged) └── API calls → DeepSeek V4 Pro ($0.87/M) instead of Anthropic ($15/M) Everything works: file reading, editing, bash execution, subagent spawning, autonomous multi-step coding loops. The only difference is which model thinks. Quick start (2 minutes) 1. Get a DeepSeek API key Sign up at platform.deepseek.com , add $5 credit, copy your API key. 2. Set environment variables Windows (PowerShell): setx DEEPSEEK_API_KEY " sk-your-key-here " macOS/Linux: echo ' export DEEPSEEK_API_KEY="sk-your-key-here" ' >> ~ /.bashrc source ~ /.bashrc 3. Install Windows: # 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 " macOS/Linux: chmod +x deepclaude.sh sudo ln -s " $( pwd ) /deepclaude.sh " /usr/local/bin/deepclaude 4. Use it 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 How it works Claude Code reads these environment variables to determine where to send API calls: Variable What it does ANTHROPIC_BASE_URL API endpoint (default: api.anthropic.com) ANTHROPIC_AUTH_TOKEN API key for the backend ANTHROPIC_DEFAULT_OPUS_MODEL Model name for Opus-tier tasks ANTHROPIC_DEFAULT_SONNET_MODEL Model name for Sonnet-tier tasks ANTHROPIC_DEFAULT_HAIKU_MODEL Model name for Haiku-tier (subagents) CLAUDE_CODE_SUBAGENT_MODEL Model for spawned subagents deepclaude sets these per-session (not permanently), launches Claude Code, then restores your original settings on exit. Supported backends Backend Flag Input/M Output/M Servers Notes DeepSeek (default) --backend ds $0.44 $0.87 China Auto context caching (120x cheaper on repeat turns) OpenRouter --backend or $0.44 $0.87 US Cheapest, lowest latency from US/EU Fireworks AI --backend fw $1.74 $3.48 US Fastest inference Anthropic --backend anthropic $3.00 $15.00 US Original Claude Opus (for hard problems) Setup per backend DeepSeek (default — just needs DEEPSEEK_API_KEY ): setx DEEPSEEK_API_KEY " sk-... " # Windows export DEEPSEEK_API_KEY= " sk-... " # macOS/Linux OpenRouter (optional): setx OPENROUTER_API_KEY " sk-or-... " # Windows export OPENROUTER_API_KEY= " sk-or-... " # macOS/Linux Fireworks AI (optional): setx FIREWORKS_API_KEY " fw_... " # Windows export FIREWORKS_API_KEY= " fw_... " # macOS/Linux Cost comparison Usage level Anthropic Max deepclaude (DeepSeek) Savings Light (10 days/mo) $200/mo (capped) ~$20/mo 90% Heavy (25 days/mo) $200/mo (capped) ~$50/mo 75% With auto loops $200/mo (capped) ~$80/mo 60% DeepSeek's automatic context caching makes agent loops extremely cheap — after the first request, the system prompt and file context are cached at $0.004/M (vs $0.44/M uncached). What works and what doesn't Works File reading, writing, editing (Read/Write/Edit tools) Bash/PowerShell execution Glob and Grep search Multi-step autonomous tool loops Subagent spawning Git operations Project initialization ( /init ) Thinking mode (enabled by default) Doesn't work or degraded Feature Reason Image/vision input DeepSeek's Anthropic endpoint doesn't support images Parallel tool use Disabled — tools execute one at a time MCP server tools Not supported through compatibility layer Prompt caching savings DeepSeek has its own caching (automatic), but Anthropic's cache_control is ignored Intelligence difference Routine tasks (80% of work): DeepSeek V4 Pro is comparable to Claude Opus Complex reasoning (20%): Claude Opus is stronger — switch with --backend anthropic VS Code / Cursor integration Add terminal profiles so you can launch deepclaude from the IDE: Settings > JSON: { "terminal.integrated.profiles.windows" : { "DeepSeek Agent" : { "path" : " powershell.exe " , "args" : [ " -ExecutionPolicy " , " Bypass " , " -NoExit " , " -File " , " C: \\ path \\ to \\ deepclaude.ps1 " ] } } } Or on macOS/Linux: { "terminal.integrated.profiles.linux" : { "DeepSeek Agent" : { "path" : " /usr/local/bin/deepclaude " } } } Remote control ( --remote ) Open a Claude Code session in any browser — with DeepSeek as the brain: deepclaude --remote # Remote control + DeepSeek deepclaude --remote -b or # Remote control + OpenRouter deepclaude --remote -b anthropic # Remote control + Anthropic (normal) This prints a https://claude.ai/code/session_... URL you can open on your phone, tablet, or any browser. How it works Remote control needs Anthropic's bridge for the WebSocket connection, but model calls can go elsewhere. deepclaude starts a local proxy that splits the traffic: claude remote-control ├── Bridge WebSocket → wss://bridge.claudeusercontent.com (Anthropic, hardcoded) └── Model API calls → http://localhost:3200 (proxy) ├── /v1/messages → DeepSeek ($0.87/M) └── everything else → Anthropic (passthrough) Prerequisites Must be logged into Claude Code: claude auth login Must have a claude.ai subscription (the bridge is Anthropic infrastructure) Node.js 18+ (for the proxy) The proxy starts automatically and stops when the session ends. See proxy/README.md for technical details. License MIT