quotacli
One command to see how much of Claude Code, Cursor, Codex, Antigravity, and Grok you have left — and when it resets — without opening five different apps or dashboards.
Or, embedded in a tmux status line: ◆ 88% · ◇ 49% · ▲ 100% · ● 25%
It works by reading the credentials each of those tools already stores
locally on your Mac — no new sign-in flow, nothing sent anywhere except each
provider's own usage endpoint. macOS only: every read mechanism
(Keychain, ~/Library/... paths, lsof/ps process discovery) is
macOS-specific.
Install
pip install quotacli-mac
(the PyPI distribution is named quotacli-mac — PyPI's anti-squatting check
blocked the plain quotacli name as too close to an existing project — but
the command it installs is just quotacli.)
Or from source:
git clone https://github.com/lokeshdevnani/quotacli.git
cd quotacli
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 --compact # single line, statusline-style
quotacli --json # machine-readable output
quotacli --all # include providers you've never signed in to (hidden by default)
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
Unattended use (cron, tmux, agents calling quotacli --json): no
keychain dialogs — secrets are read through /usr/bin/security, which
Claude Code and Antigravity already trust. If the Antigravity app isn't
running, a headless copy of its bundled language server is started for
~10s and stopped again, so its numbers don't depend on the app being open.
State (last-known-good snapshots, and Claude Code/Codex 429 backoff
deadlines) persists at ~/.config/quotacli/state.json.
tmux status line
set -g status-right '#(~/.venv/bin/quotacli --compact) | %H:%M'
(point that at wherever quotacli actually lives — the venv's bin/, or
just quotacli if you installed it globally via pip.)
Development
pip install -e ".[dev]"
pytest
The README demo is recorded, not hand-drawn — regenerate it after a visible output change with:
brew install asciinema agg
asciinema rec --window-size 104x23 --command "bash docs/demo.sh" docs/demo.cast --overwrite -q
agg --idle-time-limit 1.2 --font-size 15 docs/demo.cast docs/demo.gif
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.pycan only be validated against a real account that's rotated at least once. - Antigravity's tier-2 local bridge (
ps/lsofprocess discovery, scoped self-signed-TLS bypass) — only testable with Antigravity actually running. Usequotacli --provider antigravity -vto 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) — the CLI is aclick.Groupfrom the start so it can be added later without restructuring the entrypoint. - An alert banner and urgency-based sort for the full table view.
- A trend sparkline per window, using the history already available in
state.json.
License
MIT — see LICENSE.
Metadata
Release files for quotacli-mac 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quotacli_mac-0.1.1.tar.gz | 161.8 kB | Without provenance | Details for quotacli_mac-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quotacli_mac-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for quotacli_mac-0.1.1-py3-none-any.whl |
Total release size: 194.0 kB
Release files / quotacli_mac-0.1.1.tar.gz
| Download URL | quotacli_mac-0.1.1.tar.gz |
|---|---|
| Size | 161.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1d6d78d37f79f9c87a8b44986365f920080cf68dcc5b0e360c5a3868a8a3af3
|
|
BLAKE2b-256 checksum How to use checksums |
2bed27ecce11bcc8c8b495c5120dd669a68b02d7a4446f28737db55ab8890f48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / quotacli_mac-0.1.1-py3-none-any.whl
| Download URL | quotacli_mac-0.1.1-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fedadbe078a9ef202c3a6249efbae9218628cb328ebd28d5785e4c7a56e7542
|
|
BLAKE2b-256 checksum How to use checksums |
4bc908cb19150cedd2c075bc7a9a4e8b11b2ef523699e0d1867cacdfddc5998a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for quotacli-mac 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.