Set up tracking in a repo
- Open a terminal in the root of the repo you want tracked and run:
It adds.cursor/hooks.json+.cursor/hooks/capture.js(andcapture.sh/capture.cmd) — merging with any existing hooks — and writes~/.cursor-cost-tracker.envon your machine if you don't have one. - Restart Cursor (or File → Close Folder → reopen). Hooks are loaded when the folder opens.
- Run any agent prompt — it appears on this page within a few seconds; its cost fills in within about an hour (Cursor's aggregation lag).
- Commit
.cursor/hooks.jsonand.cursor/hooks/capture.js(pluscapture.sh/capture.cmd) so teammates who pull the repo are tracked too. Repeat step 1 for each repo.
Already have the repo files (e.g. after a pull) but no ~/.cursor-cost-tracker.env? Create it:
Remove tracking from a repo:
Billing cycle · per user
Captured prompts · cost by user (window)
Per prompt (window)
Cost columns: Cursor = what the dashboard shows (Included, or $ for usage-based). @model-rate = what the tokens would cost at model list price (also shown for included requests). Per-prompt attribution is by time within a conversation; per-user and per-conversation totals are exact. Cursor's usage data lags up to ~1 h.