ai-quota
v0.1.8
Published
Show AI coding-plan quota and API usage budget in the terminal
Maintainers
Readme
AI剩余额度查询,推荐搭配pi-agent使用
Zero runtime dependencies, read-only GETs, no quota consumed.

Color: green (< 50%), yellow (< 80%), red (≥ 80%).
ai-quota
- [x] Claude code :
~/.claude/.credentials.json - [x] OpenAI Codex :
~/.codex/auth.json - [x] Grok build :
~/.pi/agent/auth.json - [x] Opencode go :
~/.config/ai-quota/opencode.env - [x] Minimax coding plan :
MINIMAX_CN_API_KEYorMINIMAX_API_KEYenv - [x] DeepSeek API :
DEEPSEEK_API_KEY - [x] Kimi coding plan : 待测试,
KIMI_API_KEYorMOONSHOT_API_KEYenv - [x] Zhipu coding plan : 待测试,
ZHIPU_CN_API_KEYorZHIPU_API_KEYenv (cn/intl regions)
Usage
bun install -g ai-quota # installai-quota auth list # see which providers are enabled
ai-quota auth disable openai # skip a provider next time
ai-quota auth enable openai # bring it back
ai-quota # all enabled providers
ai-quota -p minimax # set one provider
ai-quota -i 30s # refresh in place every 30s
ai-quota query reset-card -p codex # show Codex reset cards
# 1week 10¥ / 1mon 70¥
ai-quota budget -p deepseek-api -w 10 -m 70ee-quota (Earth Engine quota)
- 完成 Earth Engine 授权并设置项目:
earthengine authenticate
earthengine set_project <PROJECT_ID>- 在网页右上角选择该项目,分别打开并点击启用:
若无法启用,请让项目所有者进入 IAM,点击授予访问权限,添加你的 Google 账号,并授予 Service Usage Admin 角色。
- 查询月额度:
ee-quota config set project <PROJECT_ID>
ee-quota config --unit h # s 或 h
ee-quotaEarth Engine 凭据默认位于 ~/.config/earthengine/credentials,详见 Earth Engine Authentication。
