Skip to main content

cursor-cli-usage

Cursor account usage and quota monitor. It follows the same dependency-free interface as the other /code/*usage tools.

The tool targets the Cursor CLI harness, but reports account-wide Cursor quota. It does not estimate usage from local CLI sessions.

Example output

Cursor usage
Status: live
Plan: 6.1% used
Resets: 1787506237000

Statusline:

cursor:q:6.1%used reset:12d20h

Install

uv tool install cursor-cli-usage

For local development:

uv tool install .

Commands

Command Description
cursor-cli-usage Show current account usage
cursor-cli-usage status Same as above
cursor-cli-usage json Print normalized JSON
cursor-cli-usage statusline Print compact cached output
cursor-cli-usage refresh Refresh the cache and print status
cursor-cli-usage daemon [-i SECS] Keep the cache fresh
cursor-cli-usage install Print installation instructions

Authentication and data

For every live request, the tool first asks the installed Cursor CLI for its current authentication state with agent status --format json. If the CLI is unavailable, it falls back to cursorAuth/accessToken in Cursor IDE's local state.vscdb. On Linux, the fallback follows XDG_CONFIG_HOME when it is set. It sends only the current access token to Cursor's dashboard usage service. It never refreshes, rotates, or modifies Cursor-owned credentials.

The normalized JSON includes:

  • provider, source, retrieved_at, and status
  • billing-cycle start and end
  • plan and spend-limit usage
  • models assigned to Cursor's automatic usage bucket

status is live, cached, stale, or unavailable. Errors and caches do not include the access token or Cursor account identity.

The tool writes only its own non-secret cache at ~/.cursor/usage-limits.json. JSON results report whether they are live, cached, stale, or unavailable.

Environment overrides:

  • CURSOR_USAGE_AGENT: alternate Cursor CLI executable
  • CURSOR_USAGE_STATE_DB: alternate Cursor state.vscdb path
  • CURSOR_USAGE_FILE: alternate cache path

The usage endpoint is undocumented and may change when Cursor changes its dashboard implementation.

Options

usage: cursor-cli-usage [-h] [-i INTERVAL] [--max-age MAX_AGE] [--refresh]
                        {status,json,daemon,statusline,refresh,install}
  • --max-age SECS: maximum cache age used by statusline
  • --refresh: bypass the cache for statusline
  • -i SECS: daemon refresh interval

Development

uv --no-config lock --check
uv --no-config run --locked python -m unittest discover -s tests
uv --no-config build --no-sources

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursor_cli_usage-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursor_cli_usage-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file cursor_cli_usage-0.1.1.tar.gz.

File metadata

  • Download URL: cursor_cli_usage-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cursor_cli_usage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 186ec74579e0a53c6fe0d6bb7f09cac4ceeca96bb76b96cab98a332f7fc0a65f
MD5 4c858fa39a3e6243b4a5217faa3e01e1
BLAKE2b-256 d7a27bbc54592b6e496689b1239c8b8dcb6016cdaaebd4db53c98f5ad46efb7e

See more details on using hashes here.

File details

Details for the file cursor_cli_usage-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cursor_cli_usage-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cursor_cli_usage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 790e980a1ce99e7516ab268775350a0e0d4d613a9b3c167e65ced165ec5662a5
MD5 c1f135f347f55463ff157ef07f37f1af
BLAKE2b-256 6dd73206360ac88f1b98ad673f800affe989f16363a63f7ace6bf87af8c52f46

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page