Skip to content

m2ai-portfolio/claudeflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClaudeFlow: Unified AI Coding Assistant with Fallback Models and Fast Research

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 StartFeaturesExamplesContributing

What is this?

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]

Problem

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.

Features

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.

Quick Start

  1. Clone the repository:

    $ git clone https://github.com/yourusername/claudeflow.git
    $ cd claudeflow
  2. Install the required dependencies:

    $ pip install -r requirements.txt
  3. Run your first command:

    $ cloudeflow code "write a function to reverse a string"
    def reverse_string(s):
        return s[::-1]

Examples

Basic Code Generation

$ cloudeflow code "write a function to reverse a string"
def reverse_string(s):
    return s[::-1]

Handling Rate Limits

$ cloudeflow code "write a function to reverse a string" --model=primary
Falling back to alternate model...
def reverse_string(s):
    return s[::-1]

Cost Tracking

$ cloudeflow stats
Primary Model: 10 requests, $0.50
Backup Model: 5 requests, $0.25

File Structure

ClaudeFlow: 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

Tech Stack

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

Contributing

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/new-feature.
  3. Make your changes and run the tests.
  4. Submit a pull request.

License

MIT

Author

Matthew Snow -- M2AI | @m2ai-portfolio

About

ClaudeFlow: Unified AI Coding Assistant with Fallback Models and Fast Research

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages