Skip to content

Repository files navigation

cursor-usage-menu-bar

Native macOS menu bar app for Cursor usage, spending, and billing — SwiftUI dashboard with dual-pool analytics, charts, and EN/ZH i18n.

中文文档 · README.zh.md

Build   License: MIT   macOS 14+   Swift 5.9

cursor · macos · menu-bar · swift · swiftui · usage-tracker · billing · developer-tools · menubar-extra · cursor-ide


Preview

Usage tab — dual pools and cycle summary

Usage — today stats, API / Auto + Composer pools, billing cycle overview

Charts & analytics

Quota decline curve and daily usage percent chart
Quota decline — Total / API / Auto
Daily spend bar chart and model spend pie chart
Daily spend (USD) · model breakdown

Events & pricing

Model filter and usage event list
Paginated events · model filter
Expanded usage event with token breakdown
Token breakdown · pricing rules & estimates

Billing & account

Billing tab with dual pools and allowance breakdown
Billing — cycle usage, dual-pool status
Per-model token usage and account info
Per-model tokens · account & plan

Settings

Settings — session token and language picker

Session token · auto-refresh · Language: System / English / 中文

More screenshots → docs/screenshot/en · docs/screenshot/zh


Features

  • Menu bar at a glance — billing cycle usage % with a live gauge icon
  • Three-tab dashboard aligned with Cursor's web dashboard:
    • Usage — today stats, dual pools, quota decline curve, daily charts, paginated events
    • Spending — cycle spend, breakdown bars, spend trends
    • Billing — cycle summary, dual-pool status, allowance notes, per-model token usage
  • Dual usage pools — API included allowance vs Auto + Composer bonus; clarifies misleading usage limit messages
  • Charts — daily spend (USD), daily usage %, quota decline (Total / API / Auto), model pie chart
  • Usage event details — tokens, pricing rules, cost estimates, full-cycle local cache
  • Background sync — randomized 10–20s request pacing
  • Change notifications — in-app banner + macOS alerts on usage shifts
  • Bilingual UI — English & 中文 (Settings → Language)
  • KeychainWorkosCursorSessionToken stored securely

Requirements

  • macOS 14.0 (Sonoma) or later
  • Swift 5.9+ / Xcode 15+ (build from source)

Quick start

1 · Get your session token

  1. Sign in at cursor.com/dashboard/usage
  2. DevTools → ApplicationCookiescursor.com
  3. Copy WorkosCursorSessionToken

Uses Cursor's undocumented dashboard APIs — may change without notice. Never commit or share your token.

2 · Build & run

git clone https://github.com/pj-workspace/cursor-usage-menu-bar.git
cd cursor-usage-menu-bar
chmod +x scripts/build-app.sh
./scripts/build-app.sh release
open dist/CursorUsageMenuBar.app

Paste the token in Settings → Session Token → Save.

Development

swift run
# or: open Package.swift

How usage is calculated

Cursor exposes two billing pools:

Pool Source Shown as
API Named / third-party models % of API included allowance ($70 on Pro+)
Auto + Composer Auto-routed & Composer models Bonus spend on top of included API

Billing total (totalPercentUsed) is the menu bar headline. "You've hit your usage limit" usually means API included allowance is exhausted, not that overall billing is at 100%.

Daily charts prorate billing % by each day's share of cycle spend.


API endpoints

Area Endpoint Purpose
Usage GET /api/usage-summary Cycle limits, dual-pool %
Usage POST /api/dashboard/get-filtered-usage-events Paginated events
Usage POST /api/dashboard/get-aggregated-usage-events Per-model token totals
Spending POST /api/dashboard/get-current-period-usage Cycle spend & pools
Billing POST /api/dashboard/get-user-profile Profile & handle
Billing GET /api/auth/me Email & name

Project structure

cursor-usage-menu-bar/
├── Package.swift
├── Resources/Info.plist
├── scripts/build-app.sh
├── docs/screenshot/{en,zh}/
└── Sources/CursorUsageMenuBar/
    ├── Localization/
    ├── Models/
    ├── Services/
    ├── ViewModels/
    └── Views/

Releases

Download binaries from GitHub Releases.

Version Notes
v0.1.0 Initial release — dashboard, charts, i18n

Disclaimer

Not affiliated with Cursor. Independent community tool. Session tokens are credentials — treat them like passwords.


License

MIT © 2026 Jay Pan

About

Native macOS menu bar app for Cursor usage, spending, and billing — SwiftUI dashboard with dual-pool analytics, charts, and EN/ZH i18n.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages