# deepclaude

> Run Claude Code's autonomous agent loop with DeepSeek V4 Pro, OpenRouter, or any Anthropic-compatible backend — same UX, up to 17x cheaper.

**deepclaude** is an open-source CLI tool that lets you use Claude Code's powerful autonomous coding agent loop while routing API calls to cheaper backends like DeepSeek V4 Pro, OpenRouter, or Fireworks AI. It works by setting environment variables per-session to redirect Claude Code's API calls to an alternative endpoint, then restoring your original settings on exit. DeepSeek V4 Pro scores 96.4% on LiveCodeBench at $0.87/M output tokens — compared to Anthropic's $15/M — delivering up to 90% cost savings for typical usage.

- **Multi-backend support**: *Switch between DeepSeek (default), OpenRouter, Fireworks AI, and Anthropic using simple `--backend` flags.*
- **Live backend switching**: *Change the active model mid-session without restarting, using slash commands, CLI flags, or VS Code keyboard shortcuts.*
- **Local proxy with cost tracking**: *A localhost:3200 proxy intercepts API calls, tracks token usage, and reports real-time cost savings vs. Anthropic pricing.*
- **Full Claude Code compatibility**: *File reading/writing/editing, bash execution, glob/grep search, subagent spawning, git operations, and multi-step autonomous loops all work unchanged.*
- **Remote control support**: *Launch a Claude Code session accessible from any browser — phone, tablet, or desktop — with DeepSeek as the underlying model.*
- **VS Code / Cursor integration**: *Add terminal profiles or keyboard shortcuts to launch deepclaude directly from your IDE.*
- **Auto context caching**: *DeepSeek's automatic caching makes agent loops extremely cheap — repeat turns cost ~120x less after the first request.*
- **Cross-platform**: *Works on Windows (PowerShell), macOS, and Linux with a 2-minute setup.*

To get started, set your `DEEPSEEK_API_KEY` environment variable, install the script to your PATH, and run `deepclaude` in your terminal. Use `deepclaude --status` to see available backends and `deepclaude --cost` for a pricing comparison.

## Features
- DeepSeek V4 Pro backend support
- OpenRouter backend support
- Fireworks AI backend support
- Anthropic passthrough backend
- Live backend switching mid-session
- Local proxy on localhost:3200
- Real-time cost tracking and savings reporting
- Automatic context caching with DeepSeek
- File read/write/edit tool support
- Bash/PowerShell execution
- Subagent spawning
- Git operations
- Remote browser control
- VS Code and Cursor integration
- Slash command switching
- Keyboard shortcut switching
- Latency benchmarking across providers
- Per-session environment variable management

## Integrations
Claude Code, DeepSeek, OpenRouter, Fireworks AI, Anthropic API, VS Code, Cursor, PowerShell, Bash

## Platforms
WINDOWS, MACOS, LINUX, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Links
- Website: https://github.com/aattaran/deepclaude
- Documentation: https://github.com/aattaran/deepclaude
- Repository: https://github.com/aattaran/deepclaude
- EveryDev.ai: https://www.everydev.ai/tools/deepclaude
