Skip to main content

quse

Quota and usage checks for coding-agent CLIs.

quse reports normalized usage for providers used by tools such as Codex, Claude Code, GitHub Copilot, Grok Build, and Z.AI/goz.

quse
quse codex
quse copilot --json

The CLI prints one normalized line per provider by default. --json emits the same normalized records as JSON keyed by provider name:

{
  "claude": {
    "details": {},
    "error": null,
    "long_term": {
      "percent_remaining": 87.0,
      "reset_at": "2026-05-28T14:59:59Z"
    },
    "short_term": {
      "percent_remaining": 55.0,
      "reset_at": "2026-05-24T14:30:00Z"
    },
    "status": "ok"
  }
}

Supported providers:

  • codex
  • claude
  • zai
  • copilot
  • grok (alias: grok-build)

gemini is accepted and reports unsupported because it does not currently expose a usage endpoint.

Provider mapping:

  • codex: two API windows map to the 5-hour short_term window and weekly long_term window; when the API returns one window, it is weekly only. Codex JSON output also includes details.reset_credits from ChatGPT's rate-limit reset-credit endpoint when available.
  • claude: short_term maps to the 5-hour signal, long_term maps to the 7-day signal.
  • copilot: short_term is hardcoded to 100% remaining, long_term maps to the monthly premium-interactions signal.
  • zai: short_term maps to the 5-hour quota, long_term maps to the weekly quota.
  • grok: the weekly SuperGrok / X Premium window and the monthly credit window map to short_term and long_term when both are present; when the API returns one window, it is reported as long_term. Weekly remaining prefers the GrokBuild entry in productUsage, then creditUsagePercent. If no percent is reported, percent_remaining is null while reset_at can still be set. Grok JSON output also includes details.subscription and details.product_usage.

Install

For a local checkout, install the project environment and add its .venv/bin to your shell PATH:

uv sync --dev
./install.sh

Open a new shell after running ./install.sh, then verify:

quse --help

This is the same local-checkout style used by tmuxctl: the script appends the checkout's .venv/bin directory to ~/.bashrc.

For one-off use from a checkout without changing PATH:

uv run quse
uv run quse codex --json

For the latest released package from PyPI:

uvx quse
uv tool install quse
# or
pipx install quse

Use uvx quse for a one-off run without installing a persistent tool.

Release

Releases are published by GitHub Actions when a tag starting with v is pushed:

git tag v0.0.6
git push origin main --tags

The workflow verifies that the tag version matches pyproject.toml, runs the tests, builds the wheel and sdist, then publishes to PyPI with the repository secret PYPI_API_TOKEN.

Download files

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

Source Distribution

quse-0.0.13.tar.gz (58.8 kB view details)

Uploaded Source

Built Distribution

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

quse-0.0.13-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file quse-0.0.13.tar.gz.

File metadata

  • Download URL: quse-0.0.13.tar.gz
  • Upload date:
  • Size: 58.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • 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 quse-0.0.13.tar.gz
Algorithm Hash digest
SHA256 3f744d730f0583d78456f32847a8ed64eb16f0acc16d474bb7696c3bdef91060
MD5 0797db9e639fa1c217f61fdb028b07fe
BLAKE2b-256 7ab5d2e510f2fde5ef3edc8d01a94bb0e4423789279b5d84d299ad50378b742c

See more details on using hashes here.

File details

Details for the file quse-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: quse-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • 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 quse-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 ea4da9826d7cf5abeeab2cf690cc49134cd4e58af92575291ff3633983c081d9
MD5 038d2e7add89ed7407548256f3d01351
BLAKE2b-256 8c5e309a8a2ba7c441d1d94a8f7a963d6ec4f7458424eb05ebc8debceb694e6a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

This release

0.0.13 This release

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

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