7. What AI costs you
Allow tmgr to read agent logs, then see tokens, cost and rate limits by day, branch or task.
This lesson shows how much your AI agents cost: tokens, cost and rate limits, counted from the local logs of Claude Code and Codex.
Video transcript
Lesson seven: what your AI agents cost. tmgr reads the local logs of Claude Code and Codex, and counts tokens, cost and limits. The logs in this demo are generated.
Consent
First, permission: logs are read only with your consent.
tmgr usage consent allowtmgr keeps token counts, models, times and branches, but never the text of prompts or replies. Nothing leaves your device unless you turn on sync yourself.
This week
Usage for the week: cost by model, input and output tokens, and cache reads and writes.
tmgr usage --weekThis is the API list-price equivalent, not your subscription bill.
Breakdown
The --by flag groups usage by day, project, branch or task.
tmgr usage --week --by dayGrouped by branch, you can see right away which feature cost the most.
tmgr usage --week --by branchTask attribution appears when agents work through run or agent start.
Limits
This shows your rate-limit windows, the percentage used, and the time until reset.
tmgr usage limitsFor Claude Code, the data comes from the status line hook. tmgr usage statusline install shows the change to the Claude Code settings; add --install to apply it:
tmgr usage statusline install --installNext
In the next lesson: personas, and a shared skills library for your agents. See 8. Personas and skills.