Skip to main content

Stop overpaying for AI. Audit, optimize, and overhaul your entire dev stack.

Project description

burnrate

Stop overpaying for AI. burnrate audits your codebase for wasteful AI API usage, suggests targeted fixes, and can execute a full stack migration off expensive subscriptions.

The core insight: most devs pay $100–400/month for Cursor, Claude Max, and Copilot. The same output costs $20–40 via direct API + open-source tooling. Burnrate finds the gap and closes it.

Install

pipx install burnrate

Or with pip:

pip install --user burnrate

Quick start

burnrate auth                  # one-time setup: keys + system profiling
burnrate audit .               # scan your codebase (read-only)
burnrate fix .                 # patch the easy wins, with diff approvals
burnrate overhaul              # replace expensive subscriptions with API + open-source
burnrate status                # current-month spend vs subscription baseline
burnrate doctor                # verify the setup is healthy

Commands

burnrate auth

First-time setup. Prompts for API keys (Anthropic, OpenAI, Google, Groq, Mistral), detects your system (OS, RAM, shell, editor), and asks which paid AI tools you're subscribed to. Writes everything to ~/.burnrate/config.json. Keys never leave your machine.

burnrate audit [path]

Read-only scan. Finds:

  • Expensive model choices (e.g. claude-opus-4 for a simple classifier)
  • Missing max_tokens (unbounded response spend)
  • Long system prompts (>1k chars) without cache_control
  • Cross-language: Python (AST-based) and TypeScript/JavaScript (regex-based)

burnrate fix [path]

Applies code-level fixes. Shows a unified diff per finding and prompts y / n / skip / all (per-fix-kind batching). Add --dry-run to preview without writing. Fix types: model swap, add max_tokens, wrap system prompts with cache_control.

burnrate overhaul

Personalized stack-replacement plan. Reads your detected system + subscriptions; recommends replacements (Zed for Cursor, Anthropic API + Aider for Claude Max, Ollama + Qwen for Copilot). On approval, runs the installs (brew, pipx, ollama pull) with a single confirmation gate. Add --dry-run to see the plan without executing.

burnrate status

This month's API spend per provider, with subscription-baseline comparison. Queries the Anthropic and OpenAI Admin APIs (/v1/organizations/usage_report/messages and /v1/organization/costs). Requires admin-tier API keys — regular keys show "requires admin API key" gracefully. Subscription savings are shown regardless.

burnrate doctor

Verifies config, Python version, API key validity (via cheap GET /v1/models probes), and optional tools on PATH (Ollama, Aider, Zed). Exit 0 if all checks pass, 1 if any fail.

burnrate mcp

Starts an MCP (Model Context Protocol) server on stdio. Exposes four tools to MCP-compatible editors (Claude Code, Cursor, Zed):

  • burnrate_check_file(path) — scan a single file
  • burnrate_suggest_fix(code, finding_type) — return patched code
  • burnrate_get_spend() — current-month spend
  • burnrate_recommend_model(task_description) — most cost-effective model for the task

Register in your editor's MCP config:

{
  "mcpServers": {
    "burnrate": {
      "command": "burnrate",
      "args": ["mcp"]
    }
  }
}

Safety

  • burnrate fix shows every diff before writing. There's no --yes shortcut for v0 — confirm each kind or pipe all to batch.
  • burnrate overhaul shows every install command before running. Single confirmation gate; no per-step prompts during execution. --dry-run is always safe.
  • burnrate audit is fully read-only.
  • API keys live at ~/.burnrate/config.json. The CLI never transmits them to any third party.

If you want extra safety on fix, run it on a committed working tree so git diff is your undo.

Web companion

If you'd rather use a hosted UI, get personalized setup scripts, or track spend over time, burnrate.money has a paid tier ($12/mo or $49 lifetime) that complements the CLI.

Development

git clone https://github.com/saintbate/burnrate
cd burnrate/cli
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -q

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

burnrate-0.1.1.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

burnrate-0.1.1-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file burnrate-0.1.1.tar.gz.

File metadata

  • Download URL: burnrate-0.1.1.tar.gz
  • Upload date:
  • Size: 40.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for burnrate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c32d28a75f9bf894132060ebc07f2d6606d70e2bd216f69ec24ba8618ec32339
MD5 7e3c6e1be385bf8ebf9577e2309e6dcc
BLAKE2b-256 bf7fd3036d980a5b1d6cefa1e4ebb6db48a19a08e9a593870880a288d7c550aa

See more details on using hashes here.

File details

Details for the file burnrate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: burnrate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for burnrate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f727497fc687f1eaaa2e17e1e60a400859e7fb6699a6af3893f28120c3a5042c
MD5 7aa213325cc00e8e1b9b0592997065c3
BLAKE2b-256 3255ced11d8f2cd9930fa75c47ae3ac33d0ccd6b9c14cf709261e9b0e8267a2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page