@jukanntenn/glm-plan-usage
v0.3.0
Published
GLM Plan Usage - StatusLine plugin for Claude Code
Maintainers
Readme
@jukanntenn/glm-plan-usage
GLM Plan Usage - StatusLine plugin for Claude Code
Installation
npm install -g @jukanntenn/glm-plan-usageFor users experiencing network issues, use npm mirror for faster installation:
npm install -g @jukanntenn/glm-plan-usage --registry https://registry.npmmirror.comFeatures
- 📊 Real-time Usage Tracking: Display Token and MCP usage percentages
- 🗓️ Weekly Quota Support: Display weekly Token usage (new plan users only)
- 🎨 Color-coded Warnings: Green (0-80%), Yellow (81-90%), Red (91%+)
- ⚡ Smart Caching: 5-minute cache to reduce API calls
- 🔍 Auto Platform Detection: Supports ZAI and ZHIPU platforms
- 🔄 Model Consumption Multiplier: Automatically calculates and displays consumption rate for premium models during peak/off-peak hours
- 🌍 Cross-platform Support: Works on Windows, macOS, and Linux
Usage
Quick Setup (Recommended)
After installation, run the following command to automatically configure Claude Code's settings.json:
glm-plan-usage setupIf you are also using CCometixLine, use combined mode:
glm-plan-usage setup --with-cclineManual Setup
Add to your Claude Code settings.json:
Linux/macOS:
{
"statusLine": {
"type": "command",
"command": "~/.claude/glm-plan-usage/glm-plan-usage",
"padding": 0
}
}Windows:
{
"statusLine": {
"type": "command",
"command": "$HOME/.claude/glm-plan-usage/glm-plan-usage.exe",
"padding": 0
}
}Note: Older versions of Claude Code may require Windows-style paths, such as
%USERPROFILE%\.claude\glm-plan-usage\glm-plan-usage.exe.
Restart Claude Code, the status bar will display:
🪙 32% · 3x · ⏱ 14:30 | 🗓️ 24% | 🌐 20/100
│ │ │ │ │ │ └─ MCP usage (used/total)
│ │ │ │ │ └─ Segment separator
│ │ │ │ └─ Weekly quota percentage (new plan users)
│ │ │ └─ Token reset time (clock mode)
│ │ └─ Consumption multiplier (only for premium models when > 1x)
│ └─ Internal separator
└─ Token usage percentageEnvironment Variables
Note: These variables are typically already configured in your Claude Code settings.json. If not, you can set them manually:
Linux/macOS:
export ANTHROPIC_AUTH_TOKEN="your-token-here"
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"Windows (Command Prompt):
set ANTHROPIC_AUTH_TOKEN=your-token-here
set ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropicWindows (PowerShell):
$env:ANTHROPIC_AUTH_TOKEN="your-token-here"
$env:ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"More Information
- GitHub: https://github.com/jukanntenn/glm-plan-usage
- Issues: https://github.com/jukanntenn/glm-plan-usage/issues
- License: MIT
