Unchanged files do not need another parse.
A local SQLite event store keeps normalized events and parse diagnostics. It also powers optional history for session files that have left the disk.
How the event store works~/.claude · ~/.codex · ~/.gemini · 13 more
Sixteen coding tools already write session logs to your disk. llm-usage reads them in place, prices what it can — and marks what it can’t — then turns the result into reports you can inspect, compare, and export. Nothing leaves your machine.
Example: llm-usage compare --source codex,claude reads 49 session files with 2,080 events and compares 2026-01 against 2025-12 — 117.8 million total tokens versus 84.9 million (up 38.7%), $662.35 versus $476.41 (up 39.0%), with per-source cost deltas for codex and claude.
# 01 · reports
Start with a calendar rollup, then move to sessions, repositories, or candidate pricing when you need a narrower answer.
Roll up tokens and estimated cost by day, week, or month. Compare two windows or chart a daily trend.
llm-usage daily llm-usage weekly llm-usage monthly llm-usage compare llm-usage trendsRank conversations by cost, inspect a matching session ID, or group the same history by repository.
llm-usage session llm-usage session --by-repoJoin repo-attributed usage with your commits and line changes. Use the ratios as review signals, with the raw denominators beside them.
llm-usage efficiency monthlyReplay the token mix you observed against candidate pricing without changing your source data.
llm-usage optimize monthlyProbe every discovery path, inspect the event ledger, and preview retained-history cleanup before deleting anything.
llm-usage doctor llm-usage prune llm-usage config showSummarize active days, streaks, models, sources, tokens, and estimated cost in one terminal recap or SVG.
llm-usage wrappedStream every normalized event as JSONL or CSV for jq, DuckDB, or warehouse workflows — with published JSON Schemas to validate any report output against.
llm-usage events --format csv llm-usage schema usage# 02 · pipeline
The useful engineering sits between the files and the table. Every report runs the same pipeline, so sixteen different log formats behave like one dataset.
Find each tool’s local data in its default location, or the paths in your TOML config.
Convert source-specific records into one deterministic usage-event shape.
Keep explicit cost when a tool recorded it; estimate the rest from cached LiteLLM data.
Aggregate once, then render terminal tables, JSON, Markdown, or SVG.
A local SQLite event store keeps normalized events and parse diagnostics. It also powers optional history for session files that have left the disk.
How the event store worksReports mark partial estimates with ~ and unresolved rows with-. The cost engine does not invent a rate for a token bucket it cannot price.
# 03 · sources
Each adapter discovers its tool’s local data — JSONL, JSON, or SQLite — and converts it into the same usage event. Filters, pricing, aggregation, and exports work identically after that boundary.
See discovery paths and overrides# 04 · wrapped
llm-usage wrapped recaps active days, streaks, models, sources, tokens, and estimated cost — in the terminal, or as an SVG you can share.
# 05 · benchmarks
The benchmark records eight-run medians on stable snapshots of real local corpora and publishes the machine, commands, application state, and dataset size. The current direct comparison favors ccusage; a separate launcher test explains why npx can reverse the result you see at the shell.
Read the benchmark and reproduce it# 06 · start