Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cursor Team On-Demand Usage IndicatorNew to Visual Studio Code? Get it now.
Cursor Team On-Demand Usage Indicator

Cursor Team On-Demand Usage Indicator

Paulo Junior

|
3 installs
| (0) | Free
Real-time Cursor Team on-demand usage tracking in your VS Code status bar
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cursor Team On-Demand Usage Indicator

Shows Cursor on-demand spend directly in the VS Code status bar.

Features

  • Status bar indicator with today's spend, for example: $ 42.10 today
  • One-click QuickPick menu with details (today + MTD + cycle dates), refresh, logout, and open dashboard actions
  • Login flow via Chrome + DevTools Protocol cookie capture
  • Manual cookie paste fallback when browser automation is unavailable
  • Secure cookie storage using vscode.SecretStorage

Status Bar UX

The extension follows VS Code status bar guidelines:

  • single status bar item
  • short label text
  • one icon per state
  • contextual item on the right side

References:

  • Status Bar UX guidelines
  • Status bar sample extension

Settings

This extension contributes:

  • cursorUsage.teamId (string, required): Cursor team ID used for API requests
  • cursorUsage.refreshIntervalSeconds (enum: 10, 15, 30, 60, default 30)

If cursorUsage.teamId is missing, the status bar shows Cursor: Setup and opens settings on click.

Login & Session

  • Preferred flow: Login with Chrome then Finish Login
  • Fallback flow: Paste Cookie Manually
  • Session token is stored in VS Code secret storage (OS keychain-backed)

The extension also attempts one-time import from legacy file ~/.cursor-session for compatibility with the shell prototype.

Development

npm install
npm run compile
npm run lint
npm test

CI/CD

Pre-commit hooks (via Husky):

  • Runs lint, compile, and unit tests before every commit
  • Prevents broken code from being committed

GitHub Actions:

  • Runs on every push and pull request to main/master
  • Executes: lint → compile → unit tests → build verification
  • See .github/workflows/ci.yml for details

Run Locally (Extension Development Host)

  1. Open this folder in VS Code or Cursor.
  2. Run:
npm install
npm run compile
  1. Press F5 to launch an Extension Development Host window.
  2. In the new window:
    • Open settings and set cursorUsage.teamId
    • Click the status bar item (Cursor: Setup or Cursor: Login)
    • Use Login with Chrome (or Paste Cookie Manually)
  3. Validate states:
    • Missing team id -> Cursor: Setup
    • Missing/expired session -> Cursor: Login
    • Valid session -> $(credit-card) $ ... (Xd cycle end)

Tip: You can also run Developer: Reload Window in the development host after changes.

Generate a VSIX

Yes. You can package this extension as a .vsix file.

npm install
npm run vsix:package

This generates a file like:

cursor-team-on-demand-usage-indicator-0.0.1.vsix

Install it locally with:

code --install-extension cursor-team-on-demand-usage-indicator-0.0.1.vsix

Or in VS Code/Cursor: Extensions: Install from VSIX...

Publish to VS Code Marketplace

Prerequisites:

  1. Add your publisher in package.json:
{
  "publisher": "your-publisher-id"
}
  1. Create a Personal Access Token in Azure DevOps for Marketplace publishing.

Then publish with:

export VSCE_PAT="your_marketplace_token"
npm run vsix:publish

Version bump publish helpers:

npm run vsix:publish:patch
npm run vsix:publish:minor
npm run vsix:publish:major

How to Use

  1. Set cursorUsage.teamId in Settings.
  2. Click the status bar item.
  3. Choose one login method:
    • Login with Chrome, then Finish Login
    • Paste Cookie Manually (fallback)
  4. Once authenticated, the status bar refreshes automatically using cursorUsage.refreshIntervalSeconds.
  5. Click the status bar item anytime for:
    • usage details
    • refresh now
    • logout
    • open Cursor dashboard

Tests

  • Unit tests (mocha): JWT/session/api/status bar logic
  • VS Code smoke tests (vscode-test): extension activation and command registration
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft