Skip to content

About

Cursor IDE Extension to track Cursor Plan Usage in real time. Basically brings the data from Cursors Config tab into a more acessible tab.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Cursor Plan Usage

See Cursor plan usage without leaving the editor. A sidebar and the status bar show Cursor Models and Other Models percentages, on-demand spend, and git-aware windows.

Website · Open VSX · Issues

Built for Cursor. It reads Cursor’s local session and calls Cursor’s dashboard API. "extensionKind": ["ui"] keeps it on the local machine, including in Remote SSH and WSL windows.

Install

Marketplace. In Cursor, open the Extensions view and search for Cursor Plan Usage. That view installs from Open VSX.

Open VSX. CodyKoInABox.cursor-plan-usage.

VSIX. Download a .vsix from GitHub Releases and run Extensions: Install from VSIX….

Open Plan Usage in the activity bar, or run Plan Usage: Focus.

Features

  • Sidebar — Cursor Models and Other Models percents. Included plan spend ($3.40 / $20.00 included) appears under the plan name when both amounts are present. Each meter can show an end-of-cycle projection and a rough %/h estimate from the last hour.
  • Status bar — CM n% · OM n% for the billing cycle, or deltas for Usage so far, Since last commit, or This branch. If a git window is selected and that window is hidden, the chip falls back to the cycle totals.
  • Billing cycle — progress through the period and when it ends. The sidebar projects from 1% of the cycle onward. Budget alerts wait until 5%.
  • Last hour — plan percent over roughly the last hour. Samples are kept across reloads. If sampling paused while Cursor was closed or unfocused, the row is marked as an outdated sample.
  • IDE session — plan percent since this extension session started. It is not restored from disk.
  • Usage so far — resettable window stored in global state. A new billing cycle clears it and starts again from the new period.
  • Since last commit — plan percent while the working tree is dirty at the current HEAD. Hidden when the tree is clean. A new HEAD starts a new window.
  • This branch — plan percent while a feature branch is checked out. Time on other branches is left out and restored when you come back. Hidden on the default branch, on a detached HEAD, and while the default branch is still unknown.
  • On-demand — spend beyond the plan against the cap set in Cursor, with what is left. Shows Off when on-demand is disabled, and spend only when the cap is unlimited. Hidden when the usage response has no spend-limit block.
  • Alerts — at 80% and 95% by default, once per threshold per meter per billing cycle (Cursor Models, Other Models, and a fixed on-demand cap). An optional budget warning fires once per cycle per meter when the end-of-cycle projection passes it. With alerts on, a separate warning fires once in the last 24 hours before the session token expires.
  • History — a collapsed chart of daily Cursor Models and Other Models gains for the last 14 days. Daily peaks are kept for 35 days.
  • Refresh — when the window gains focus, on a timer while Cursor is focused, and when ~/.cursor/ai-tracking updates (Agent / AI edits). The timer pauses while Cursor is unfocused. A usage request that does not finish is aborted after 15 seconds.
  • Settings page — gear in the sidebar header and on the view title. It reads your values when it opens and saves each change to user settings.

Plan Usage sidebar showing Cursor Models, Other Models, and git-aware usage windows

Commands

Command What it does
Plan Usage: Focus Open the Plan Usage sidebar
Plan Usage: Refresh Fetch usage again, ignoring the usual gap between requests
Plan Usage: Open Settings Open the settings page in the sidebar
Plan Usage: Set Session Token Store a WorkosCursorSessionToken (user_…::eyJ…) or JWT in SecretStorage. While set, it overrides the token from Cursor’s local database. It is not written to settings.json
Plan Usage: Clear Session Token Remove that override and use Cursor’s local database again
Plan Usage: Export Usage (CSV) Save daily history (up to 35 days) as date,cycle,cm_peak_percent,om_peak_percent. No token or account data
Plan Usage: Copy Diagnostics Copy versions, platform, token origin and expiry (never the value), the last error kind, and recent debug lines when debug is on. Emails and tokens are redacted

There is no sessionToken setting. Use Set / Clear Session Token. A leftover cursorPlanUsage.sessionToken setting is removed. If SecretStorage does not already hold an override, that value is copied there first.

Auth order: SecretStorage override, if one is set; otherwise the token from Cursor’s local state.vscdb.

Settings

The settings page covers every cursorPlanUsage.* setting except apiBaseUrl. That one stays in the Cursor Settings editor. It is application-scoped: only the user value is read, and only https://api2.cursor.sh is accepted, so a workspace cannot choose where the session token is sent.

Setting Default Description
cursorPlanUsage.pollIntervalSeconds 0 Idle poll interval in seconds while Cursor is focused. 0 = adaptive (30s for 2 min after AI activity, then 3 min). Any other value overrides the idle interval, but waits at least 12 seconds (the minimum gap between usage requests). Maximum 2147483 (about 24.8 days). Polling pauses while unfocused; AI activity and focus still refresh.
cursorPlanUsage.refreshOnAiActivity true Near-real-time refresh when Cursor's local AI tracking DB updates (Agent / AI edits).
cursorPlanUsage.statusBarMode absolute What the status bar chip shows. absolute: total usage in the current billing cycle (CM 45% · OM 20%). usageSoFar: usage since you last pressed Reset (CM +4% · OM +2%). sinceLastCommit: usage since last commit while the working tree is dirty (CM +1% · OM +0%). thisBranch: usage while the current feature branch was checked out (CM +3% · OM +1%).
cursorPlanUsage.alerts true Show a warning when Cursor Models, Other Models, or the on-demand cap crosses an alert threshold. Each threshold alerts once per billing cycle.
cursorPlanUsage.alertThresholds [80, 95] Usage percentages that trigger a warning, for example [80, 95]. Whole numbers from 1 to 100. Set to [] to turn threshold alerts off.
cursorPlanUsage.monthlyBudgetPercent 0 Optional budget as a percent of the plan (0–1000). Warns once per cycle per meter when the end-of-cycle projection is above it. 0 = off. Projections are shown only after 5% of the cycle has passed.
cursorPlanUsage.debug false Write refresh, API, and auth diagnostics to the Plan Usage output channel (View: Toggle Output, then select “Cursor Plan Usage”). Tokens and keys are never logged.
cursorPlanUsage.apiBaseUrl https://api2.cursor.sh Cursor API base URL for dashboard RPC calls. Only the user value is read, and only https://api2.cursor.sh is accepted. A workspace cannot change where the session token is sent. Not on the settings page.

Privacy

The session token is resolved in memory. This extension does not put it in settings.json, logs, or the sidebar.

  1. SecretStorage. Plan Usage: Set Session Token stores the override under cursorPlanUsage.sessionToken in Cursor’s SecretStorage. While it is set, the local database is not used for requests.
  2. state.vscdb. Otherwise the token is read from Cursor’s global storage: %APPDATA%\Cursor\User\globalStorage\state.vscdb on Windows, ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb on macOS, and ~/.config/Cursor/User/globalStorage/state.vscdb on Linux. The same read picks up membership type and the cached account email. The email is not shown. Diagnostics redact email addresses.
  3. In place, then a small-file fallback. A normal database and a WAL database are read in place. The live file is never modified. Copying is only a fallback when that read fails and the file is 32 MiB or smaller: the copy is temporary, and it is deleted after the read. A larger file that cannot be read in place is refused. Plan Usage: Set Session Token does not read the database.
  4. Decryption. A plain JWT is used as-is. A user_…::eyJ… cookie value contributes the JWT segment. A value prefixed with cursor-safe-storage:v1: is decrypted in memory. On Windows that uses DPAPI (powershell.exe, CurrentUser) to unwrap the key in Cursor’s Local State, then AES-256-GCM. macOS uses the “Cursor Safe Storage” keychain item. Linux uses Secret Service (secret-tool), or Chromium’s peanuts fallback. App-bound v20 blobs are not decrypted.

The only network calls are dashboard requests to https://api2.cursor.sh. Any other host is refused before the token is attached. The extension does not send its own telemetry.

Platforms

Windows is the platform exercised on real installs. macOS and Linux database paths, and the keychain / secret-tool lookups, are covered by unit tests and have not been checked on real machines. Plan Usage: Copy Diagnostics is the useful attachment for a report. Read it once before sharing; it is redacted, and it is still your machine’s output.

Troubleshooting

Symptom What to try
No Cursor session found Sign in to Cursor, or run Plan Usage: Set Session Token with a WorkosCursorSessionToken or JWT.
Session token expired An override asks for a fresh JWT, or for the override to be cleared. Cursor’s own token asks you to sign in again so Cursor can refresh it.
Cursor rejected the session The API returned 401 or 403. Sign in again, or set a fresh JWT with Plan Usage: Set Session Token.
Session token could not be decrypted The stored value could not be unsealed, including an app-bound v20 blob. Sign in again, or set a JWT with Plan Usage: Set Session Token.
DPAPI unprotect failed (Windows) Decryption starts powershell.exe. AppLocker, WDAC, or a similar policy can block it. Set a JWT with Plan Usage: Set Session Token.
state database is too large to copy The file could not be read in place and is over 32 MiB, so it is not copied. Plan Usage: Set Session Token does not read state.vscdb.
API base URL was refused Set cursorPlanUsage.apiBaseUrl to https://api2.cursor.sh, or remove it. A workspace value is ignored.
Cursor did not respond in time The usage request was aborted after 15 seconds. Run Plan Usage: Refresh.
Unexpected response from Cursor The usage payload did not match the shape this version expects. Check for an extension update.
Remote SSH / WSL Usage comes from the local session database. Since last commit and This branch stay hidden when the built-in Git extension has no repository.

Notes

Usage comes from Cursor’s Connect-RPC dashboard methods (GetCurrentPeriodUsage, GetPlanInfo). Those endpoints are unofficial and can change.

Stability

From 1.0.0, the commands and the cursorPlanUsage.* settings are the stable surface. A breaking change to them is deprecated first, written up in CHANGELOG.md, and not removed before the next minor release. Internal modules, webview markup, and log output are not covered. That is a working practice so callers are not surprised, not a freeze: the project can still evolve.

Contributing

Issues and pull requests: github.com/CodyKoInABox/cursor-plan-usage. Commands and cursorPlanUsage.* settings follow Stability.

npm ci
npm run check
npm test

npm run compile builds out/. npm run package builds a VSIX (vsce package --no-dependencies).

License

GPL-3.0-only. Copyright (C) 2026 Maruan Biasi El Achkar.

About

Cursor IDE Extension to track Cursor Plan Usage in real time. Basically brings the data from Cursors Config tab into a more acessible tab.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages