Skip to main content

quotacli

Terminal quota tracker for Claude Code, Cursor, Codex, Antigravity, and Grok. Reads the credentials each tool already stores locally on your Mac — no new sign-in flow, nothing sent anywhere except each provider's own usage endpoint.

macOS only: every provider's read mechanism (Keychain, ~/Library/... paths, lsof/ps process discovery) is macOS-specific.

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Usage

quotacli                                  # one-shot table, all 5 providers
quotacli --watch [--interval 30]          # live-refreshing view, like top
quotacli --json                           # machine-readable output
quotacli --provider claude-code           # limit to one or more providers (repeatable)
quotacli --provider antigravity -v        # report which of Antigravity's 4 data-source tiers answered

State (last-known-good snapshots, and Claude Code/Codex 429 backoff deadlines) persists at ~/.config/quotacli/state.json.

Development

pip install -e ".[dev]"
pytest

All 5 providers' undocumented, reverse-engineered endpoints can drift without notice. The pure response-parsing function per provider (providers/<name>.py::parse_*) is unit-tested against frozen fixtures in tests/fixtures/ — periodically run quotacli <provider-id> live and diff against those fixtures to catch upstream API changes.

What isn't (and can't be) covered by the unit tests:

  • Keychain enumeration (Claude Code, Antigravity) — needs a machine with the real tool installed and signed in. Claude Code specifically rotates its keychain item on every token refresh instead of updating one in place, so the "pick the newest of several duplicates by modification date" logic in keychain.py can only be validated against a real account that's rotated at least once.
  • Antigravity's tier-2 local bridge (ps/lsof process discovery, scoped self-signed-TLS bypass) — only testable with Antigravity actually running. Use quotacli --provider antigravity -v to see which of the 4 tiers answered.
  • 429 backoff persisted across real repeated invocations — the backoff math and state round-trip are both unit-tested in isolation and trusted to compose correctly; forcing a real 429 against the live API to test the full path end-to-end isn't practical.

Not yet built

A caffeinate-style subcommand (keep the Mac awake while a tracked provider's CLI is actively running) is planned but intentionally deferred — the CLI is a click.Group from the start so it can be added later without restructuring the entrypoint.

Download files

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

Source Distribution

quotacli_mac-0.1.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

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

quotacli_mac-0.1.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quotacli_mac-0.1.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.2

File hashes

Hashes for quotacli_mac-0.1.0.tar.gz
Algorithm Hash digest
SHA256 377a3cd51d07771f526186aa2bc3477496872ac2047cc9d6a925b626495ef1aa
MD5 7b0270946fd7bc2824331a6f10433d95
BLAKE2b-256 88cbd4951c88320af9387cef3a46287b26ab84b826618f1b0c6086fce38cad66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quotacli_mac-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.2

File hashes

Hashes for quotacli_mac-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24bb62c8498591af9535a507b4b156d73f9161cb0cce233c603fa9b0b5556ca6
MD5 b367afccaeadde81646280e2f4a5e74d
BLAKE2b-256 f23b760a2cce8356f5987c362de846f73d90bef7b6f0f5c0a421df7d9654c82e

See more details on using hashes here.

Release history Release notifications | RSS feed

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