Claude HUD GLM
A Claude Code plugin that shows what's happening — context usage, active tools, running agents, todo progress, and GLM API balance tracking. Always visible below your input.
This is a fork of jarrodwatts/claude-hud with added support for Zhipu AI GLM API usage tracking.

Features
| What You See | Why It Matters |
|---|
| Project path | Know which project you're in (configurable 1-3 directory levels) |
| Context health | Know exactly how full your context window is before it's too late |
| Tool activity | Watch Claude read, edit, and search files as it happens |
| Agent tracking | See which subagents are running and what they're doing |
| Todo progress | Track task completion in real-time |
| GLM Balance | 🆕 Track your GLM API token balance and usage percentage |
GLM API Support
This version adds support for tracking usage when using the GLM API (Zhipu AI/BigModel):
- Automatic Detection: Automatically detects when you're using GLM API via
ANTHROPIC_BASE_URL containing bigmodel.cn
- Balance Tracking: Shows your token balance usage as a percentage
- Expiration Display: Shows when your token balance expires
- Fallback Support: Still works with original Anthropic API if you're not using GLM
Display Example
[glm-4.7 | GLM] █████░░░░ 45% | my-project git:(main) | GLM: 23% (expires 15d) | ⏱️ 5m
Install
Inside a Claude Code instance, run the following commands:
Step 1: Install the plugin
⚠️ Linux users: Click here first
On Linux, /tmp is often a separate filesystem (tmpfs), which causes plugin installation to fail with:
EXDEV: cross-device link not permitted
Fix: Set TMPDIR before installing:
mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claude
Then run the install command below in that session. This is a Claude Code platform limitation.
/plugin marketplace add Siiichenggg/claude-hud-glm
/plugin install claude-hud-glm
If you're installing from a local checkout instead of GitHub, add the local marketplace path first:
/plugin marketplace add /path/to/claude-hud-glm
/plugin install claude-hud-glm
Step 2: Configure the statusline
/claude-hud-glm:setup
Done! The HUD appears immediately — no restart needed.
Alternative: Install from a Local Checkout
If you cloned the repo locally, add it as a marketplace path:
/plugin marketplace add /path/to/claude-hud-glm
/plugin install claude-hud-glm
/claude-hud-glm:setup
What Each Line Shows
Session Info
[glm-4.7 | GLM] █████░░░░ 45% | my-project git:(main) | 2 CLAUDE.md | GLM: 23% (expires 15d) | ⏱️ 5m
- Model — Current model in use (shown first)
- Plan name — GLM when using GLM API, or Pro/Max/Team for Anthropic
- Context bar — Visual meter with color coding (green → yellow → red as it fills)
- Project path — Configurable 1-3 directory levels (default: 1)
- Git branch — Current branch name (configurable on/off)
- Config counts — CLAUDE.md files, rules, MCPs, and hooks loaded
- Usage/Balance — GLM token usage % (or Anthropic 5h/7d for Pro/Max/Team)
- Duration — How long the session has been running
Tool Activity
✓ TaskOutput ×2 | ✓ mcp_context7 ×1 | ✓ Glob ×1 | ✓ Skill ×1
- Running tools show a spinner with the target file
- Completed tools aggregate by type with counts
Agent Status
✓ Explore: Explore home directory structure (5s)
✓ open-source-librarian: Research React hooks patterns (2s)
- Agent type and what it's working on
- Elapsed time for each agent
Todo Progress
✓ All todos complete (5/5)
- Current task or completion status
- Progress counter (completed/total)
Configuration
Customize your HUD anytime:
/claude-hud-glm:configure
The guided flow walks you through customization — no manual editing needed.
Options