Skip to main content

aiburn

Fast, fully local usage & cost reporting for Claude Code and Codex, in one table. See how much you're burning on your coding agents.

$ aiburn
aiburn · Claude Code + Codex usage

Date        Agent   Models       Input  Output  Cache    Cost
──────────  ──────  ───────────  ─────  ──────  ─────  ──────
2026-07-20  claude  opus-5       2.81K    222K  24.4M  $20.44
            codex   gpt-5.6-sol  64.0K   2.42K   500K   $0.64
2026-07-21  claude  opus-5         127   84.8K  22.3M  $17.27
──────────  ──────  ───────────  ─────  ──────  ─────  ──────
Date        Agent   Models       Input  Output  Cache    Cost
TOTAL                            66.9K    309K  47.2M  $38.35

Claude       $37.71   47.0M tokens
Codex         $0.64   567K tokens
Total        $38.35

Scanned 214 files in 61ms

Each raw model gets its own row, with repeated date and agent labels suppressed so model-level comparisons stay readable. Token counts are compact (K/M/B/T) and costs exact — pass --exact for full counts, or --json for raw integers. JSON groups mirror the table: one object per (date/month, agent, model), with the raw model name in models.

Why aiburn

  • Fully local & private — it only reads the log files and local Codex config your agents already write on your machine. No network calls or account; nothing about your usage ever leaves your computer.
  • One command, no install — uvx aiburn on macOS or Linux.
  • Both agents, one view — Claude Code and Codex side by side, by day, month, or session.
  • Fast at any size — scans gigabytes of history in well under a second, with near-instant startup, so it stays snappy as your logs grow.
  • Accurate cost — recomputed from token counts (including cache tiers), with date-aware model aliases and Codex Standard/Fast/Priority pricing.

Run it

No install needed — uv fetches a prebuilt binary and runs it:

uvx aiburn                 # macOS / Linux, any arch
uvx aiburn monthly

Keep it as a permanent command:

uv tool install aiburn     # then just `aiburn`

Or build from source with a Rust toolchain:

cargo install --git https://github.com/handasontam/aiburn

Usage

aiburn [command] [options]

Commands:
  daily      Per-day usage and cost (default)
  monthly    Per-month usage and cost
  session    Per-session usage and cost

Options:
  --since <YYYY-MM-DD>   Only include usage on/after this date
  --until <YYYY-MM-DD>   Only include usage on/before this date
  --claude               Only Claude Code
  --codex                Only Codex
  --all                  Show every session (session view; default: top 25)
  --exact                Full token counts instead of K/M/B/T
  --json                 Emit JSON instead of a table
  -h, --help             Show this help
  -v, --version          Show version

What it reads

Only your local coding-agent logs — read in place, never sent anywhere:

  • Claude Code — ~/.claude/projects (also ~/.config/claude and $CLAUDE_CONFIG_DIR)
  • Codex — ~/.codex/sessions and ~/.codex/archived_sessions, plus the top-level service_tier in ~/.codex/config.toml (or $CODEX_HOME)

A file that cannot be opened or read to the end is counted in the footer rather than silently skipped, so a permissions problem shows up as a warning instead of a smaller total.

Cost accuracy

Costs are recomputed from token counts with a built-in, pinned public pricing table, including Claude's 5-minute and 1-hour cache tiers and per-model cache rates (Fable 5.1 reads cache at $0.25/MTok, Opus 5.5 at $0.20/MTok and Sonnet 5.5 at $0.10/MTok, not the usual 10% of input). A Haiku 5.5 request whose prompt, cache reads and writes included, exceeds 100K tokens is billed entirely at 5×. Claude Code figures match ccusage's to the cent; ccusage's headline total will still be higher if it also finds OpenCode, Gemini, or other agent logs that aiburn does not read. Codex logs carry no authoritative cost, so aiburn uses public list pricing: explicit priority/fast events use the matching Fast rate, missing tiers follow the top-level Codex config, and unknown tiers fall back to Standard. A Codex request whose whole context (fresh plus cached input) exceeds 272K tokens is billed entirely at OpenAI's long-context tier, as ccusage does.

Two details worth knowing:

  • Fast mode costs more per token. Fast/Priority usage appears as its own -fast row for both agents, priced at the per-model premium rate where one is published; otherwise at the base rate, which undercounts rather than dropping the row.
  • Codex replay history is skipped. Forking or resuming a session copies the parent rollout's records into the new file; those replayed token events belong to the parent's own file and are not charged again.

Acknowledgements

Inspired by ccusage by @ryoppippi and contributors — a great, broader tool that covers many more agents. aiburn is a smaller reimplementation focused on just Claude Code + Codex. ccusage is MIT licensed.

License

MIT

Metadata

Release files for aiburn 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for aiburn 0.4.7
File Actions
aiburn-0.4.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for aiburn-0.4.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
aiburn-0.4.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for aiburn-0.4.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
aiburn-0.4.7-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for aiburn-0.4.7-py3-none-macosx_11_0_arm64.whl
aiburn-0.4.7-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for aiburn-0.4.7-py3-none-macosx_10_12_x86_64.whl

Total release size: 1.1 MB

Release files / aiburn-0.4.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL aiburn-0.4.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 295.1 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3d1376c152f6bce1e34962648ed0ca64dc8e6b9046edc6e9ae15688f78f87cb8
BLAKE2b-256 checksum
How to use checksums
57f5d60bbb40607467f0e86f0d6f153b0c2243c8a930dd0d38b476ccf719c019
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / aiburn-0.4.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL aiburn-0.4.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 278.5 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
282ab9136bfeec274c038918d05a2622afc83ab99cd98e89419a7eab551801c1
BLAKE2b-256 checksum
How to use checksums
b8657b366f47e5f7f12931dbd4d9f6263a31752f361beb5849b719b20c4772d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / aiburn-0.4.7-py3-none-macosx_11_0_arm64.whl

Download URL aiburn-0.4.7-py3-none-macosx_11_0_arm64.whl
Size 255.2 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
42fda1368adf022a487ba91e24833aabd5101abe5ce25849a43b84c8cbeba01b
BLAKE2b-256 checksum
How to use checksums
229ee2e986e7ab397bf5e4807a7cbae07abe8f2254d6bd55950d512a8c30730e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / aiburn-0.4.7-py3-none-macosx_10_12_x86_64.whl

Download URL aiburn-0.4.7-py3-none-macosx_10_12_x86_64.whl
Size 272.8 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2f1b0ab39a0140c7047c5223edfea73134e8c1fdaff6dec783adb5a95acdefad
BLAKE2b-256 checksum
How to use checksums
297220cfbacf633c31d6afb89aa5569739ccaa59b5a8a5c0e0fd407ee1f9aedb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for aiburn 0.4.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for aiburn-0.4.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page