Who it is forA developer or team lead who pays for coding-agent usage and wants to compare agents and models over a set period.
The problemUsage is split across each client's own records, so comparing agents, models, and periods takes manual work.
The outcomeA usage page that totals tokens and estimated cost by agent and model for a chosen range, with cache tokens shown separately and estimates labeled.
What you need first
- Python 3.11 or newer on macOS or Linux, or Windows through WSL, with pipx available (or the signed macOS app from the latest release on macOS 14+)
- At least one supported coding agent with local session logs on this machine, such as Claude Code or Codex
- Permission to open a new agent session after setup, because hooks and MCP servers bind at session start
Steps
- Run
agentacct tuiand open the usage view - Set the date range, then filter by agent, model, or provider
- Read the totals by agent and by model for the selected range
- Check the freshness stamp in the top bar before trusting the numbers
Prompt for your agent
Use the agentacct repo at https://github.com/mikehasa/agentacct to report token totals and estimated cost by agent and by model for the last 7 days on this machine. Verify that cost figures are labeled as estimates and that the local data freshness stamp is shown.
Caveat. Dates show session totals by activity date, so sessions that span several days are not split into exact daily spend.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page