You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(statusline): add multi-provider support with z.ai GLM auto-detection
Detect model provider from JSON input (glm-* prefix) and fetch rate
limits from the appropriate API. Add token counts and progress bar to
context display, per-tool breakdown for z.ai (Search/Web/ZRead), and
provider-aware caching to prevent stale cross-provider data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: statusline/.claude-plugin/plugin.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "statusline",
3
-
"version": "1.6.0",
4
-
"description": "Configurable status bar showing context usage, API rate limits (5h/7d for Anthropic, detailed metrics for z.ai GLM), git branch, and active tools. Supports 1/2/3 line layouts with smart hiding of empty values.",
3
+
"version": "1.7.0",
4
+
"description": "Multi-provider status bar with context health, API rate limits (Anthropic 5h/7d + z.ai GLM tokens/tools), git branch, and active tools. Auto-detects provider from model name. Supports 1/2/3 line layouts with smart hiding.",
A Claude Code plugin that provides real-time visibility into your coding session. Track context usage, active tools, running agents, and task progress at a glance.
3
+
A Claude Code plugin that provides real-time visibility into your coding session. Track context usage, API rate limits, active tools, running agents, and task progress at a glance.
4
4
5
-
**Inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud) — enhanced for the claude-plugins ecosystem.**
5
+
**Multi-provider support:** Automatically detects Anthropic vs z.ai GLM models and shows provider-specific metrics.
6
6
7
7
## Overview
8
8
9
-
Statusline keeps you informed about what's happening during your Claude Code session without interrupting your workflow. Get immediate feedback on:
9
+
Statusline keeps you informed about what's happening during your Claude Code session without interrupting your workflow.
10
10
11
-
| Metric | Purpose |
12
-
|--------|---------|
13
-
|**Context Health**| Know exactly how much of your token window is in use |
14
-
|**Active Tools**| See which tools Claude is using right now |
15
-
|**Agent Tracking**| Monitor running agents and their execution time |
16
-
|**Task Progress**| Track todo completion in real-time |
17
-
|**API Rate Limits**| Monitor usage across Anthropic (5h/7d) or z.ai GLM (5h) |
11
+
| Metric | Anthropic | z.ai GLM |
12
+
|--------|-----------|----------|
13
+
|**Context Health**| Token count, percentage, progress bar | Token count, percentage, progress bar |
| Linux | File: `~/.local/share/opencode/auth.json`|
153
-
| Windows | File: `%USERPROFILE%\.local\share\opencode\auth.json`|
154
-
155
-
The provider is automatically detected from the `CLAUDE_MODEL` or `ANTHROPIC_MODEL` environment variable. Any model starting with `glm-` will use the z.ai API.
72
+
## Context Health
156
73
157
-
## Features
74
+
Color-coded progress indicator:
75
+
- 🟢 Green: 0-60% — Comfortable
76
+
- 🟡 Yellow: 60-85% — Getting full
77
+
- 🔴 Red: 85%+ — Approaching limit
158
78
159
-
✅ **Real-time Updates** — Status refreshes automatically at your chosen interval
79
+
The 3-line format includes a visual progress bar: `███░░░░░░░ 30%`
160
80
161
-
✅ **Non-intrusive** — Displays without interrupting your workflow
81
+
## API Rate Limits
162
82
163
-
✅ **Customizable** — Set monitoring frequency that works for you
83
+
### Anthropic
164
84
165
-
✅ **Manual Control** — Check status anytime with `/statusline:status`
85
+
Shows 5-hour and 7-day utilization percentages:
86
+
```
87
+
5h: 42% │ 7d: 28%
88
+
```
166
89
167
-
✅ **Plugin Integration** — Works seamlessly with other Claude Code plugins
90
+
Requires Claude Code OAuth credentials (auto-detected from keychain or config files).
168
91
169
-
✅ **Token Awareness** — Shows actual token counts from Claude Code
2.**Environment** — `ZAI_API_KEY` or `ZAI_CODING_PLAN_KEY`
107
+
3.**Config files** — `~/.local/share/opencode/auth.json` or `~/.zai/auth.json`
182
108
183
-
1.**Token Usage** — Real counts from Claude Code's context window
184
-
2.**Tool Activity** — Tracked from tool invocations in your session
185
-
3.**Agent Operations** — Monitored from subagent execution
186
-
4.**Task Management** — Read from your TodoWrite operations
109
+
## Smart Hiding
187
110
188
-
Updates happen at a regular interval (default 5 seconds) without blocking your work.
111
+
Empty values are never shown:
112
+
- No "None", "0%", or "No tasks" clutter
113
+
- Tool/agent sections hidden when inactive
114
+
- Per-tool breakdown only shown when usage > 0
115
+
- Output style hidden when set to "default"
189
116
190
117
## Requirements
191
118
192
119
- Claude Code v1.0.80+
193
-
- Node.js 18+ or Bun (if running custom build)
194
-
195
-
## Inspiration
196
-
197
-
This plugin is inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud) but optimized for the claude-plugins marketplace with enhanced integration and customization options.
198
-
199
-
## Development
200
-
201
-
Session Monitor is built with:
202
-
- TypeScript for type safety
203
-
- Claude Code's native APIs
204
-
- Minimal dependencies for quick performance
205
-
206
-
### Source Structure
207
-
208
-
```
209
-
session-monitor/
210
-
├── .claude-plugin/
211
-
│ └── plugin.json # Plugin manifest
212
-
├── commands/
213
-
│ ├── status.md # Status command documentation
214
-
│ ├── enable.md # Enable command documentation
215
-
│ └── disable.md # Disable command documentation
216
-
└── README.md # This file
217
-
```
120
+
- Node.js 18+ (for TypeScript CLI)
121
+
-`jq` (for Bash statusline script)
218
122
219
123
## Contributing
220
124
221
-
Found an issue or have a feature idea? Contributions are welcome! This plugin is part of the [claude-plugins](https://github.com/duyet/claude-plugins) marketplace.
125
+
Found an issue or have a feature idea? Open an issue on the [claude-plugins repository](https://github.com/duyet/claude-plugins/issues).
0 commit comments