A CLI wrapper that enhances Claude Code with fast, lossless search via MCP, automatic fallback to other models on rate limits or quality drops, and cost‑aware usage tracking.
Quick Start • Features • Examples • Contributing
ClaudeFlow is a CLI tool that enhances Claude Code with fast, lossless search via MCP, automatic fallback to other models on rate limits or quality drops, and cost-aware usage tracking. It provides developers with a more reliable, uninterrupted coding experience with predictable costs and minimal friction.
$ cloudeflow code "write a function to reverse a string"
def reverse_string(s):
return s[::-1]Developers using Claude Code encounter slow, lossy search summarization that relies on Haiku, frequent quality regressions in newer Opus versions, disruptive rate limits that break coding flow, and concerns about cost and account bans. These pain points force users to constantly switch tools, re-explain context, or seek unreliable alternatives.
| Feature | Description |
|---|---|
| Fast, Lossless Search | Perform fast, lossless search using MCP to enhance Claude Code's search capabilities. |
| Automatic Fallback | Automatically switch to a different model when Claude Code encounters rate limits or quality drops. |
| Cost-Aware Usage Tracking | Track the usage of different models to provide cost-aware insights. |
| CLI Interface | User-friendly CLI interface for seamless integration into your development workflow. |
| Local Data Storage | Store local data and logs to ensure privacy and reduce dependency on external services. |
-
Clone the repository:
$ git clone https://github.com/yourusername/claudeflow.git $ cd claudeflow -
Install the required dependencies:
$ pip install -r requirements.txt
-
Run your first command:
$ cloudeflow code "write a function to reverse a string" def reverse_string(s): return s[::-1]
$ cloudeflow code "write a function to reverse a string"
def reverse_string(s):
return s[::-1]$ cloudeflow code "write a function to reverse a string" --model=primary
Falling back to alternate model...
def reverse_string(s):
return s[::-1]$ cloudeflow stats
Primary Model: 10 requests, $0.50
Backup Model: 5 requests, $0.25ClaudeFlow: Unified AI Coding Assistant with Fallback Models and Fast Research/
├── src/ # Core source code
│ ├── __init__.py
│ ├── __main__.py
│ ├── cli.py
│ ├── cost.py
│ ├── fallback.py
│ ├── search.py
│ └── utils.py
├── tests/ # Test suite
│ ├── __init__.py
│ ├── test_cli.py
│ ├── test_core.py
│ └── test_fallback.py
├── .gitignore
├── .heartbeat-callback
├── README.md
├── conftest.py
├── pytest.ini
├── requirements.txt
└── spec.md
| Technology | Purpose |
|---|---|
| Python 3.11+ | Programming language for the CLI tool |
| click | Command line interface creation library |
| pytest | Testing framework |
| sqlite3 | Database for local data storage |
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature. - Make your changes and run the tests.
- Submit a pull request.
MIT
Matthew Snow -- M2AI | @m2ai-portfolio
