backdoor  by ajsai47

Proxy for advanced coding agents, enabling flexible AI provider integration

Created 3 weeks ago

New!

295 stars

Top 89.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a lightweight proxy enabling the use of Anthropic's Claude Code, a highly capable AI coding agent, with any OpenAI-compatible AI provider, including DeepSeek, Groq, Ollama, and OpenRouter. It addresses vendor lock-in and prohibitive API costs associated with Anthropic's service, offering significant savings and flexibility. The target audience includes individual developers, teams, and researchers seeking to leverage advanced AI coding assistance without being tied to a specific provider's pricing or infrastructure.

How It Works

Backdoor functions as an intermediary, intercepting API calls made by Claude Code. It translates these requests from Anthropic's proprietary format to the standard OpenAI chat completions format, forwards them to the user-selected backend (e.g., DeepSeek, Groq, local Ollama instance), and then translates the responses back into Anthropic's Server-Sent Events (SSE) format. This process transparently handles complex features like tool use and streaming deltas, ensuring Claude Code operates seamlessly without awareness of the rerouting. It also intercepts and short-circuits internal housekeeping requests to conserve provider quota.

Quick Start & Requirements

  • Primary install/run command: Clone the repository (git clone https://github.com/ajsai47/backdoor), navigate into the directory (cd backdoor), and run the setup wizard (./backdoor). Manual setup involves copying .env.example to .env, configuring it, and running ./run.sh.
  • Prerequisites: Requires Claude Code to be installed separately from claude.ai/code. An OpenAI-compatible AI provider endpoint is necessary.
  • Dependencies: Optional TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USER_ID for Telegram control.
  • Estimated setup time: Approximately 60 seconds via the wizard.
  • Relevant links: Project Repository

Highlighted Details

  • Cost Efficiency: Demonstrates potential savings of up to 99.95% compared to direct Anthropic API usage, with providers like DeepSeek costing significantly less per token.
  • Provider Flexibility: Supports numerous providers including DeepSeek, Groq, NVIDIA NIM, OpenRouter, Ollama, and LM Studio, allowing users to switch AI backends with a simple configuration change.
  • Privacy: Enables running Claude Code entirely locally via Ollama or LM Studio, ensuring no data leaves the user's machine.
  • Remote Control: Offers optional integration with Telegram bots for triggering Claude Code sessions and receiving outputs remotely.

Maintenance & Community

The project is presented as open-source with clean, concise code (under 600 lines) and an MIT license, encouraging community contribution, modification, and forking. Specific community channels (like Discord/Slack) or maintainer details are not detailed in the README.

Licensing & Compatibility

The project is released under the MIT License, which is permissive and generally compatible with commercial use and integration into closed-source projects.

Limitations & Caveats

Users must ensure the model names specified in the configuration (.env) precisely match the slugs expected by the chosen AI provider. The default proxy port is 8082, which may conflict with other services. Performance and reliability are dependent on the selected backend provider's infrastructure.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
0
Star History
296 stars in the last 26 days

Explore Similar Projects

Feedback? Help us improve.