
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
cc-glm-status
Advanced tools
Real-time status line for Claude Code + GLM Coding Plan (Z.ai) — shows token quota, reset countdown, MCP usage, and context window
Claude Code 的状态行工具,为 GLM Coding Plan 用户显示实时 token 配额、MCP 用量和上下文窗口。
效果预览:
GLM-5-Turbo | Tokens ████████░░ 78% (0h23m) | MCP ●○ 84 | Ctx 35%
node --version 确认)方式一:从 npm 安装(推荐)
npm install -g cc-glm-status
方式二:从 GitHub 安装
npm install -g github:hugo617/cc-glm-status
如果 npm 未安装,先安装 Node.js,npm 会自带。
只需两步。
在终端中运行(三选一,按优先级排列):
# 选项 A:Z.ai API Key(推荐)
echo 'export ZAI_API_KEY="你的key"' >> ~/.zshrc
source ~/.zshrc
# 选项 B:智谱 (GLM) API Key
echo 'export ZHIPU_API_KEY="你的key"' >> ~/.zshrc
source ~/.zshrc
# 选项 C:Anthropic 认证令牌
echo 'export ANTHROPIC_AUTH_TOKEN="你的key"' >> ~/.zshrc
source ~/.zshrc
写入
~/.zshrc是为了让环境变量永久生效。如果你用 bash,替换为~/.bashrc。API Key 获取方式:登录 z.ai 后台,在 API Key / 开发者设置页面复制。
编辑 ~/.claude/settings.json,在已有配置中添加 status_line 字段:
{
"其他已有配置": "...",
"status_line": "cc-glm-status"
}
注意是合并,不要覆盖文件中已有的内容。
重新打开 Claude Code,底部状态行应显示配额信息。也可在终端手动测试:
cc-glm-status --version # 确认安装成功
echo '{}' | cc-glm-status # 应输出带颜色的状态行(显示 Unknown 模型名)
echo '{}' | cc-glm-status --debug # 查看详细诊断信息
各段以 | 分隔:
| 段 | 示例 | 说明 |
|---|---|---|
| Model | GLM-5-Turbo | 当前使用的模型 |
| Tokens | Tokens ████████░░ 78% (0h23m) | Token 配额用量 + 进度条 + 重置倒计时 |
| MCP | MCP ●○ 84 | MCP 工具用量(● > 50%,○ ≤ 50%)+ 总计 |
| Ctx | Ctx 35% | 上下文窗口使用率 |
颜色含义:绿色 < 50%、黄色 50–79%、红色 ≥ 80%。
无配额数据时显示 Quota ---。
echo '{}' | cc-glm-status --debug
看到 未找到 API Key → 环境变量未设置,检查第 1 步
看到 认证失败 → API Key 无效,重新复制正确的 Key
看到 Z.ai 服务器错误 → Z.ai 暂时故障,稍后重试
有数据但仍显示 --- → 清除缓存:
macOS / Linux:
rm ~/.claude/cache/glm-status-cache.json
Windows(cmd 或 PowerShell):
del %USERPROFILE%\.claude\cache\glm-status-cache.json
node --version # 需要 v18.0.0 或更高
如果版本低于 18,通过 nvm 升级:
nvm install 18
nvm use 18
which cc-glm-status # 确认安装路径在 PATH 中
npm list -g cc-glm-status # 确认全局安装成功
| 选项 | 说明 |
|---|---|
--help / -h | 显示帮助信息 |
--version / -v | 显示版本号 |
--debug | 输出诊断信息到 stderr(排查问题用) |
| 变量 | 说明 |
|---|---|
ZAI_API_KEY | Z.ai API Key(最高优先级) |
ZHIPU_API_KEY | 智谱 (GLM) API Key |
ANTHROPIC_AUTH_TOKEN | Anthropic 认证令牌(最低优先级) |
CC_GLM_DEBUG | 设为 1 启用调试输出(等同于 --debug) |
git clone https://github.com/hugo617/cc-glm-status.git
cd cc-glm-status
npm install # 无依赖,仅验证环境
npm test # 运行测试
零外部依赖,仅使用 Node.js 18+ 原生模块。
MIT
FAQs
Real-time status line for Claude Code + GLM Coding Plan (Z.ai) — shows token quota, reset countdown, MCP usage, and context window
The npm package cc-glm-status receives a total of 9 weekly downloads. As such, cc-glm-status popularity was classified as not popular.
We found that cc-glm-status demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.