Token cost scripts

OmarchymacOS

Scripts that read what Claude Code already wrote to disk and say where the money went.

The commands

report.sh <date>The whole report from a start date. It only reads.
usageIts first part: cost split by token type.
ctxThe second: how large the context was on each call.
simThe third: what was spent, and what a few habits would have saved.
setup.sh checkWhat is installed and configured, changing nothing.
setup.sh stack upA local stack to watch usage as it happens: a collector, Prometheus, Loki and Grafana.

Without a date, report.sh goes back 40 days, with a date option only macOS has. On Omarchy, give it the date.

How it works

The numbers come from the transcripts in ~/.claude/projects and from ccusage. The scripts need Bun, RTK and ccusage, which the setup installs when they are missing.

Files