Skip to main content

Desktop tray toast + CLI for your Cursor subscription usage

Project description

cursorhub

Track your Cursor subscription usage from a desktop tray toast or the terminal.

  • Tray toast (cursorhub): an always-on-top card in the top-right corner showing your included-plan percentage, on-demand spend, and when the billing cycle resets. Refreshes every 5 minutes; dodges out of the way when your cursor gets near it.
  • CLI (cursorhub usage, or the dependency-free standalone/cursor_usage.py): print usage on demand as a table or JSON.

How it works

Cursor stores a session JWT in its local VS Code-style state database (state.vscdb, key cursorAuth/accessToken). Your userId is the sub claim of that token. Cursor's own web dashboard authenticates to cursor.com/api/* with a cookie WorkosCursorSessionToken={userId}::{token}. cursorhub reads the token, builds the same cookie, and calls GET /api/usage-summary.

This needs no API key and works for any signed-in Cursor user - Pro, Business, or a member of an Enterprise team. You do not need to be a team admin (the official api.cursor.com/teams/* Admin API is admin-only; cursorhub does not use it).

The state DB is read from:

OS Path
Windows %APPDATA%\Cursor\User\globalStorage\state.vscdb
macOS ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
Linux ~/.config/Cursor/User/globalStorage/state.vscdb

Install

pip install cursorhub

Or from a checkout:

pip install -e .

The tray app needs PySide6 (pulled in automatically). The standalone script needs nothing but Python 3.11+.

Usage

cursorhub                       # launch the tray toast
python -m cursorhub             # same thing

cursorhub usage                 # print a table (your usage)
cursorhub usage team            # your usage plus team usage
cursorhub usage --json          # normalized JSON
cursorhub usage --raw           # raw Cursor API responses (debugging)

python standalone/cursor_usage.py           # no install required
python standalone/cursor_usage.py --json

Example table (cursorhub usage):

Cursor usage  -  you@example.com  (enterprise)
====================================================
Included plan   [######------------------] 25.6%
                included 2000 + bonus 45 = 2045
On-demand (you) $0.00 / $300.00   left $300.00
Billing cycle   resets in 24d 13h   (2026-08-11T19:09:10.000Z)

  You've used 26% of your included total usage

With cursorhub usage team, team usage appears between the on-demand block and the billing cycle:

Cursor usage  -  you@example.com  (enterprise)
====================================================
Included plan   [######------------------] 25.6%
                included 2000 + bonus 45 = 2045
On-demand (you) $0.00 / $300.00   left $300.00

Team usage
On-demand (team)$342.16 / $2,500.00   left $2,157.84

Billing cycle   resets in 24d 13h   (2026-08-11T19:09:10.000Z)

  You've used 26% of your included total usage

Configuration (env vars)

Variable Purpose
CURSOR_SESSION_TOKEN Use this raw JWT instead of reading the state DB
CURSOR_STATE_DB Path to a non-default state.vscdb

Caveats

  • These dashboard endpoints are unofficial / internal to Cursor and can change without notice. Every call degrades to a clear error rather than crashing.
  • The session token expires when you sign out of Cursor. Sign back in and the tray toast recovers on its next refresh.
  • On-demand amounts are reported by Cursor in cents and shown here in whole dollars.

License

MIT - see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursorhub-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursorhub-0.1.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file cursorhub-0.1.2.tar.gz.

File metadata

  • Download URL: cursorhub-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cursorhub-0.1.2.tar.gz
Algorithm Hash digest
SHA256 27c734b7c2a01c5878d6df4ae4f8b0fc7aab316958b2737c876ec201c3fbb260
MD5 b747f8201ba4364770f8e1c8bff140f4
BLAKE2b-256 e58e8e27f804c9f62548e36e1018d725e69b640c52edba15f8289dbde0dbbe3c

See more details on using hashes here.

File details

Details for the file cursorhub-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cursorhub-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cursorhub-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c600b2e1d96ef678310fc97c684864a89108d75b779496c221583912b281112
MD5 ed95fd3f4d03e0865516e9d6baf0c3bd
BLAKE2b-256 dedd9d47b0e64f53987cab92bdf0ce91b2d1e35b14b4d49e27d87d9e717160fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page