Per-project, per-branch budget caps. Phone alerts before you hit the limit. Kills the process when you blow past it.
$ budgetclaw status PROJECT BRANCH TODAY WEEK MONTH myapp main $4.85 $28.30 $142.00 myapp feature/auth $1.20 $3.20 $3.20 side-proj main $0.00 $0.50 $12.10 TOTAL $6.05 $32.00 $157.30 $ budgetclaw limit list # PROJECT BRANCH PERIOD CAP ACTION 1 * * daily $10.00 warn 2 myapp main daily $5.00 kill 3 myapp main weekly $30.00 kill
Never sees your API key. Never reads your prompts. Never touches the network.
Parses the JSONL logs Claude Code already writes to ~/.claude/projects/
Claude Code writes every tool call to ~/.claude/projects/*.jsonl. BudgetClaw watches those files with fsnotify.
Each log entry has token counts, model ID, and git branch. BudgetClaw prices them and rolls up to SQLite. Per project, per branch, per day.
TOML config defines daily, weekly, or monthly caps with glob patterns. Most-specific match wins. Two actions: warn or kill.
SIGTERM the Claude process. Write a lockfile that catches relaunches. Push an alert to your phone via ntfy. Lock auto-expires when the period rolls over.
Every tool call attributed to project + git branch. See which feature branch is burning budget.
Daily, weekly, monthly. TOML config with glob patterns for project and branch matching.
Breach alerts on your phone via ntfy.sh or self-hosted. Kill actions bypass Do Not Disturb.
Go. No cgo, no runtime. One curl, one binary. macOS + Linux, Intel + ARM. 5 MB.
No data leaves your machine. No account. SQLite you can query directly. MIT license.
Full source on GitHub. TOML config you can read. XDG directories you control.
# install curl -fsSL roninforge.org/get | sh # initialize budgetclaw init # set caps budgetclaw limit set --period daily --cap 10 --action warn budgetclaw limit set --period daily --cap 25 --action kill # run budgetclaw watch