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:- Automatic (Recommended)
- Stored WebKit Session
Automatic Cookie Import
CodexBar automatically imports cookies from your browsers.Setup:- Preferences → Providers → Cursor → Enable
- Cookie source is set to “Automatic” by default
- Log in to Cursor in any supported browser
- Safari:
~/Library/Cookies/Cookies.binarycookies - Chrome/Chromium:
~/Library/Application Support/Google/Chrome/*/Cookies - Firefox:
~/Library/Application Support/Firefox/Profiles/*/cookies.sqlite
cursor.comcursor.sh
WorkosCursorSessionToken__Secure-next-auth.session-tokennext-auth.session-token
- Cached in Keychain (
com.steipete.codexbar.cache, accountcookie.cursor) - Reused until session is invalid
Data Source Fallback Order
-
Cached cookie header (preferred)
- Keychain cache:
com.steipete.codexbar.cache, accountcookie.cursor
- Keychain cache:
-
Browser cookie import
- Safari → Chrome → Firefox (default order)
- Can be customized via provider metadata
-
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
- Plan usage (included)
- On-demand usage
- Billing cycle window
Authentication
- User email
- User name
Legacy Usage (Request-Based)
- 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
No session cookies found
No session cookies found
Session cookie expired
Session cookie expired
Full Disk Access required
Full Disk Access required
Safari cookie import requires Full Disk Access permission.Solution:
- System Settings → Privacy & Security → Full Disk Access
- Enable CodexBar
- Restart CodexBar
- Or use Chrome/Firefox cookies (no special permission needed)
WebKit login crashes on Intel Mac
WebKit login crashes on Intel Mac
Intel Macs may experience WebKit crashes during login teardown.Solution:
- CodexBar uses
WebKitTeardownto minimize crashes - If crashes persist, use Manual cookie entry instead
- Or import cookies from Chrome/Firefox (no WebKit involved)
CLI Usage
Key Files
- Status probe:
Sources/CodexBarCore/Providers/Cursor/CursorStatusProbe.swift - Login flow:
Sources/CodexBar/CursorLoginRunner.swift
Related Documentation
- Cookie Management - Browser cookie import details
- CLI Reference - CLI usage and options
- Provider Authoring - How providers work internally
