Pi Subs — AI skill for Claude Code
Subscription usage panel for pi coding agent: OpenCode Go, Kimi, Codex, Command Code, Claude, Copilot, Z.AI, OpenRouter — statusline + widget in pi Web/TUI.
How to install Pi Subs
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open wonton1984/pi-subs and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Pi Subs does
Subscription usage panel for pi coding agent: OpenCode Go, Kimi, Codex, Command Code, Claude, Copilot, Z.AI, OpenRouter — statusline + widget in pi Web/TUI.
Alternatives in AI
- Token Monitor — Local-first desktop widget for tracking token usage, costs, and limits across 32+ AI coding tools—including Cl 1.8k ★
- onWatch — Open-source Go CLI that tracks AI API quota usage across 7 providers (Synthetic, Z.ai, Anthropic, Codex, GitHu 397 ★
- Agf — Local-first TUI to find, search, and resume AI coding-agent sessions across Claude Code, Codex, Grok Build, Ki 148 ★
README
⌁ pi-subs — 订阅用量面板(pi coding agent)
在 [pi coding agent](https://github.com/earendil-works/pi) 的 **pi Web** 与 TUI 中,聚合显示你的各个订阅的实时用量。
支持的订阅:
| 订阅 | 数据源 | 认证方式 |
|---|---|---|
| OpenCode Go / Zen | opencode.ai/zen/go/v1/usage |
pi 内 /login 或 API key |
| Kimi For Coding | api.kimi.com/coding/v1/usages |
pi 内 /login 或 API key |
| OpenAI Codex | chatgpt.com/backend-api/wham/usage |
pi 内 /login(OAuth 自动刷新) |
| Command Code | api.commandcode.ai/alpha/* |
pi 内 /login |
| Claude Pro / Max | api.anthropic.com/api/oauth/usage |
pi 内 /login(OAuth) |
| GitHub Copilot | api.github.com/copilot_internal/user |
pi 内 /login(OAuth) |
| Z.AI / GLM Coding Plan | {baseUrl}/api/monitor/usage/quota/limit |
pi 内 /login |
| OpenRouter | openrouter.ai/api/v1/key |
API key |
**未登录的订阅自动隐藏**,只显示你实际在用的。
界面
- 状态栏(底部一行):显示全部已登录订阅,当前会话所用订阅带
▸高亮; 配置为current时只显示当前订阅,off时隐藏。 - widget(可选,默认开):一行一个订阅的详细面板(进度条 / 用量 / 重置倒计时),
pi Web 中默认折叠,点击输入框上方的
subs按钮展开。 - 未登录的订阅不出现在任何位置;请求失败显示
✗并回退到最近一次成功数据(带 ⌛ 标记)。
命令:
/subs 强制刷新并显示摘要
/subs status 各订阅详细状态
/subs off / on 开关面板(写入配置)
安装
pi install npm:pi-subs
# 或从 GitHub:
pi install git:github.com/wonton1984/pi-subs
# 本地试用:
pi -e ./pi-subs
需要 Pi ≥ 0.84(用到 `ctx.ui.setWidget` 与 `modelRegistry.getProviderAuth`)。 在 **pi Web** 中已开的旧会话需要 `/reload`(或在 pi Web 输入 `/reload`)才会加载新装的扩展。
配置 `~/.pi/agent/pi-subs.json`(可选)
{
"refreshMinutes": 10,
"widget": true,
"statusline": "all",
"widgetPlacement": "aboveEditor",
"providers": {
"opencode": true, "kimi": true, "codex": true, "commandcode": true,
"claude": true, "copilot": true, "zai": true, "openrouter": true
}
}
statusline:"all"(全部订阅一行,当前高亮)/"current"(只显示当前订阅)/"off"refreshMinutes: 自动刷新间隔(1–1440,默认 10;连续失败时指数退避,上限 1 小时)providers: 按订阅开关
隐私与安全
- 用量查询直连各服务商官方端点,凭证只发往对应官方域名。
- 错误信息会先脱敏(Bearer token、API key 模式)再显示。
- 最近一次成功数据缓存于 `~/.pi/agent/pi-subs-cache.jso
Related Skills
Pi Usage Live
Always-on subscription usage card for Pi: see how much of your Claude, ChatGPT Codex, OpenCode Zen, DeepSeek,
AI Usage Kde Widget
Native KDE Plasma 6 widget showing Claude Code and Codex subscription usage in your panel
AI Usage Widget
KDE Plasma panel widget showing live Claude Code and Codex subscription usage limits
Ailimits
Native Windows 11 desktop widget for AI usage limits: live Claude, Codex, Copilot and Antigravity percentages,
Tokenpulse
Self-hosted AI usage and cost panel for Raspberry Pi. Tracks spend and quotas across Anthropic, OpenAI, OpenRo
Staffroom
Turn your own Claude Code into a team of AI employees: a research toolbelt (web, headless browser, Apify), ski
Related Agents
CLI Researcher
Researches how an agent CLI (Codex, Gemini CLI, Kimi CLI, Grok, opencode…) stores its configuration — skills,
Developer Overview
code-container (container) creates isolated Docker environments for AI coding harnesses (Claude Code, OpenCode
Consult Agent
Execute cross-tool AI consultations via Task spawning. Use when agents or workflows need a second opinion from