quota-axi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesequota-axi
quota-axi
Report local agent-provider quota windows and model quota evidence.
You do not need quota-axi installed globally - invoke it with .
npx -y quota-axiquota-axi is data only: it never routes, recommends a provider, model, harness, credential, or
route, proxies, intercepts, logs in, imports browser cookies, or mutates provider state. Default
output has no ordering preference. The explicit comparator only orders
quota evidence, preserves ties, and is never a recommendation. It reads local provider auth sources and calls
first-party provider quota, usage, billing, or entitlement endpoints; it never launches the
Claude, Grok, Pi, or Kimi CLIs, so it cannot spend the quota it measures.
models --sort runway报告本地Agent服务商的配额周期及模型配额相关信息。
无需全局安装quota-axi——直接使用调用即可。
npx -y quota-axiquota-axi仅提供数据:它从不进行路由、推荐服务商、模型、工具、凭证或路由配置,也不代理、拦截请求、登录、导入浏览器Cookie或修改服务商状态。默认输出无排序偏好。显式的比较器仅对配额信息进行排序,保留并列结果,绝非推荐。它读取本地服务商认证源并调用官方服务商的配额、使用量、计费或权益端点;它绝不会启动Claude、Grok、Pi或Kimi的CLI,因此不会消耗其测量的配额。
models --sort runwayWhen to use
使用场景
Use quota-axi whenever you need local quota headroom before deciding whether it is safe to
keep working on a provider, when the user asks about usage, rate limits, or remaining quota,
or when comparing supported local provider headroom side by side.
当你需要了解本地剩余配额以判断是否可以继续使用某服务商服务时、用户询问使用量、速率限制或剩余配额时,或是需要并排对比支持的本地服务商剩余配额空间时,均可使用quota-axi。
Workflow
工作流程
- Run for compact TOON output covering supported providers' quota windows.
npx -y quota-axi - Scope to one provider with or to a subset with
--provider claude.--provider cursor,copilot,grok,kimi - Pass for the normalized machine-readable model instead of TOON. Read
--jsonrather than treating a model window in isolation: account windows can bound every model, andquotaSemantics.effectiveAvailabilitynames every window included in the effective percentage. ReadboundedByfirst for completion-risk evidence across every authoritative bound:effectiveAvailability[].runwaysupplies the earliest finiteprojected_exhaustion,usableRunwaySeconds, limiting window, and confidence;projectedExhaustedAtdeliberately has no synthetic deadline;through_resetis zero runway; andexhausted_nownames unmeasurable bounds instead of inventing a conclusion. Read each window'sunknown(and the effective scope's pace summary) for diagnostics. Default TOON omits raw numeric reserve;paceand--jsonretain it. If relationship status is--fullorpartial, do not infer one. Stale reports keep raw windows for diagnostics, but effective availability, pace, and runway are always unknown; never route from a stale raw percentage as though it were current headroom. Default output has no ordering preference. For a provider-native model evidence join, useunknown. This catalog covers Claude, Codex, Grok, and Kimi only; its buckets are coarse editorial classifications, not scores. Its response includes catalog provenance and unmatched model windows.npx -y quota-axi models --intelligence high --jsonis an explicit, documented quota-evidence comparator, not a provider, model, harness, credential, or route recommendation; inspect--sort runwayrather than treating equal evidence as a preference.sort.tieGroups - Pass to include account identity, per-source attempts, and raw reserve diagnostics.
--full - Run to check local auth-source availability without printing secret values.
npx -y quota-axi auth - On macOS, Claude Keychain value reads are pinned to the same validated current-user account
Claude Code selects and are skipped by default until the user grants access once.
If quota output reports , tell your user to run
reason: keychain_access_requiredonce and approve Keychain access ("Always Allow"). After that successful grant, plainquota-axi --allow-keychain-promptcalls reuse the existing Keychain access marker, scoped to both profile and account, to refresh live Claude quota without requiring the flag. Legacy markers are not reused, so an upgrade may require this one-time grant again.quota-axi - For Grok, read before any logout wording.
state.authStatusmeans a local session still looks signed in but short-lived access expired. Only when quota-axi also emitsexpired_refreshable/reason: credentials_expiredshould you tell your user to open the Grok CLI once; Pi-only expiry has no Grok remedy because Grok cannot refresh Pi-owned credentials. Do not treat soft expiry as full sign-out, and do not ask quota-axi to refresh credentials - it never launches Grok or Pi or writes auth files.remedyCommand: grokwith empty windows means model auth is present (Grok CLI and/or PiauthStatus: usable) while consumer credit windows are unknown - not logged out. Reserve true sign-in recovery forxai/authStatus: unusable.Grok sign-in required - For a managed Codex installation, set to its absolute executable path. quota-axi uses that exact executable for auth inspection and the read-only app-server fallback, and fails closed if the override is invalid. Codex OAuth availability follows the access token, not id_token expiry alone.
QUOTA_AXI_CODEX_BINARY - For Kimi, quota-axi prefers a literal Pi-managed API key from
kimi-coding(default$PI_CODING_AGENT_DIR/auth.json). If it is unavailable, quota-axi may reuse a fresh official Kimi Code CLI access token from~/.pi/agent/auth.json(default$KIMI_CODE_HOME/credentials/kimi-code.json) without refreshing or writing credentials. Grok also reads that same Pi auth file for an independent$HOME/.kimi-code/credentials/kimi-code.jsonOAuth or literal API-key entry and treats Grok as usable when either the Grok CLI session or Pixaicredential is valid.xai
- 运行获取简洁的TOON格式输出,涵盖所有支持服务商的配额周期信息。
npx -y quota-axi - 使用指定单个服务商,或使用
--provider claude指定部分服务商。--provider cursor,copilot,grok,kimi - 传递参数获取标准化的机器可读模型,而非TOON格式。应读取
--json而非孤立看待单个模型周期:账户周期可能限制所有模型,quotaSemantics.effectiveAvailability会列出有效占比中包含的所有周期。首先读取boundedBy以获取跨所有权威限制的耗尽风险信息:effectiveAvailability[].runway提供最早的有限projected_exhaustion、usableRunwaySeconds、限制周期及置信度;projectedExhaustedAt无合成截止时间;through_reset表示剩余时长为零;exhausted_now表示无法测量的限制,而非凭空生成结论。读取每个周期的unknown(及有效范围的速率摘要)用于诊断。默认TOON输出会省略原始数值储备;pace和--json参数会保留该信息。若关联状态为--full或partial,请勿进行推断。过期报告保留原始周期用于诊断,但有效可用性、速率和剩余时长始终为未知;切勿将过期的原始占比当作当前剩余配额进行路由决策。默认输出无排序偏好。如需服务商原生模型信息关联,使用unknown。该目录仅覆盖Claude、Codex、Grok和Kimi;其分类为粗略的编辑分类,而非评分。响应包含目录来源及未匹配的模型周期。npx -y quota-axi models --intelligence high --json是显式、有文档记录的配额信息比较器,而非服务商、模型、工具、凭证或路由推荐;请查看--sort runway,勿将相同信息视为偏好。sort.tieGroups - 传递参数以包含账户身份、各源尝试次数及原始储备诊断信息。
--full - 运行检查本地认证源可用性,且不会打印敏感值。
npx -y quota-axi auth - 在macOS上,Claude钥匙串值读取与Claude Code选择的已验证当前用户账户绑定,默认会跳过,直到用户授予一次访问权限。若配额输出显示,请告知用户运行一次
reason: keychain_access_required并批准钥匙串访问(选择“始终允许”)。成功授权后,普通的quota-axi --allow-keychain-prompt调用会重用现有的钥匙串访问标记(按配置文件和账户范围),无需该标志即可刷新Claude的实时配额。旧标记无法重用,因此升级后可能需要再次进行此一次性授权。quota-axi - 对于Grok,请先查看再进行任何登出相关操作。
state.authStatus表示本地会话仍显示已登录,但短期访问权限已过期。只有当quota-axi同时输出expired_refreshable/reason: credentials_expired时,才需告知用户打开一次Grok CLI;仅Pi的过期情况无Grok解决方法,因为Grok无法刷新Pi所有的凭证。请勿将软过期视为完全登出,也不要要求quota-axi刷新凭证——它绝不会启动Grok或Pi,也不会写入认证文件。remedyCommand: grok但周期为空表示存在模型认证(Grok CLI和/或PiauthStatus: usable),但消费者信用周期未知——并非已登出。仅当xai/authStatus: unusable时才需进行真正的登录恢复操作。Grok sign-in required - 对于托管的Codex安装,请将设置为其绝对可执行文件路径。quota-axi会使用该精确可执行文件进行认证检查和只读应用服务器回退,若覆盖路径无效则会终止运行。Codex OAuth可用性遵循访问令牌,而非仅id_token过期时间。
QUOTA_AXI_CODEX_BINARY - 对于Kimi,quota-axi优先使用Pi管理的API密钥,该密钥位于
kimi-coding(默认路径为$PI_CODING_AGENT_DIR/auth.json)。若该密钥不可用,quota-axi可能会重用来自~/.pi/agent/auth.json(默认路径为$KIMI_CODE_HOME/credentials/kimi-code.json)的最新官方Kimi Code CLI访问令牌,且不会刷新或写入凭证。Grok也会读取同一Pi认证文件中的独立$HOME/.kimi-code/credentials/kimi-code.jsonOAuth或明文API密钥条目,当Grok CLI会话或Pixai凭证任一有效时,即视为Grok可用。xai
Usage
使用方法
usage: quota-axi [quota|auth|models] [flags]
commands[3]:
(none)=quota, auth, models
output:
Default TOON reports local quota evidence. models is a deterministic data join; --sort runway is explicit opt-in ordering. --tui renders a live human terminal report instead (q quits).
flags[11]:
--provider <claude,codex,cursor,copilot,grok,kimi>, --json, --full, --tui, --refresh <30s-24h>, --once, --allow-keychain-prompt, --intelligence <high|medium|low>, --sort <runway>, --help, -v/--version
examples:
quota-axi
quota-axi --provider claude
quota-axi --provider cursor,copilot,grok,kimi
quota-axi --json
quota-axi --full
quota-axi --tui
quota-axi --tui --refresh 1m
quota-axi --tui --once
quota-axi auth
quota-axi models --intelligence high
quota-axi models --sort runwayusage: quota-axi [quota|auth|models] [flags]
commands[3]:
(none)=quota, auth, models
output:
Default TOON reports local quota evidence. models is a deterministic data join; --sort runway is explicit opt-in ordering. --tui renders a live human terminal report instead (q quits).
flags[11]:
--provider <claude,codex,cursor,copilot,grok,kimi>, --json, --full, --tui, --refresh <30s-24h>, --once, --allow-keychain-prompt, --intelligence <high|medium|low>, --sort <runway>, --help, -v/--version
examples:
quota-axi
quota-axi --provider claude
quota-axi --provider cursor,copilot,grok,kimi
quota-axi --json
quota-axi --full
quota-axi --tui
quota-axi --tui --refresh 1m
quota-axi --tui --once
quota-axi auth
quota-axi models --intelligence high
quota-axi models --sort runwayTips
提示
- Output is TOON-encoded and token-efficient by default; pass only when you need the normalized schema.
--json - Exit code 0 means at least one provider returned data (fresh or stale); exit code 1 means every provider failed; exit code 2 means a usage error.
- Percentages are not comparable across providers - quota-axi never claims one provider's percentage equals another's.
- Claude output exposes the authoritative OAuth profile
--fullasaccount.uuidwhen Anthropic returns one; otherwise the account identity is explicitly marked unverified rather than inferred.account.accountId - The quota cache at only ever holds normalized non-secret snapshots. Fresh provider reports with no windows clear stale provider snapshots instead of caching empty quota. Claude local expiry metadata is advisory when an access token exists: the existing read-only usage request decides validity. Missing or invalid credentials without a usable token and HTTP 401/403 retire Claude cache; only transient failures may use bounded, reset-pruned stale data. The Claude Keychain access marker lives alongside it, is scoped by hashed profile and account hashes, and contains no credential values or raw account name.
~/.cache/quota-axi/quotas.json
- 默认输出为TOON编码,令牌效率高;仅当需要标准化 schema 时才传递参数。
--json - 退出码0表示至少有一个服务商返回数据(新鲜或过期);退出码1表示所有服务商均失败;退出码2表示使用错误。
- 不同服务商的占比不可直接比较——quota-axi绝不会声称某服务商的占比等同于另一服务商。
- 当Anthropic返回相关信息时,Claude的输出会将权威OAuth配置文件
--full显示为account.uuid;否则账户身份会被明确标记为未验证,而非推断得出。account.accountId - 配额缓存位于,仅存储标准化的非敏感快照。 无周期信息的新鲜服务商报告将清除过期的服务商快照,而非缓存空配额。 当存在访问令牌时,Claude本地过期元数据仅为参考:现有的只读使用量请求会决定有效性。缺少或无效凭证且无可用令牌,以及HTTP 401/403错误会使Claude缓存失效;仅临时故障可使用有限的、经过重置修剪的过期数据。 Claude钥匙串访问标记与其并存,按哈希后的配置文件和账户哈希进行范围限定,不包含凭证值或原始账户名称。
~/.cache/quota-axi/quotas.json