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. |
|---|---|
usage | Its first part: cost split by token type. |
ctx | The second: how large the context was on each call. |
sim | The third: what was spent, and what a few habits would have saved. |
setup.sh check | What is installed and configured, changing nothing. |
setup.sh stack up | A 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.