{"id":50962324,"url":"https://github.com/vypdev/cursor-accounts","last_synced_at":"2026-06-18T15:33:31.092Z","repository":{"id":361930029,"uuid":"1251358229","full_name":"vypdev/cursor-accounts","owner":"vypdev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-10T01:49:24.000Z","size":12432,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-10T03:15:55.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vypdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-27T13:54:46.000Z","updated_at":"2026-06-01T20:24:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vypdev/cursor-accounts","commit_stats":null,"previous_names":["vypdev/cursor-accounts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vypdev/cursor-accounts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vypdev%2Fcursor-accounts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vypdev%2Fcursor-accounts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vypdev%2Fcursor-accounts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vypdev%2Fcursor-accounts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vypdev","download_url":"https://codeload.github.com/vypdev/cursor-accounts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vypdev%2Fcursor-accounts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34497366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T15:33:28.157Z","updated_at":"2026-06-18T15:33:31.057Z","avatar_url":"https://github.com/vypdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cursor Quota\n\nCursor extension that shows **plan quota usage** in the IDE status bar after activation—no need to open **Settings** manually.\n\n## Features\n\n- Two status bar indicators (visible on activation):\n  1. **Included quota usage** — API/included pool (`apiPercentUsed`) with progress bar and percentage\n  2. **Plan quota usage** — total plan usage (`totalPercentUsed`) with progress bar and percentage\n- Separates **Auto mode** vs included/API usage in tooltips\n- Auto-refresh (default 60s, configurable)\n- Cached last-known usage on startup while fetching\n- Click status bar → guidance to open **Cursor Settings → Usage**\n- Command: **Cursor Quota: Refresh Now**\n\n## Prerequisites\n\n- [Node.js 22](https://nodejs.org/) via [nvm](https://github.com/nvm-sh/nvm): `nvm use 22` (see [.nvmrc](.nvmrc))\n- [pnpm](https://pnpm.io/): `corepack enable` or `npm install -g pnpm`\n\nUse **pnpm only** for this repo—do not mix `npm install` with `pnpm-lock.yaml`.\n\n## Installation\n\n### From source (development)\n\n```bash\nnvm use 22\npnpm install\npnpm run compile\n```\n\nPress **F5** in Cursor/VS Code to launch an Extension Development Host, or package:\n\n```bash\npnpm run package\n```\n\nThen in Cursor: **Extensions** → **⋯** → **Install from VSIX…** → select the generated `.vsix`.\n\n### After install\n\nReload the window if prompted. Status bar items appear automatically on startup (`onStartupFinished`)—no manual setup.\n\n## Configuration\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `cursorQuota.refresh.enabled` | `true` | Enable automatic polling |\n| `cursorQuota.refresh.intervalSeconds` | `60` | Poll interval (30–300 seconds) |\n| `cursorQuota.statusBar.showIncluded` | `true` | Show included usage indicator |\n| `cursorQuota.statusBar.showTotal` | `true` | Show total plan percentage indicator |\n| `cursorQuota.statusBar.showAccountEmail` | `false` | Show cached email in tooltips |\n\n## How it works\n\n1. Reads the Cursor session from local `state.vscdb` (`cursorAuth/accessToken`, `cursorAuth/refreshToken`).\n2. Calls the same reverse-engineered endpoint the IDE uses:  \n   `POST https://api2.cursor.sh/aiserver.v1.DashboardService/GetCurrentPeriodUsage`\n3. Refreshes expired tokens via `https://api2.cursor.sh/oauth/token` and stores them in VS Code **Secret Storage** (does not write back to `state.vscdb`).\n\nSee [docs/RESEARCH.md](docs/RESEARCH.md) for data sources, limitations, and account-switching investigation.\n\n## Multi-account / account switching\n\n**Not supported by this extension.** Cursor does not expose a supported API for switching subscription accounts inside one window.\n\n**Recommended approach (official workaround):** run separate Cursor instances with different user data directories:\n\n```bash\nopen -na \"/Applications/Cursor.app\" \\\n  --args --user-data-dir=\"$HOME/.cursor-profile-work\"\n```\n\nOptional: enable `cursorQuota.statusBar.showAccountEmail` to display the cached login email in tooltips and avoid using the wrong account.\n\nCommunity “account switcher” extensions swap SQLite snapshots of `state.vscdb`—unsupported, fragile, and a security risk. This project does **not** implement that.\n\n## Troubleshooting\n\n| Symptom | Action |\n|---------|--------|\n| `Quota unavailable` | Confirm **Cursor Settings → Usage** works natively; sign in again |\n| Stuck on loading | Run **Cursor Quota: Refresh Now** from the Command Palette |\n| Wrong percentages | Cursor may show included vs credits separately; compare with Settings UI |\n| DB read errors | Uses bundled SQLite binary (no installation required). If issues persist, check Extension Host log |\n\n## Platform Support\n\nThis extension includes pre-compiled SQLite 3.53.1 binaries for all supported platforms:\n\n- macOS Intel (`darwin-x64`) and Apple Silicon (`darwin-arm64`)\n- Linux x64 (`linux-x64`) and ARM64 (`linux-arm64`)\n- Windows x64 (`win32-x64`) and ARM64 (`win32-arm64`)\n\nNo additional installation or configuration required.\n\nTo regenerate the Linux ARM64 binary (no official precompiled CLI from SQLite):\n\n```bash\ndocker run --rm --platform linux/arm64 -v \"$PWD:/project\" -w /project ubuntu:24.04 \\\n  bash -c 'apt-get update \u0026\u0026 apt-get install -y build-essential curl file \u0026\u0026 bash scripts/build-linux-arm64-sqlite.sh'\n```\n\nValidate all bundled binaries with `bash scripts/verify-binaries.sh`.\n\n## Privacy\n\n- Reads auth tokens from your local Cursor install (same data the IDE already uses).\n- Network requests go only to `api2.cursor.sh` (Cursor).\n- No third-party servers.\n\n## Known limitations\n\n- **Unofficial API** — may change without notice when Cursor updates.\n- **Enterprise teams** — Admin/Analytics APIs at `api.cursor.com` are not used (team keys required).\n- **Credits vs included pool** — UI follows `GetCurrentPeriodUsage`; “100% included” in Settings can still allow usage via credits.\n- **Cursor-only** — built for Cursor; standard VS Code may lack `state.vscdb` auth keys.\n\n## Development\n\n```bash\nnvm use 22\npnpm run watch    # compile on save\npnpm test         # unit tests\npnpm run lint     # typecheck\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvypdev%2Fcursor-accounts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvypdev%2Fcursor-accounts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvypdev%2Fcursor-accounts/lists"}