r/devtools • • Oct 01 '26

I built Tokmeter, an open-source local ledger for AI coding usage and cost

I built Tokmeter to read the session files that AI coding tools already write to disk. It puts tokens and estimated cost in one ledger, broken down by project, model, provider and day. No account or provider API key is needed for the local scan.

There is a CLI, a macOS menu bar app and an MCP server. The MCP server lets an agent query usage, compare periods, and inspect budget or forecast estimates. Claude Code and Codex are the main validation targets; coverage for other tools varies. Cost estimates are labelled as estimates unless the source reports cost directly.

Source and setup: https://github.com/sriinnu/tokmeter

I would like to hear what would make this useful in your workflow. Is the daily total enough, or do you need the project and model breakdown to understand where the tokens went?

1 Upvotes

2 comments sorted by

1

u/kantorcodes1 Oct 03 '26

Where does the confirmation for the MCP cleanup tool actually live? The docs say cleanup deletes source session files and to keep the confirmation and backup steps, but an agent calling tokmeter_ tools over stdio never sees a CLI prompt - is that gate enforced inside serve, or left to the client?

1

u/invisibledharma Oct 05 '26

It’s in the cli. You can try ‘tokmeter cleanup’