Track opencode token usage
Counted from disk, any provider, history included. opencode records tokens for every assistant message; burnlog reads them.
read from local logs · free · open-source CLI · tokens only
Counting opencode in under a minute
- 01
Paste the prompt into your agent
Copy the setup prompt from burnlog.net and paste it into any coding agent. It installs the CLI, shows you your numbers first, and asks before anything is uploaded.
- 02
Or run it yourself
$ npx @sxnalabs/burnlogburnlog finds every agent on the machine, reads its usage, and offers GitHub sign-in.
- 03
Keep it current
$ burnlog installInstalls a hook so future sessions sync themselves.
What burnlog reads
opencode keeps one JSON file per message under ~/.local/share/opencode/storage. Assistant messages carry input, output, reasoning and cache counts, plus the model and provider. burnlog reads those fields and skips the message text.
Because opencode records the provider itself, a Claude, GPT or local model run through opencode is attributed correctly on your profile.
What burnlog can't see
- Messages from before opencode started recording tokens have nothing to count.
Put opencode on the board
One command. It scans, shows you your numbers, and only then asks for an account.
$ npx @sxnalabs/burnlogOther agents
Claude Code · Codex · Cursor · Gemini CLI · aider