Track Codex CLI token usage
Read directly from ~/.codex/sessions. Like Claude Code, it needs no key and no proxy, and it counts the history you already have.
Counting Codex in under a minute
- 01Run burnlog$ npx @sxnalabs/burnlog
It walks ~/.codex/sessions/**/*.jsonl, reads the usage each rollout recorded, and prints your total.
- 02Sign in and sync
GitHub sign-in puts the total on the board. The same run uploads it.
Getting the cached tokens right
OpenAI reports cached tokens inside prompt_tokens, not beside it: the cached count is a subset of the number you already have. Add the two and you have counted your cache reads twice, at the full input price.
burnlog subtracts before bucketing, which is not a detail — on a long Codex session, cache reads routinely outweigh fresh input, and double counting them is the difference between an estimate you can quote and a number that just looks impressive.
Codex and Claude Code together
Most people run both. burnlog reads both in the same pass, tags each event with the agent that produced it, and shows the split on your profile, so 'which agent am I actually burning through' stops being a guess.
Anything that writes to ~/.burnlog/events/*.jsonl is picked up on the next sync, in any language, without waiting for a burnlog release. That open sink is how a tool burnlog has never heard of still lands on the board.
What burnlog can't see
Put Codex on the board
One command. It scans, shows you your numbers, and only then asks for an account.