|
Some checks are pending
Release / Build (aarch64-apple-darwin) (push) Waiting to run
Release / Build (aarch64-unknown-linux-gnu) (push) Waiting to run
Release / Build (x86_64-apple-darwin) (push) Waiting to run
Release / Build (x86_64-pc-windows-msvc) (push) Waiting to run
Release / Build (x86_64-unknown-linux-gnu) (push) Waiting to run
Release / Publish GitHub Release (push) Blocked by required conditions
Release / Publish to Crates.io (push) Blocked by required conditions
|
||
|---|---|---|
| .github/workflows | ||
| config | ||
| docs/superpowers | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| install.sh | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
BrokeCrew 🤖⚡
A lightweight, resilient, async-first Rust CLI that coordinates a specialized team of AI personas backed by OpenRouter models.
BrokeCrew makes free-tier models first-class citizens while eliminating their instability through live model catalog discovery, ranked multi-candidate fallback cascades, account-wide rate-limit budgeting, and multi-agent handoff pipelines.
Why BrokeCrew (vs LiteLLM or RouteLLM)?
| Feature | BrokeCrew | LiteLLM Proxy / RouteLLM |
|---|---|---|
| Footprint & Startup | Single standalone native binary (~15MB), sub-10ms startup. | Heavy Python runtime, tens of pip dependencies, slower startup. |
| Hardware Fit | Designed to run smoothly on low-RAM ARM tablets, Raspberry Pis, and local dev boxes. | Heavy memory consumption unsuited for constrained devices. |
| Persona Fallback Walk | Declarative ranked candidates per persona (qwen:free → deepseek:free → paid fallback). |
Static routing with complex configuration layers. |
| Live Catalog Awareness | Syncs /v1/models in background; skips dropped/offline models before wasting requests. |
Often returns raw 404/400 errors when models vanish. |
| Account-Wide Budgeting | Tracks rolling 20 req/min and daily quotas (50 or 1,000 req/day) across all calls including router. | Typically only tracks proxy tokens, not OpenRouter account limits. |
| Multi-Agent Handoffs | Built-in typed pipelines (coder → reviewer) with real-time SSE streaming per persona. |
Requires external orchestration frameworks (LangGraph, CrewAI). |
Terminal Experience
BrokeCrew formats multi-agent discussions like a vibrant team group chat:
$ brokecrew chat --pipeline build-and-review "Write a Rust LRU cache"
[coder] (qwen/qwen-2.5-coder-32b-instruct:free)
Here is a thread-safe, high-performance LRU cache implementation using std::collections::HashMap
and a doubly-linked list with generational indexing...
[reviewer] (meta-llama/llama-3.3-70b-instruct:free)
Code Review:
1. Concurrency: Eviction edge case when capacity is 0 is unhandled.
2. Memory Safety: Generational indices avoid raw pointers; good choice.
3. Suggestion: Implement std::borrow::Borrow to allow lookup by &str rather than String.
Quickstart
1. Installation
One-line curl install (Linux & macOS):
curl -fsSL https://raw.githubusercontent.com/oiupoyt/brokecrew/main/install.sh | bash
Via Cargo (Crates.io):
cargo install brokecrew
Build from source:
git clone https://github.com/oiupoyt/brokecrew.git
cd brokecrew
cargo install --path .
2. Configure OpenRouter API Key
BrokeCrew securely stores your API key in your OS credential store (keyring), never in plaintext:
brokecrew config set-key
(You can also export OPENROUTER_API_KEY="sk-or-v1-..." or pass --api-key for headless servers).
3. Start Chatting
Zero-config instant routing:
brokecrew chat "build me a proxy checker site"
Stage A regex/keyword routing automatically detects "build/site" and dispatches to the coder persona in 0ms!
Run an interactive team session:
brokecrew chat
Run a multi-agent handoff pipeline:
brokecrew chat --pipeline build-and-review "Implement a token bucket rate limiter in Python"
Check model catalog and quota health:
brokecrew status
List available personas:
brokecrew personas list
Declarative Personas (personas.toml)
Personas are defined in ~/.config/brokecrew/personas.toml (or ./config/personas.example.toml):
[[persona]]
name = "coder"
system_prompt = "You are a precise, terse coding assistant. Output working code, minimal commentary."
trigger_words = ["build", "code", "script", "function", "website", "api"]
[[persona.candidates]]
id = "qwen/qwen-2.5-coder-32b-instruct:free"
tier = "free"
is_stealth = false
[[persona.candidates]]
id = "deepseek/deepseek-coder:free"
tier = "free"
is_stealth = false
[[persona.candidates]]
id = "google/gemini-2.0-flash-001"
tier = "paid"
is_stealth = false
License
Dual-licensed under either:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.