deepclaude  by aattaran

Autonomous coding agent loop with cost-effective LLM backends

Created 3 weeks ago

New!

1,969 stars

Top 21.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project, aattaran/deepclaude, addresses the high operational cost of using Claude Code's autonomous agent loop, which can reach $200/month. It enables users to leverage the same Claude Code user experience and autonomous coding capabilities but directs API calls to significantly cheaper, high-performing Large Language Models (LLMs) like DeepSeek V4 Pro or OpenRouter. This offers substantial cost savings (up to 17x cheaper) for developers, researchers, and power users who rely on advanced AI-driven coding assistance, making sophisticated autonomous agent functionality more accessible.

How It Works

deepclaude functions as a local proxy that intercepts API calls originating from the Claude Code CLI or VS Code extension. Instead of forwarding these requests to Anthropic's servers, it redirects them to alternative LLM backends configured via environment variables (e.g., DEEPSEEK_API_KEY, OPENROUTER_API_KEY). This approach preserves the entire Claude Code "body"—its tool loop, file editing capabilities, bash execution, and autonomous multi-step coding workflows—while swapping out the "brain" (the LLM) for a more cost-effective option. DeepSeek V4 Pro, for instance, offers strong performance on benchmarks like LiveCodeBench at a fraction of the cost of Anthropic's models.

Quick Start & Requirements

  1. Get API Key: Obtain an API key from platform.deepseek.com and add credit.
  2. Set Environment Variable:
    • 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 Script:
    • Windows: Copy deepclaude.ps1 to a directory in your PATH.
    • macOS/Linux: chmod +x deepclaude.sh and sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude.
  4. Run: Execute deepclaude in your terminal.

Prerequisites:

  • DeepSeek API key.
  • Node.js 18+ (required for the proxy, especially for remote control).
  • A Claude.ai subscription (necessary for the remote control feature's bridge).
  • Logged into Claude Code (claude auth login).

Highlighted Details

  • Cost Efficiency: Offers significant savings, with DeepSeek V4 Pro input/output tokens priced at $0.44/$0.87 per million, compared to Anthropic's $3.00/$15.00.
  • Backend Flexibility: Supports DeepSeek (default), OpenRouter (--backend or), Fireworks AI (--backend fw), and Anthropic (--backend anthropic) for complex reasoning tasks. Backends can be switched mid-session via slash commands or CLI flags.
  • Auto Context Caching: DeepSeek's built-in caching mechanism drastically reduces costs for repeated conversational turns and file context.
  • Remote Control: Allows running Claude Code sessions accessible via a browser on any device, using alternative backends through a local proxy and Anthropic's WebSocket bridge.

Maintenance & Community

The provided README does not detail specific maintainers, community channels (like Discord/Slack), or a public roadmap. Information regarding sponsorships or partnerships is also absent.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive, allowing for commercial use and integration within closed-source projects without significant restrictions.

Limitations & Caveats

Image and vision input are not supported due to limitations in the DeepSeek endpoint. While DeepSeek supports parallel tool use, the Claude Code interface typically sends tools sequentially. Certain specialized tools, like MCP server tools, are not compatible with this proxy layer. For highly complex reasoning tasks, Claude Opus remains superior, necessitating a manual backend switch. DeepSeek's native caching functions independently, and Anthropic's cache_control directives are ignored.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
15
Issues (30d)
13
Star History
1,980 stars in the last 23 days

Explore Similar Projects

Starred by Edward Z. Yang Edward Z. Yang(Research Engineer at Meta; Maintainer of PyTorch), Anton Osika Anton Osika(Cofounder of Lovable), and
3 more.

gptme by gptme

0.1%
4k
CLI tool for terminal agent workflows
Created 3 years ago
Updated 11 hours ago
Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Cofounder of Luma AI), Didier Lopes Didier Lopes(Founder of OpenBB), and
6 more.

eliza by elizaOS

0.3%
18k
Agentic framework for autonomous agents
Created 1 year ago
Updated 10 hours ago
Feedback? Help us improve.