https://github.com/snipeship/claudeflare
The ultimate Claude proxy
https://github.com/snipeship/claudeflare
Last synced: 2 months ago
JSON representation
The ultimate Claude proxy
- Host: GitHub
- URL: https://github.com/snipeship/claudeflare
- Owner: snipeship
- License: mit
- Created: 2025-07-25T08:22:12.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T13:05:47.000Z (2 months ago)
- Last Synced: 2025-07-27T13:28:27.774Z (2 months ago)
- Language: TypeScript
- Homepage: https://claudeflare.cc
- Size: 1.38 MB
- Stars: 22
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Security: docs/security.md
Awesome Lists containing this project
- awesome-claude-code - **claude-balancer**
README
# Claudeflare 🛡️
**Track Every Request. Go Low-Level. Never Hit Rate Limits Again.**
The ultimate Claude API proxy with intelligent load balancing across multiple accounts. Full visibility into every request, response, and rate limit.

## Why Claudeflare?
- **🚀 Zero Rate Limit Errors** - Automatically distribute requests across multiple accounts
- **📊 Request-Level Analytics** - Track latency, token usage, and costs in real-time
- **🔍 Deep Debugging** - Full request/response logging and error traces
- **⚡ <10ms Overhead** - Minimal performance impact on your API calls
- **💸 Free & Open Source** - Run it yourself, modify it, own your infrastructure## Quick Start
```bash
# Clone and install
git clone https://github.com/snipeship/claudeflare
cd claudeflare
bun install# Start Claudeflare (TUI + Server)
bun run claudeflare# In another terminal, add your Claude accounts
bun cli add work-account
bun cli add personal-account# Configure Claude SDK
export ANTHROPIC_BASE_URL=http://localhost:8080
```## Features
### 🎯 Intelligent Load Balancing
- **Session-based** - Maintain conversation context (5hr sessions)### 📈 Real-Time Analytics
- Token usage tracking per request
- Response time monitoring
- Rate limit detection and warnings
- Cost estimation and budgeting### 🛠️ Developer Tools
- Interactive TUI (`bun run claudeflare`)
- Web dashboard (`http://localhost:8080/dashboard`)
- CLI for account management
- REST API for automation### 🔒 Production Ready
- Automatic failover between accounts
- OAuth token refresh handling
- SQLite database for persistence
- Configurable retry logic## Documentation
Full documentation available in [`docs/`](docs/):
- [Getting Started](docs/index.md)
- [Architecture](docs/architecture.md)
- [API Reference](docs/api-http.md)
- [Configuration](docs/configuration.md)
- [Load Balancing Strategies](docs/load-balancing.md)## Screenshots
![]()
![]()
Real-time Dashboard
Request Logs
![]()
Analytics & Usage Tracking
## Requirements
- [Bun](https://bun.sh) >= 1.2.8
- Claude API accounts (Free, Pro, or Team)## Contributing
We welcome contributions! See [CONTRIBUTING.md](docs/contributing.md) for guidelines.
## License
MIT - See [LICENSE](LICENSE) for details
---
Built with ❤️ for developers who ship