See what Claude Code, Codex and Grok did, what it cost, and where they got stuck.
uvx ai-ledgerNeeds 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.
Questions it answers
Section titled “Questions it answers”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.
Keep the history your agents throw away
Section titled “Keep the history your agents throw away”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.
Built for a file full of secrets
Section titled “Built for a file full of secrets”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.1and 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.
Before you install
Section titled “Before you install”Is it free?
Section titled “Is it free?”Yes. AI Ledger is MIT licensed, with no paid tier and no account.
Which agents does it read?
Section titled “Which agents does it read?”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.
Does it run on Windows?
Section titled “Does it run on Windows?”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.
How accurate are the costs?
Section titled “How accurate are the costs?”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.
How do I remove it?
Section titled “How do I remove it?”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.
Start now
Section titled “Start now”uvx ai-ledgerTo keep it, install the ai-ledger command, so later starts skip the download:
uv tool install ai-ledger