Skip to main content

A local, real-time cockpit for your Claude credit burn — burn rate, runway forecast, and budget alerts. Zero dependencies, nothing leaves your machine.

Project description

Burndown

A local, real-time cockpit for your Claude credit burn. Burn rate · runway forecast · budget alerts — so you see "I'll run dry in 3 days" before it happens, not after.

License: MIT Python 3.11+ Zero dependencies 100%25 local


Anthropic split programmatic Claude usage into a separate monthly credit pool that can run out mid-month. The existing tools show you what you already spent — a bank statement, after the fact. Burndown is the fuel gauge: how fast you're burning right now, when you'll hit zero, and a check that fires before you overspend.

It reads the usage logs Claude Code already writes on your machine. Nothing leaves your computer — zero dependencies, no network, read-only on your logs, and it never touches your prompts or code (see SECURITY.md).

Quickstart

pipx install git+https://github.com/aryasgit/burndown.git   # works today (PyPI: `pipx install burndown` — soon)
burndown                     # snapshot of this period
burndown budget 100          # set your monthly credit-pool budget → get a runway
burndown scope programmatic  # guardian mode: meter just the credit pool
burndown currency INR        # show INR next to USD (static rate, no live fetch)
burndown watch               # live terminal dashboard …
burndown serve               # … or a web dashboard at http://127.0.0.1:8787

No install? From a clone: python -m burndown (needs Python 3.11+, nothing else).

  BURNDOWN   monthly period · resets Jul 01

  $41.80 / $100.00   ███████████░░░░░░░░░░░░░░░░░  42%

  burn rate   $6.10/day   (last 24h)      avg $3.20/day
  runway      9.6 days  (Jun 22)   ✓ lasts the period
  projected   $89.40 by reset

  top projects
    memcon                     $22.10
    burndown                   $11.40
    barq-firmware              $8.30

  last 14d    ▂▁▃▅▂▇█▄▃▂▅▆▃▄

  1,204 billable msgs · 38,902,114 tokens · 100% local, nothing sent anywhere

Commands

Command What it does
burndown / burndown status one-shot snapshot
burndown watch [--interval 5] live dashboard, re-reads logs every few seconds
burndown budget <amount> [--tokens] [--reset-day N] set the budget runway is measured against (dollars, or --tokens to skip pricing)
burndown scope programmatic guardian mode — meter just the June-2026 credit pool (programmatic usage); all / interactive also available
burndown currency INR [--rate R] show a second currency next to USD (static rate, no live fetch)
burndown check exit 0 ok · 1 projected-over · 2 over — wire it into your own pre-run hook / CI
burndown report [--html out.html] self-contained local HTML report (opens from file://, no server)
burndown serve [--port 8787] live web dashboard on 127.0.0.1 — local only, auto-refreshing (nice if you don't live in a terminal)
burndown config show config + verify which logs are being read

How it works

Claude Code logs every assistant message to ~/.claude/projects/**/*.jsonl with a usage block (input / output / cache-write / cache-read tokens). Burndown reads those numbers (only those — never the message text), prices them with a configurable per-model table, rolls them into your current billing period, computes burn rate from the last 24 hours, and projects when you'll hit your budget.

Honest limitations

  • Pricing is estimated and configurable. Default per-model rates are best-effort; correct them in ~/.config/burndown/config.toml (burndown config shows the active table). The burn-rate/runway math is exact regardless — prices only scale the dollar figure. Prefer not to trust a dollar estimate? burndown budget <N> --tokens forecasts in raw tokens.
  • It reads local Claude Code logs. If your usage doesn't write those logs (e.g. a flow that doesn't log locally), Burndown can't see it yet.
  • The "budget stop" is a check you act on, not an auto-kill (on purpose — see ADR-005).

Trust

Zero dependencies · no outbound network (the optional dashboard is loopback-only) · read-only · content-blind · cross-platform (macOS/Linux/Windows) · MIT. Verify it yourself in one line:

grep -REn "urllib|httpx|requests|telemetry|analytics|0\.0\.0\.0|socket\.socket|create_connection|\.connect\(" burndown/   # → nothing (the only socket binds 127.0.0.1)

Decisions are logged in docs/DECISIONS.md; the threat model is in docs/SECURITY.md.

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

burndown-0.1.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

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

burndown-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file burndown-0.1.0.tar.gz.

File metadata

  • Download URL: burndown-0.1.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for burndown-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab307c4c847d39fd01a8f0911424e002373c68e3bb012fda8444ba0f0c6b8a96
MD5 b2f1e46986ca21ec2e7fdb1e0f37613e
BLAKE2b-256 dacc3fb82e6942bd884fbf2ac4ed95ff9e922d86b78965e66f16acba9285ad4d

See more details on using hashes here.

File details

Details for the file burndown-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: burndown-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for burndown-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99f3114f93606693cb5626b56951b6429014854caa0e73b66694328a8a3a6110
MD5 96c0059afc177ec30a860f99b18ad0cb
BLAKE2b-256 160aaa73ded4a0b080d911a53dd2aab5c9f7265b06b8c5ed1d716461bb4e7344

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