Skip to main content
The Cursor provider tracks usage for the Cursor code editor, fetching usage and billing data via browser cookies or a stored WebKit session.

Features

  • Plan usage tracking (included plan)
  • On-demand usage tracking (individual usage)
  • Billing cycle window with reset date
  • Automatic and manual cookie authentication
  • WebKit-based login flow for session storage
  • Status page integration with Cursor incidents

Authentication Methods

Cursor is web-only and uses browser cookies for authentication:

Data Source Fallback Order

  1. Cached cookie header (preferred)
    • Keychain cache: com.steipete.codexbar.cache, account cookie.cursor
  2. Browser cookie import
    • Safari → Chrome → Firefox (default order)
    • Can be customized via provider metadata
  3. Stored session cookies (fallback)
    • From WebKit login flow
    • Stored at ~/Library/Application Support/CodexBar/cursor-session.json

API Endpoints

CodexBar fetches data from the following Cursor APIs:

Usage Summary

GET https://cursor.com/api/usage-summary
Returns:
  • Plan usage (included)
  • On-demand usage
  • Billing cycle window

Authentication

GET https://cursor.com/api/auth/me
Returns:
  • User email
  • User name

Legacy Usage (Request-Based)

GET https://cursor.com/api/usage?user=ID
Returns:
  • Request counts + limits (legacy format)

Snapshot Mapping

CodexBar displays Cursor usage as follows:
  • Primary meter: Plan usage percent (included plan)
  • Secondary meter: On-demand usage percent (individual usage)
  • Provider cost: On-demand usage USD (limit when known)
  • Reset: Billing cycle end date

Status Page Integration

CodexBar monitors Cursor Status for incidents:
  • Polls Statuspage.io API every 5 minutes (configurable)
  • Displays incident badge on menu bar icon
  • Shows incident details in menu
  • Click “View Status” to open status page

Troubleshooting

You’re not logged into Cursor in any supported browser.Solution:
  1. Open https://cursor.com in Safari, Chrome, or Firefox
  2. Log in with your Cursor account
  3. Return to CodexBar and click “Refresh”
  4. Or use Manual mode to paste a cookie header
Safari cookie import requires Full Disk Access permission.Solution:
  1. System Settings → Privacy & Security → Full Disk Access
  2. Enable CodexBar
  3. Restart CodexBar
  4. Or use Chrome/Firefox cookies (no special permission needed)
Intel Macs may experience WebKit crashes during login teardown.Solution:
  • CodexBar uses WebKitTeardown to minimize crashes
  • If crashes persist, use Manual cookie entry instead
  • Or import cookies from Chrome/Firefox (no WebKit involved)

CLI Usage

# Show Cursor usage
codexbar --provider cursor
codexbar -p cursor

Key Files

  • Status probe: Sources/CodexBarCore/Providers/Cursor/CursorStatusProbe.swift
  • Login flow: Sources/CodexBar/CursorLoginRunner.swift

Build docs developers (and LLMs) love