Local-first · Claude Code & Codex

A spending tab for
your coding agent.

A receipt after every run — real cost, a bloat score, and the one fix that would have saved the most. Nothing leaves your machine.

$ npx @amirdor/openbar install View source →
↑ what openbar report prints after every run

What you get

Accurate cost

Real token usage from the agent's own transcript, deduped per request, with the cache split. Labeled estimated, never faked.

Bloat score

A transparent 0–100 score for how wasteful a run was, capped per dimension so nothing dominates.

Waste detectors

Re-read files, lockfile reads, failing-test loops, dependency creep, edit churn — each with a concrete fix.

Rules that stick

openbar fix writes the recurring wastes into your CLAUDE.md so the next run is leaner.

Shareable receipt

Export a card as SVG, PNG, or HTML — the painful, useful thing worth posting.

Weekly bill

openbar summary totals your recent runs, all on disk. Plus per-run history.

How it works

Claude Code / Codex
   │  lifecycle hooks fire on every tool call
   ▼
openbar hook   →  .openbar/runs/<session>.jsonl
   ▼
analyzer   →  transcript tokens · git diff · detectors
   ├─  receipt       openbar report
   ├─  weekly bill   openbar summary
   ├─  share card    openbar share --png
   └─  agent rules   openbar fix

Codex too

$ npx @amirdor/openbar install --codex

Same flow — tokens come from Codex's on-disk rollout. One note: Codex skips a new command hook until you trust it, so run /hooks inside Codex once after installing.