Skip to content

About

A plugin that helps you to avoid losing money for nothing 💸

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Cursor Billing

Cursor Billing icon

License: MIT

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

Features

  • 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

Requirements

  • Cursor (or a VS Code build with Cursor authentication)
  • A signed-in Cursor account with an active plan

Installation

From VSIX (manual)

npm install
npm run compile
npm run package
cursor --install-extension cursor-billing-0.1.4.vsix

Or in the editor: Extensions → ⋯ → Install from VSIX…

From source (development)

  1. Clone the repository
  2. Run npm install && npm run compile
  3. Press F5 to launch an Extension Development Host

Usage

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

Configuration

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.

Authentication

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.

Data sources (unofficial)

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.

Publishing

Before publishing to Open VSX or the VS Code Marketplace:

  1. Set a unique "publisher" in package.json (replace "local")
  2. Add "repository", "bugs", and "homepage" URLs
  3. Add a 128×128 PNG icon at assets/icon.png and set "icon": "assets/icon.png"
  4. Create a publisher account and run:
npm run compile
npx vsce publish   # VS Code Marketplace
# or
npx ovsx publish   # Open VSX (Cursor-friendly)

Disclaimer

This is not an official Cursor product. It is not affiliated with, endorsed by, or supported by Anysphere. Use at your own risk.

License

MIT — Copyright © 2026 Joffrey Lartigaud. See LICENSE.

Security

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.

About

A plugin that helps you to avoid losing money for nothing 💸

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages