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.

PyPI License: MIT Python 3.10+ 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 burndown        # from PyPI · or: pip install burndown
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.1.tar.gz (45.2 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.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: burndown-0.1.1.tar.gz
  • Upload date:
  • Size: 45.2 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.1.tar.gz
Algorithm Hash digest
SHA256 507568c35392a9e1e32ae85155a297afd7829702cb86946902a9098ab556b890
MD5 e3caf72d06513658e058d69f9375e8d1
BLAKE2b-256 a16a244eb0ed228f62fa221aa6ecfa775bee1b327c8b321297295d94912b028e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: burndown-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0623871e5e4f114ab8e30c156ebf34f6060eb261962b1efed3b2434828f336f
MD5 30139a9374f20e83e6c7b5254210faf6
BLAKE2b-256 b11575a2958dbf67c0abb71460c9a14b575f7e93cd73b4a8567d0ca27a7fb72e

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