zquota documentation · v0.1.4
No quota guesswork.
Exact reset times.
zquota asks Z.ai for your plan’s quota and shows how much of each window you’ve used and the exact
time it resets, in your own timezone. The default view is for people. --compact, --json and
--jsonl are for scripts, and --threshold exits with code 2 when a window crosses the line you set.
$ brew tap netspeedy/zquota && brew install zquota$ zquota Z.ai plan: pro │ 5-Hour Rolling Token Quota │ │ [██████████████░░░░░░░░░░] 62% used │ Remaining: 38% │ Limit: 1.0M │ Used: 620.0k │ Remaining: 380.0k │ Resets in: 2h 13m 6s │ Resets at: 2026-11-05 09:25:00 GMT ────────────────────────────────── │ Weekly Token Quota │ │ [███████░░░░░░░░░░░░░░░░░] 31% used │ Remaining: 69% │ Limit: 8.0M │ Used: 2.5M │ Remaining: 5.5M │ Resets in: 4d 6h 11m │ Resets at: 2026-11-09 13:23:00 GMT ──────────────────────────────────
# exits 2: the five-hour window is past 60% $ zquota --compact --threshold 60 Plan: pro 5h-rolling [██████░░░░] 62% left: 380.0k reset: 2h 13m 5s weekly [███░░░░░░░] 31% left: 5.5M reset: 4d 6h 11m $ echo $? 2
# in ~/.zshrc, ~/.bashrc or wherever your shell keeps its environment export ZAI_API_KEY='your-api-key' # optional: reset times in your own timezone, not Europe/London export ZAI_TIMEZONE='America/New_York'
Browse the docs
From a first check to every JSON field.
Getting started
Install it and check your quota.
Quota windows
What each window is and when it resets.
Guides
Set it up, watch it and script it.
Reference
Look something up.