Install and first run
In this tutorial we start AI Ledger for the first time, let it read every Claude Code, Codex and Grok transcript on the machine, and read the first figure it gives us. It takes about 10 minutes, most of it spent waiting for the first ingest.
We need a Mac or a Linux machine where Claude Code, Codex or the Grok CLI has already run, and a terminal.
Check that uv is installed
Section titled “Check that uv is installed”AI Ledger runs through uv. In a terminal, run:
uv --versionThe terminal prints uv’s version. If it says the command is not found, install uv with its install guide, open a new terminal and run uv --version again.
Start AI Ledger
Section titled “Start AI Ledger”Run:
uvx ai-ledgeruv downloads AI Ledger and starts it. The terminal prints:
serving http://127.0.0.1:8765/ (ingest every 60s)The browser opens http://127.0.0.1:8765/ on the Activity page. If no browser opens, open that address yourself.
Leave the terminal open. The app runs until we stop it there.
Wait for the first ingest
Section titled “Wait for the first ingest”The first start reads every transcript on the machine: Claude Code’s in ~/.claude/projects, Codex’s in ~/.codex and Grok’s in ~/.grok. While it reads, the navigation bar at the top of the page says Ingesting…, next to the Refresh button.
This takes a few minutes: about 5 minutes for a month of heavy use. The page fills in as it goes.
When the ingest is done, the terminal prints one line that counts what it read, for example:
ingest: 2140 files, 812345 new lines, 96 usage-data files (0 skipped), 231.4sThe navigation bar now shows the time of the ingest, such as 8:00 PM. Hover it or select it to see the details, with the number of new lines. The page loads the new figures by itself.
Read the first figure
Section titled “Read the first figure”Look at the heading of the Activity page. It sums up the last 30 days, for example:
214 commits from 1,032 prompts
That is what our coding agents got done this month. The Sessions tile under the work chart counts the sessions and the active days. Below the heading, the Needs attention card lists what to look at first, such as error loops or sessions that filled their context window.
Stop the app and install the command
Section titled “Stop the app and install the command”Go back to the terminal and press Ctrl+C. The app stops, and the page can no longer reach it.
uvx runs AI Ledger without installing it. For every later start, we install the ai-ledger command:
uv tool install ai-ledgerThen start the app with it:
ai-ledgerThe browser opens Activity again, with the same figures. This start is much faster: the store already holds every line, so the app reads only lines added since we stopped it.
What we have now
Section titled “What we have now”AI Ledger keeps its own copy of every transcript line in a local store, and reads new lines every 60 seconds while it runs. Our agents can delete their old transcripts; the store keeps them.
Next, take the 15-minute first tour of every page.
To learn more:
- How AI Ledger works: ingest, the store and its derived tables.
- Privacy and security model: the store holds full transcripts, secrets included.
- Data files and storage locations: where the store is on disk.
- CLI and options: every command and option.