npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-usage-glm-cn

v1.1.6

Published

DSH command plugin: /usage-glm-cn command and composer readout for your Z.ai / ZhipuAI GLM Coding Plan subscription quota usage

Readme


中文 · English

把智谱 BigModel / Z.ai GLM Coding Plan 订阅配额放进 DSH 对话界面:输入 /usage-glm-cn 查看完整报告;选中 GLM 模型时,输入框右下角常驻读条,每分钟自动刷新。切到其他模型自动隐藏。

  • 右下角读条:Rolling x% (倒计时) · Weekly x% (倒计时) · Peak / Off-peak 50%
  • /usage-glm-cn 命令:5 小时滚动窗口 + 周配额 + MCP 月度配额,各带重置倒计时
  • 峰谷提示:高峰 = 北京时间工作日 14:00–18:00(积分全额抵扣);其余时段(含周末全天)按基础积分 50% 抵扣,读条实时显示当前时段
  • 密钥安全:只在 DSH 主机端解析,绝不进浏览器
  • 邀请注册:BigModel.cn 新用户送 2000 万 Tokens,GLM-5.3 旗舰模型可试用

系列插件 / Family

同一套极简监控,覆盖五家服务商,格式统一(Rolling x% (倒计时) · Weekly …):

| 插件 | 服务商 | 监控内容 | |---|---|---| | dsh-usage-opencode-go | OpenCode Go | Rolling / Weekly / Monthly 配额 | | dsh-usage-deepseek | DeepSeek | 账户余额 + 波峰/波谷 | | dsh-usage-minimax-cn | MiniMax Coding Plan | coding / video 分服务配额 | | dsh-usage-kimi-cn | Kimi Coding Plan | Rolling / Weekly 配额 | | dsh-usage-glm-cn | Z.ai GLM Coding Plan | Rolling / Weekly / MCP 配额 + 峰谷时段 |

先决条件 / Prerequisites

  • 已安装 DSH(Node.js >= 20):npm install -g @deepseek-ai/dsh
  • 智谱 BigModel API Key,写入 ~/.dsh/.credentials.yaml(与 GLM Coding Plan 所用 key 一致):
ZAI_CODING_CN_API_KEY: <你的 key>

(或 export ZAI_CODING_CN_API_KEY=<key>;海外用户可 export ZHIPUAI_BASE_URL=https://api.z.ai 切到全球端点)

Install 安装

cd ~/.dsh/profiles
npm install dsh-usage-glm-cn --save --registry=https://registry.npmjs.org

⚠️ 从旧版本(< 1.1.5)升级请注意:旧版的 peerDependencies 会让 npm 自动把旧版 @deepseek-ai/* 核心包装进 profile 的 node_modules 根部,遮蔽宿主新版导致启动崩溃(registerFileReceiptResolver 报错)。1.1.5 起已修复(全部标记为 optional peer)。如已中招:删掉 profile 下 node_modules/@deepseek-ai 和 package-lock.json,再用 pnpm 重装;或改用下方 dsh plugin --profile web add dsh-usage-glm-cn 一键安装(推荐)。

然后在 ~/.dsh/profiles/web/cordis.patch.yml 追加:

- insert:
    - id: glm-cn-usage
      name: 'dsh-usage-glm-cn'

重启 / 刷新 web GUI 生效。

# 一条命令装到 DSH(自动写 patch,幂等)
dsh plugin --profile web add dsh-usage-glm-cn

# git 安装
dsh plugin --profile web add github:jooey/dsh-usage-glm-cn

# 一键脚本
./install.sh        # Linux / macOS
.\install.ps1       # Windows

Usage 使用

  • 对话里输入 /usage-glm-cn → 完整配额报告(含 MCP 月度配额)
  • 选中 GLM 模型 → 右下角读条出现
右下角读条:

Rolling 1.0% (4h 16m) · Weekly 19.0% (1d 17h 50m) · Off-peak 50%

Troubleshooting

  • ZAI_CODING_CN_API_KEY is not configured —— 检查 ~/.dsh/.credentials.yaml
  • 读条不显示 —— 确认当前选中的是 GLM 模型,再硬刷新(Ctrl+Shift+R)

English

Put your Z.ai / ZhipuAI GLM Coding Plan quota right inside the DSH conversation UI: type /usage-glm-cn for a full report, and while a GLM model is selected, a live chip sits in the bottom-right of the composer — auto-refreshed every minute. Hides itself automatically on other models.

  • Composer chip: Rolling x% (countdown) · Weekly x% (countdown) · Peak / Off-peak 50%
  • /usage-glm-cn command: 5-hour rolling window + weekly quota + MCP monthly quota, each with a reset countdown
  • Peak/off-peak hint: peak = Beijing weekdays 14:00–18:00 (100% point deduction); all other times, including weekends, deduct at 50% — the chip shows the live window
  • Key safety: resolved host-side only, never inlined into the browser
  • Invitation: BigModel.cn — 20M free tokens for new sign-ups, GLM-5.3 flagship included

Prerequisites

  • DSH installed (Node.js >= 20): npm install -g @deepseek-ai/dsh
  • A BigModel API key in ~/.dsh/.credentials.yaml (the same key used by the GLM Coding Plan):
ZAI_CODING_CN_API_KEY: <your key>

(Set ZHIPUAI_BASE_URL=https://api.z.ai for the global endpoint.)

Install

cd ~/.dsh/profiles
npm install dsh-usage-glm-cn --save --registry=https://registry.npmjs.org

⚠️ Upgrading from < 1.1.5? Older versions declared peer dependencies that made npm auto-install outdated @deepseek-ai/* core packages into the profile's node_modules root, shadowing the newer host packages and crashing startup (registerFileReceiptResolver error). Fixed since 1.1.5 (all marked optional peers). If affected: delete node_modules/@deepseek-ai and package-lock.json in the profile, reinstall with pnpm — or use dsh plugin --profile web add dsh-usage-glm-cn below instead (recommended).

Then append to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: glm-cn-usage
      name: 'dsh-usage-glm-cn'

Restart / refresh the web GUI to activate.

MIT License · Welcome a ⭐ Star!