Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cursor Usage MonitorNew to Visual Studio Code? Get it now.
Cursor Usage Monitor

Cursor Usage Monitor

lixen

|
7 installs
| (0) | Free
Real-time display of Cursor AI usage statistics in the status bar
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cursor Usage Monitor

License: MIT VS Code

A VS Code extension that displays real-time Cursor AI usage statistics in the status bar. Monitor your API usage, track remaining requests, and stay informed about your billing cycle.

Status Bar Preview

Current Status

Note: All Cursor plans (Free, Pro, Business) now use usage-based billing (token-based). This extension automatically detects your account type and displays usage accordingly.

Features

  • Auto Token Detection: Automatically reads your Cursor authentication token from local SQLite database
  • Auto Account Detection: Detects your billing type from Cursor API
  • Real-time Status Bar Display: Clean, minimal display showing today's cost or request count
  • Usage-Based Support: Shows cost in dollars/cents for token-based billing
  • Detailed Usage Panel: Click to view usage statistics with Apple-inspired design
  • Activity History: View recent requests with model, tokens, and cost
  • Auto-refresh: Configurable automatic refresh interval
  • Secure Token Storage: Your API credentials are stored securely using VS Code's secret storage
  • Debug Logging: Output channel for troubleshooting

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Press Ctrl+P / Cmd+P
  3. Type ext install cursor-usage
  4. Press Enter

From VSIX File

  1. Download the .vsix file from Releases
  2. Open VS Code
  3. Press Ctrl+Shift+P / Cmd+Shift+P
  4. Type "Install from VSIX"
  5. Select the downloaded file

Build from Source

# Clone the repository
git clone https://github.com/lixwen/cursor-usage-monitor.git
cd cursor-usage-monitor

# Install dependencies
npm install

# Compile
npm run compile

# Package
npm run package

Configuration

Automatic Token Detection

The extension automatically detects your Cursor authentication token from Cursor's local SQLite database. No manual configuration is needed - it works out of the box on all platforms.

How it works:

  • Uses sql.js (pure JavaScript SQLite implementation)
  • No external dependencies required
  • Falls back to sqlite3 command if available

Manual Token Setup (if auto-detection fails)

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Type "Cursor Usage: Set Session Token"
  3. Follow the instructions to get your token from browser cookies

How to get your token manually:

  1. Open https://cursor.com/settings in your browser
  2. Press F12 to open Developer Tools
  3. Go to Application → Cookies → cursor.com
  4. Find WorkosCursorSessionToken and copy its value
  5. Paste the token when prompted

Extension Settings

Configure the extension in VS Code settings (File > Preferences > Settings):

Setting Description Default
cursorUsage.refreshInterval Refresh interval in seconds (minimum 60) 60
cursorUsage.showInStatusBar Show usage information in status bar true
cursorUsage.displayMode Display mode: requests, percentage, or both both
cursorUsage.billingModel Your billing plan: free, pro, business, or usage-based pro
cursorUsage.autoDetectToken Automatically detect token from Cursor's local database true

Example Settings

{
  "cursorUsage.refreshInterval": 300,
  "cursorUsage.showInStatusBar": true,
  "cursorUsage.displayMode": "both",
  "cursorUsage.billingModel": "pro",
  "cursorUsage.autoDetectToken": true
}

Commands

Command Description
Cursor Usage: Refresh Usage Data Manually refresh usage statistics
Cursor Usage: Show Usage Details Open detailed usage panel
Cursor Usage: Set Session Token Configure your Cursor session token
Cursor Usage: Clear Saved Token Clear stored token (useful for debugging)

Status Bar Display

The status bar shows your usage in a clean, minimal format:

Billing Type Display Example Description
Usage-Based Cursor $0.03 Today's cost in dollars
Usage-Based Cursor 2.64¢ Today's cost in cents (if < $0.01)
Request-Based Cursor 5/50 Requests used / limit

Billing Plans

All Cursor plans now use token-based billing:

Plan Billing Type Display
Free Usage-Based (Token) Cost per request
Pro Usage-Based (Token) Cost per request
Business Usage-Based (Token) Cost per request

Privacy & Security

  • Secure Storage: Your API credentials are stored using VS Code's secure secret storage
  • Local Processing: All data processing happens locally on your machine
  • No Telemetry: This extension does not collect or transmit any usage data

Troubleshooting

"Not authenticated" Error

  1. Ensure you're logged in to Cursor (the application, not the browser)
  2. Check if sqlite3 is installed: run sqlite3 --version in terminal
  3. Check the Output panel (Ctrl+Shift+U → select "Cursor Usage Monitor") for detailed logs
  4. Try setting the session token manually via Command Palette
  5. Make sure to copy the complete token value (including user_XXXXX:: prefix)
  6. Restart VS Code after setting the token

Auto-detection Not Working

  1. Ensure Cursor is installed and you have logged in at least once
  2. Verify sqlite3 is installed on your system
  3. Check the Output panel for error messages
  4. Try disabling auto-detection (cursorUsage.autoDetectToken: false) and set token manually

Data Not Updating

  1. Check your internet connection
  2. Try the "Refresh Usage Data" command
  3. Session tokens may expire - try setting a new token from browser cookies

Status Bar Not Visible

  1. Check that cursorUsage.showInStatusBar is set to true
  2. Look for the item on the right side of the status bar
  3. Try reloading VS Code (Ctrl+Shift+P → "Reload Window")

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development

# Install dependencies
npm install

# Watch mode for development
npm run watch

# Run linter
npm run lint

# Build for production
npm run compile

Project Structure

cursor-usage/
├── src/
│   ├── extension.ts      # Extension entry point
│   ├── cursorApi.ts      # Cursor API service
│   ├── statusBar.ts      # Status bar management
│   └── types.ts          # TypeScript type definitions
├── package.json          # Extension manifest
├── tsconfig.json         # TypeScript configuration
├── README.md             # This file
└── LICENSE               # MIT License

Roadmap

Account Type Support

Account Type Status Notes
Free ✅ Supported Token-based billing
Pro ✅ Supported Token-based billing
Business ✅ Supported Token-based billing
Team ✅ Supported Token-based billing

Planned Features

  • [x] Support for all account types
  • [x] Auto-detect account type from API
  • [x] Usage-Based billing (cost tracking)
  • [ ] Multi-account switching support
  • [ ] Usage history and trends visualization
  • [ ] Export usage data to CSV/JSON

Changelog

0.1.5

  • New: All account types now supported (Free, Pro, Business, Team)
  • New: Auto-detect billing type from /api/auth/stripe
  • New: Apple-inspired minimal design for details panel
  • Improved: Clean status bar format: Cursor $0.03 or Cursor 2.64¢
  • Improved: Activity list shows recent requests with time, model, tokens, cost
  • Fixed: Correct parsing of tokenUsage.totalCents from API

0.1.4

  • New: Support for usage-based billing detection
    • Automatically detects billing type (request-based vs usage-based)
    • Shows cost for usage-based billing, requests for request-based
    • Detailed tooltip shows recent requests and costs
  • Improved: Cleaner status bar display

0.1.3

  • Improved: No longer requires sqlite3 to be installed
    • Uses sql.js (pure JavaScript SQLite) for token detection
    • Falls back to sqlite3 command if sql.js fails
    • Works out of the box on all platforms

0.1.2

  • Improved: Friendlier status bar icons without pressure
    • Replaced warning/flame icons with check/graph/zap/rocket
    • Removed colored backgrounds for normal usage levels
    • Only highlight when requests are completely exhausted

0.1.1

  • New: Automatic token detection from Cursor's local SQLite database
  • New: autoDetectToken configuration option (default: enabled)
  • New: Clear Saved Token command for debugging
  • New: Output channel logging for troubleshooting
  • Improved: Error handling and logging throughout the extension

0.1.0

  • Initial release
  • Real-time status bar display
  • Team account support (request-based billing)
  • Detailed usage panel
  • Configurable refresh interval

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Cursor - The AI-first code editor
  • VS Code Extension API - For excellent documentation

Enjoy! If you find this extension helpful, please consider giving it a ⭐ on GitHub!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft