HoodyHuo/dsh-plugin-glm-balance ↗★ 0

dsh-plugin-glm-balance

在输入框旁显示 GLM 额度余额并支持配置 适合使用 zai-coding-cn 渠道并需要实时监控 GLM 余额的用户。

套件
dsh-plugin-glm-balance
相容性
待驗證
版本
0.2.0
授權
MIT
最近更新
2026年9月21日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HoodyHuo/dsh-plugin-glm-balance

Configuration

The plugin proxies GET https://bigmodel.cn/api/monitor/usage/quota/limit through two same-origin host routes (avoiding browser CORS):

  • GET/POST /glm-balance/api/config — stored credentials
  • GET /glm-balance/api/usage — proxied quota query

The token persists in glm-balance.json under the harness home (~/.dsh/glm-balance.json by default):

{
  "authorization": "your bigmodel.cn authorization header value",
  "providerId": "zai-coding-cn",
  "refreshMinutes": 30
}

Edit the file, or use Settings → GLM Balance. No restart needed for token changes; the indicator picks them up on the next poll (or click).

配置

Token 存放在 harness 主目录下的 glm-balance.json(默认 ~/.dsh/glm-balance.json):

{
  "authorization": "bigmodel.cn 请求头里的 authorization 值",
  "providerId": "zai-coding-cn",
  "refreshMinutes": 30
}

可直接编辑该文件,或在 设置 → GLM 余额 分区填写;改完无需重启,下次轮询(或点击刷新)即生效。