Author: Joffrey Lartigaud · License: MIT
Unofficial Cursor extension for VS Code–compatible editors. Monitor your plan credits, daily spend, and per-model usage costs from a credit-card icon in the status bar.
Français — see README.fr.md
- Status bar indicator — credit card icon on the right, always visible
- Hover tooltip — API and Auto credit progress bars, billing cycle, daily $ breakdown
- Click menu — QuickPick with today’s total, per-model stats (cost, requests, tokens)
- Detail views — full-day report and per-model request log in the editor
- Insights — rule-based tips: cycle projection, API alerts, daily spikes, dominant models, agents
- Privacy-first — reads your local Cursor session only; no third-party servers
- Cursor (or a VS Code build with Cursor authentication)
- A signed-in Cursor account with an active plan
npm install
npm run compile
npm run package
cursor --install-extension cursor-billing-0.1.4.vsixOr in the editor: Extensions → ⋯ → Install from VSIX…
- Clone the repository
- Run
npm install && npm run compile - Press F5 to launch an Extension Development Host
| Action | Result |
|---|---|
| Hover the icon | API/Auto remaining %, progress bars, daily spend |
| Click the icon | Statistics menu — models, costs, tokens |
| Enter on “Today” | Full detail document for the current day |
| Enter on a model | Model breakdown + request list |
| Command palette | Cursor Billing: Refresh / Cursor Billing: Statistics |
| Setting | Default | Description |
|---|---|---|
cursorBilling.refreshIntervalSeconds |
300 |
Refresh interval (min. 60 s) |
cursorBilling.dailyHistoryDays |
14 |
Days in daily spend history |
cursorBilling.sessionToken |
"" |
Manual session token (optional) |
Settings labels and descriptions are localized in English and French via package.nls.json.
By default, the extension reads your Cursor access token from the local SQLite database (state.vscdb) and resolves your user ID from Sentry scope files — the same approach as other community Cursor usage tools.
Optionally, set cursorBilling.sessionToken to your WorkosCursorSessionToken cookie value from cursor.com/dashboard.
Your token never leaves your machine except when calling Cursor’s own APIs.
This extension uses reverse-engineered dashboard endpoints. They may change without notice.
| Endpoint | Purpose |
|---|---|
GET /api/usage-summary |
Plan credits, API/Auto %, billing cycle |
POST /api/dashboard/get-aggregated-usage-events |
Official per-model costs (totalCostCents) |
POST /api/dashboard/get-filtered-usage-events |
Request counts, event log, daily history |
POST …/GetCurrentPeriodUsage |
Fallback when usage-summary is unavailable |
Cost figures use Cursor’s chargedCents / totalCostCents fields (fractional USD cents), reconciled with the dashboard where possible.
Before publishing to Open VSX or the VS Code Marketplace:
- Set a unique
"publisher"inpackage.json(replace"local") - Add
"repository","bugs", and"homepage"URLs - Add a 128×128 PNG icon at
assets/icon.pngand set"icon": "assets/icon.png" - Create a publisher account and run:
npm run compile
npx vsce publish # VS Code Marketplace
# or
npx ovsx publish # Open VSX (Cursor-friendly)This is not an official Cursor product. It is not affiliated with, endorsed by, or supported by Anysphere. Use at your own risk.
MIT — Copyright © 2026 Joffrey Lartigaud. See LICENSE.
Do not commit cursorBilling.sessionToken, .env files, or VSIX builds. Tokens stay on your machine and in your editor settings only.
Project cost tracking stores a folder name + hashed path key in Cursor’s extension global storage (globalStorage/joffreylartigaud.cursor-billing/ on your machine). Nothing is written inside your project folders or this git repository. Disable with cursorBilling.trackProjectCosts or run Cursor Billing: Clear project cost history.