clawbacus
v0.1.1
Published
Answer whether local Claude Code usage is likely to exceed your plan's included amount.
Readme
Clawbacus
Small Bun CLI that reads local Claude Code JSONL session logs and answers whether the current period is likely to exceed your plan's included amount.
bunx clawbacusOr from a local checkout:
bun run src/cli.ts
bun run src/cli.ts --threshold 200
bun run src/cli.ts --since 2026-05-01 --until 2026-05-31
bun run src/cli.ts --json
bun run demoBy default it scans ~/.claude/projects/**/*.jsonl, uses the current calendar month, and compares projected monthly API-equivalent spend against the detected plan limit: $20 for Pro, $100 for Max 5x, $200 for Max 20x, $20/seat for Team Standard, $100/seat for Team Premium, and always safe for API auth.
The default output answers the main question directly:
Would I have to pay more?
⚠️ WARNING
Your Max 20x plan includes $200.00. You have used $194.37 this month and are projected to finish at $478.20, so you would pay about $278.20 extra.Preview the display states without scanning local Claude logs:
bun run demo # safe, safe2, warning, and danger
bun run demo:safe
bun run demo:safe2 # on a plan, projected under the included amount
bun run demo:warning
bun run demo:dangerPackage smoke test:
bun run smoke:bunxPublish when ready:
bun pm pack --dry-run
npm publishNotes:
- The tool only reads local usage metadata from assistant entries. It does not send prompts or transcripts anywhere.
- Costs are estimates based on Anthropic API token pricing, including cache reads, 5-minute cache writes, 1-hour cache writes when present in Claude Code logs, Opus fast mode, US inference multipliers for supported models, and web search request charges.
- It does not estimate subscription-plan limits, credits, negotiated discounts, taxes, or server-side tool runtime charges that are not represented in local token usage.
