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. 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.0.tar.gz (7.2 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.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cursor_cli_usage-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.0.tar.gz
Algorithm Hash digest
SHA256 854a18ccdd4c9098b9a9c48df35ad86db9bd4208464587ba959adf81c97784ef
MD5 0e794d81bd0a51d6c3ff5cb2966bdf94
BLAKE2b-256 2ea3171f3a65635ce968b04216f78d223956f14b1cdaa91d2bd8855f7ae104b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cursor_cli_usage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b58ddea0520ad9817997de64bbc91385936e82730a2021f178ebb8ffa67608b
MD5 cde9fa926cef72cafd6b617a23de235e
BLAKE2b-256 77c58e103eed9450a27d0c506f3ee6050569fe4217c2e35924f387743d834561

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

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