Skip to content

See what Claude Code, Codex and Grok did, what it cost, and where they got stuck.

AI Ledger reads every Claude Code, Codex and Grok transcript on your machine and turns it into dashboards for spend, context, failed tool calls, plan limits and live sessions. Free and open source. Your transcripts never leave your machine.
Terminal window
uvx ai-ledger

Needs uv on macOS or Linux. The command opens http://127.0.0.1:8765/ in your browser. The first start reads every transcript, about 5 minutes for a month of heavy use, and the page fills in as it goes.

Two more: Activity’s Judgments view shows how Claude Code’s /insights judged your sessions, and the Project page shows one project across all of the above.

Claude Code deletes local transcripts after 30 days by default. AI Ledger copies every line into one DuckDB file on your disk and never deletes a line. Months later, you can still see what a refactor cost and which sessions it took. While the app runs, it reads new lines every 60 seconds.

Transcripts hold your prompts, file contents, command output and sometimes an API key. AI Ledger is built for that.

  • The store stays on your disk. It is one file that only your user can read. There is no account, no analytics and no update check.
  • Only your machine can connect. The server listens on 127.0.0.1 and refuses requests that other sites send from your browser.
  • Your tokens go only to their own provider. On macOS, the Limits page reads Claude Code’s OAuth token from the Keychain to ask Anthropic’s usage endpoint for your plan limits, at most once every 5 minutes. If the Grok CLI is signed in with grok.com, it does the same with that login’s token and xAI’s billing endpoint. The requests carry no transcript data, and each token goes nowhere else.
  • Your agents’ files stay as they are. AI Ledger opens transcripts read-only.
  • The code is open. AI Ledger is MIT licensed; read it on GitHub.

The full model, including the font request and what the pages show when you share your screen: Privacy and security model.

Yes. AI Ledger is MIT licensed, with no paid tier and no account.

Claude Code, from ~/.claude/projects, Codex, from ~/.codex, and the Grok CLI, from ~/.grok. It does not read other agents, such as Cursor. For what each agent records, see Supported agents. To read other folders, see CLI and options.

No. It runs on macOS and Linux. On Linux, the Limits page shows Codex and Grok windows only, because there is no Keychain to read Claude Code’s token from.

They are estimates at API list prices, from a price table that ships with each release. Grok’s cost is the one Grok reported. On a subscription, the Cost page compares them with what your plan costs. To set your own prices, see Configuration and How cost is estimated.

If you installed the command, run uv tool uninstall ai-ledger. If you only ran uvx, run uv cache clean ai-ledger. Then delete the data folder: ~/Library/Application Support/ai-ledger/ on macOS, ~/.local/share/ai-ledger/ (or $XDG_DATA_HOME/ai-ledger/) on Linux.

Terminal window
uvx ai-ledger

To keep it, install the ai-ledger command, so later starts skip the download:

Terminal window
uv tool install ai-ledger