@sooneocean/claude-hud 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +20 -0
- package/LICENSE +21 -0
- package/README.md +379 -0
- package/commands/configure.md +361 -0
- package/commands/export.md +43 -0
- package/commands/health.md +61 -0
- package/commands/setup.md +287 -0
- package/commands/theme.md +31 -0
- package/dist/alert.d.ts +31 -0
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +53 -0
- package/dist/alert.js.map +1 -0
- package/dist/burn-rate.d.ts +4 -0
- package/dist/burn-rate.d.ts.map +1 -0
- package/dist/burn-rate.js +36 -0
- package/dist/burn-rate.js.map +1 -0
- package/dist/cache.d.ts +6 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +47 -0
- package/dist/cache.js.map +1 -0
- package/dist/claude-config-dir.d.ts +4 -0
- package/dist/claude-config-dir.d.ts.map +1 -0
- package/dist/claude-config-dir.js +24 -0
- package/dist/claude-config-dir.js.map +1 -0
- package/dist/config-io.d.ts +6 -0
- package/dist/config-io.d.ts.map +1 -0
- package/dist/config-io.js +27 -0
- package/dist/config-io.js.map +1 -0
- package/dist/config-reader.d.ts +8 -0
- package/dist/config-reader.d.ts.map +1 -0
- package/dist/config-reader.js +204 -0
- package/dist/config-reader.js.map +1 -0
- package/dist/config.d.ts +94 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +358 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +11 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +11 -0
- package/dist/constants.js.map +1 -0
- package/dist/cost-tracker.d.ts +9 -0
- package/dist/cost-tracker.d.ts.map +1 -0
- package/dist/cost-tracker.js +46 -0
- package/dist/cost-tracker.js.map +1 -0
- package/dist/debug.d.ts +6 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +15 -0
- package/dist/debug.js.map +1 -0
- package/dist/extra-cmd.d.ts +20 -0
- package/dist/extra-cmd.d.ts.map +1 -0
- package/dist/extra-cmd.js +112 -0
- package/dist/extra-cmd.js.map +1 -0
- package/dist/git.d.ts +16 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +94 -0
- package/dist/git.js.map +1 -0
- package/dist/health-check.d.ts +12 -0
- package/dist/health-check.d.ts.map +1 -0
- package/dist/health-check.js +37 -0
- package/dist/health-check.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +198 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/agent-teams-provider.d.ts +10 -0
- package/dist/providers/agent-teams-provider.d.ts.map +1 -0
- package/dist/providers/agent-teams-provider.js +57 -0
- package/dist/providers/agent-teams-provider.js.map +1 -0
- package/dist/providers/agw-provider.d.ts +10 -0
- package/dist/providers/agw-provider.d.ts.map +1 -0
- package/dist/providers/agw-provider.js +49 -0
- package/dist/providers/agw-provider.js.map +1 -0
- package/dist/providers/index.d.ts +14 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +25 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/render/agents-line.d.ts +3 -0
- package/dist/render/agents-line.d.ts.map +1 -0
- package/dist/render/agents-line.js +40 -0
- package/dist/render/agents-line.js.map +1 -0
- package/dist/render/alert-line.d.ts +3 -0
- package/dist/render/alert-line.d.ts.map +1 -0
- package/dist/render/alert-line.js +11 -0
- package/dist/render/alert-line.js.map +1 -0
- package/dist/render/colors.d.ts +39 -0
- package/dist/render/colors.d.ts.map +1 -0
- package/dist/render/colors.js +109 -0
- package/dist/render/colors.js.map +1 -0
- package/dist/render/framework-line.d.ts +3 -0
- package/dist/render/framework-line.d.ts.map +1 -0
- package/dist/render/framework-line.js +32 -0
- package/dist/render/framework-line.js.map +1 -0
- package/dist/render/index.d.ts +3 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +435 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/lines/environment.d.ts +3 -0
- package/dist/render/lines/environment.d.ts.map +1 -0
- package/dist/render/lines/environment.js +30 -0
- package/dist/render/lines/environment.js.map +1 -0
- package/dist/render/lines/identity.d.ts +3 -0
- package/dist/render/lines/identity.d.ts.map +1 -0
- package/dist/render/lines/identity.js +93 -0
- package/dist/render/lines/identity.js.map +1 -0
- package/dist/render/lines/index.d.ts +5 -0
- package/dist/render/lines/index.d.ts.map +1 -0
- package/dist/render/lines/index.js +5 -0
- package/dist/render/lines/index.js.map +1 -0
- package/dist/render/lines/project.d.ts +3 -0
- package/dist/render/lines/project.d.ts.map +1 -0
- package/dist/render/lines/project.js +100 -0
- package/dist/render/lines/project.js.map +1 -0
- package/dist/render/lines/usage.d.ts +3 -0
- package/dist/render/lines/usage.d.ts.map +1 -0
- package/dist/render/lines/usage.js +65 -0
- package/dist/render/lines/usage.js.map +1 -0
- package/dist/render/session-line.d.ts +7 -0
- package/dist/render/session-line.d.ts.map +1 -0
- package/dist/render/session-line.js +227 -0
- package/dist/render/session-line.js.map +1 -0
- package/dist/render/todos-line.d.ts +3 -0
- package/dist/render/todos-line.d.ts.map +1 -0
- package/dist/render/todos-line.js +29 -0
- package/dist/render/todos-line.js.map +1 -0
- package/dist/render/tools-line.d.ts +3 -0
- package/dist/render/tools-line.d.ts.map +1 -0
- package/dist/render/tools-line.js +45 -0
- package/dist/render/tools-line.js.map +1 -0
- package/dist/session-history.d.ts +15 -0
- package/dist/session-history.d.ts.map +1 -0
- package/dist/session-history.js +46 -0
- package/dist/session-history.js.map +1 -0
- package/dist/session-stats.d.ts +11 -0
- package/dist/session-stats.d.ts.map +1 -0
- package/dist/session-stats.js +48 -0
- package/dist/session-stats.js.map +1 -0
- package/dist/speed-tracker.d.ts +7 -0
- package/dist/speed-tracker.d.ts.map +1 -0
- package/dist/speed-tracker.js +34 -0
- package/dist/speed-tracker.js.map +1 -0
- package/dist/stdin.d.ts +9 -0
- package/dist/stdin.d.ts.map +1 -0
- package/dist/stdin.js +142 -0
- package/dist/stdin.js.map +1 -0
- package/dist/themes.d.ts +10 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +81 -0
- package/dist/themes.js.map +1 -0
- package/dist/transcript.d.ts +3 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transcript.js +221 -0
- package/dist/transcript.js.map +1 -0
- package/dist/types.d.ts +124 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/usage-api.d.ts +62 -0
- package/dist/usage-api.d.ts.map +1 -0
- package/dist/usage-api.js +908 -0
- package/dist/usage-api.js.map +1 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +75 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/terminal.d.ts +5 -0
- package/dist/utils/terminal.d.ts.map +1 -0
- package/dist/utils/terminal.js +42 -0
- package/dist/utils/terminal.js.map +1 -0
- package/package.json +36 -0
- package/src/alert.ts +75 -0
- package/src/burn-rate.ts +45 -0
- package/src/cache.ts +57 -0
- package/src/claude-config-dir.ts +27 -0
- package/src/config-io.ts +26 -0
- package/src/config-reader.ts +236 -0
- package/src/config.ts +496 -0
- package/src/constants.ts +10 -0
- package/src/cost-tracker.ts +53 -0
- package/src/debug.ts +16 -0
- package/src/extra-cmd.ts +125 -0
- package/src/git.ts +126 -0
- package/src/health-check.ts +50 -0
- package/src/index.ts +234 -0
- package/src/providers/agent-teams-provider.ts +56 -0
- package/src/providers/agw-provider.ts +47 -0
- package/src/providers/index.ts +27 -0
- package/src/render/agents-line.ts +51 -0
- package/src/render/alert-line.ts +11 -0
- package/src/render/colors.ts +145 -0
- package/src/render/framework-line.ts +34 -0
- package/src/render/index.ts +512 -0
- package/src/render/lines/environment.ts +41 -0
- package/src/render/lines/identity.ts +109 -0
- package/src/render/lines/index.ts +4 -0
- package/src/render/lines/project.ts +113 -0
- package/src/render/lines/usage.ts +79 -0
- package/src/render/session-line.ts +253 -0
- package/src/render/todos-line.ts +35 -0
- package/src/render/tools-line.ts +58 -0
- package/src/session-history.ts +62 -0
- package/src/session-stats.ts +65 -0
- package/src/speed-tracker.ts +51 -0
- package/src/stdin.ts +169 -0
- package/src/themes.ts +90 -0
- package/src/transcript.ts +268 -0
- package/src/types.ts +146 -0
- package/src/usage-api.ts +1090 -0
- package/src/utils/format.ts +79 -0
- package/src/utils/terminal.ts +46 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-hud",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Jarrod Watts",
|
|
5
|
+
"email": "jarrodwattsyt@gmail.com"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress",
|
|
9
|
+
"version": "0.0.10"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "claude-hud",
|
|
14
|
+
"source": "./",
|
|
15
|
+
"description": "Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.",
|
|
16
|
+
"category": "monitoring",
|
|
17
|
+
"tags": ["hud", "statusline", "monitoring", "context", "tools", "agents", "todos"]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-hud",
|
|
3
|
+
"description": "Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress",
|
|
4
|
+
"version": "0.0.10",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jarrod Watts",
|
|
7
|
+
"url": "https://github.com/jarrodwatts"
|
|
8
|
+
},
|
|
9
|
+
"commands": [
|
|
10
|
+
"./commands/setup.md",
|
|
11
|
+
"./commands/configure.md",
|
|
12
|
+
"./commands/health.md",
|
|
13
|
+
"./commands/export.md",
|
|
14
|
+
"./commands/theme.md"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/jarrodwatts/claude-hud",
|
|
17
|
+
"repository": "https://github.com/jarrodwatts/claude-hud",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"keywords": ["hud", "monitoring", "statusline", "context", "tools", "agents", "todos", "claude-code"]
|
|
20
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jarrod Watts
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
# Claude HUD
|
|
2
|
+
|
|
3
|
+
A Claude Code plugin that shows what's happening — context usage, active tools, running agents, and todo progress. Always visible below your input.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/jarrodwatts/claude-hud/stargazers)
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Inside a Claude Code instance, run the following commands:
|
|
13
|
+
|
|
14
|
+
**Step 1: Add the marketplace**
|
|
15
|
+
```
|
|
16
|
+
/plugin marketplace add jarrodwatts/claude-hud
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Step 2: Install the plugin**
|
|
20
|
+
|
|
21
|
+
<details>
|
|
22
|
+
<summary><strong>⚠️ Linux users: Click here first</strong></summary>
|
|
23
|
+
|
|
24
|
+
On Linux, `/tmp` is often a separate filesystem (tmpfs), which causes plugin installation to fail with:
|
|
25
|
+
```
|
|
26
|
+
EXDEV: cross-device link not permitted
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Fix**: Set TMPDIR before installing:
|
|
30
|
+
```bash
|
|
31
|
+
mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claude
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then run the install command below in that session. This is a [Claude Code platform limitation](https://github.com/anthropics/claude-code/issues/14799).
|
|
35
|
+
|
|
36
|
+
</details>
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/plugin install claude-hud
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Step 3: Configure the statusline**
|
|
43
|
+
```
|
|
44
|
+
/claude-hud:setup
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Done! Restart Claude Code to load the new statusLine config, then the HUD will appear.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## What is Claude HUD?
|
|
52
|
+
|
|
53
|
+
Claude HUD gives you better insights into what's happening in your Claude Code session.
|
|
54
|
+
|
|
55
|
+
| What You See | Why It Matters |
|
|
56
|
+
|--------------|----------------|
|
|
57
|
+
| **Project path** | Know which project you're in (configurable 1-3 directory levels) |
|
|
58
|
+
| **Context health** | Know exactly how full your context window is before it's too late |
|
|
59
|
+
| **Tool activity** | Watch Claude read, edit, and search files as it happens |
|
|
60
|
+
| **Agent tracking** | See which subagents are running and what they're doing |
|
|
61
|
+
| **Todo progress** | Track task completion in real-time |
|
|
62
|
+
|
|
63
|
+
## What You See
|
|
64
|
+
|
|
65
|
+
### Default (2 lines)
|
|
66
|
+
```
|
|
67
|
+
[Opus | Max] │ my-project git:(main*)
|
|
68
|
+
Context █████░░░░░ 45% │ Usage ██░░░░░░░░ 25% (1h 30m / 5h)
|
|
69
|
+
```
|
|
70
|
+
- **Line 1** — Model, plan name (or `Bedrock`), project path, git branch
|
|
71
|
+
- **Line 2** — Context bar (green → yellow → red) and usage rate limits
|
|
72
|
+
|
|
73
|
+
### Optional lines (enable via `/claude-hud:configure`)
|
|
74
|
+
```
|
|
75
|
+
◐ Edit: auth.ts | ✓ Read ×3 | ✓ Grep ×2 ← Tools activity
|
|
76
|
+
◐ explore [haiku]: Finding auth code (2m 15s) ← Agent status
|
|
77
|
+
▸ Fix authentication bug (2/5) ← Todo progress
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## How It Works
|
|
83
|
+
|
|
84
|
+
Claude HUD uses Claude Code's native **statusline API** — no separate window, no tmux required, works in any terminal.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Claude Code → stdin JSON → claude-hud → stdout → displayed in your terminal
|
|
88
|
+
↘ transcript JSONL (tools, agents, todos)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Key features:**
|
|
92
|
+
- Native token data from Claude Code (not estimated)
|
|
93
|
+
- Scales with Claude Code's reported context window size, including newer 1M-context sessions
|
|
94
|
+
- Parses the transcript for tool/agent activity
|
|
95
|
+
- Updates every ~300ms
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Configuration
|
|
100
|
+
|
|
101
|
+
Customize your HUD anytime:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/claude-hud:configure
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The guided flow handles layout and display toggles. Advanced overrides such as
|
|
108
|
+
custom colors and thresholds are preserved there, but you set them by editing the config file directly:
|
|
109
|
+
|
|
110
|
+
- **First time setup**: Choose a preset (Full/Essential/Minimal), then fine-tune individual elements
|
|
111
|
+
- **Customize anytime**: Toggle items on/off, adjust git display style, switch layouts
|
|
112
|
+
- **Preview before saving**: See exactly how your HUD will look before committing changes
|
|
113
|
+
|
|
114
|
+
### Presets
|
|
115
|
+
|
|
116
|
+
| Preset | What's Shown |
|
|
117
|
+
|--------|--------------|
|
|
118
|
+
| **Full** | Everything enabled — tools, agents, todos, git, usage, duration |
|
|
119
|
+
| **Essential** | Activity lines + git status, minimal info clutter |
|
|
120
|
+
| **Minimal** | Core only — just model name and context bar |
|
|
121
|
+
|
|
122
|
+
After choosing a preset, you can turn individual elements on or off.
|
|
123
|
+
|
|
124
|
+
### Manual Configuration
|
|
125
|
+
|
|
126
|
+
Edit `~/.claude/plugins/claude-hud/config.json` directly for advanced settings such as `colors.*`,
|
|
127
|
+
`pathLevels`, and threshold overrides. Running `/claude-hud:configure` preserves those manual settings.
|
|
128
|
+
|
|
129
|
+
### Options
|
|
130
|
+
|
|
131
|
+
| Option | Type | Default | Description |
|
|
132
|
+
|--------|------|---------|-------------|
|
|
133
|
+
| `lineLayout` | string | `expanded` | Layout: `expanded` (multi-line) or `compact` (single line) |
|
|
134
|
+
| `pathLevels` | 1-3 | 1 | Directory levels to show in project path |
|
|
135
|
+
| `elementOrder` | string[] | `["project","context","usage","environment","tools","agents","todos"]` | Expanded-mode element order. Omit entries to hide them in expanded mode. |
|
|
136
|
+
| `gitStatus.enabled` | boolean | true | Show git branch in HUD |
|
|
137
|
+
| `gitStatus.showDirty` | boolean | true | Show `*` for uncommitted changes |
|
|
138
|
+
| `gitStatus.showAheadBehind` | boolean | false | Show `↑N ↓N` for ahead/behind remote |
|
|
139
|
+
| `gitStatus.showFileStats` | boolean | false | Show file change counts `!M +A ✘D ?U` |
|
|
140
|
+
| `display.showModel` | boolean | true | Show model name `[Opus]` |
|
|
141
|
+
| `display.showContextBar` | boolean | true | Show visual context bar `████░░░░░░` |
|
|
142
|
+
| `display.contextValue` | `percent` \| `tokens` \| `remaining` | `percent` | Context display format (`45%`, `45k/200k`, or `55%` remaining) |
|
|
143
|
+
| `display.showConfigCounts` | boolean | false | Show CLAUDE.md, rules, MCPs, hooks counts |
|
|
144
|
+
| `display.showDuration` | boolean | false | Show session duration `⏱️ 5m` |
|
|
145
|
+
| `display.showSpeed` | boolean | false | Show output token speed `out: 42.1 tok/s` |
|
|
146
|
+
| `display.showUsage` | boolean | true | Show usage limits (Pro/Max/Team only) |
|
|
147
|
+
| `display.usageBarEnabled` | boolean | true | Display usage as visual bar instead of text |
|
|
148
|
+
| `display.sevenDayThreshold` | 0-100 | 80 | Show 7-day usage when >= threshold (0 = always) |
|
|
149
|
+
| `display.showTokenBreakdown` | boolean | true | Show token details at high context (85%+) |
|
|
150
|
+
| `display.showTools` | boolean | false | Show tools activity line |
|
|
151
|
+
| `display.showAgents` | boolean | false | Show agents activity line |
|
|
152
|
+
| `display.showTodos` | boolean | false | Show todos progress line |
|
|
153
|
+
| `display.showSessionName` | boolean | false | Show session slug or custom title from `/rename` |
|
|
154
|
+
| `usage.cacheTtlSeconds` | number | 60 | How long (seconds) to cache a successful usage API response |
|
|
155
|
+
| `usage.failureCacheTtlSeconds` | number | 15 | How long (seconds) to cache a failed usage API response before retrying |
|
|
156
|
+
| `colors.context` | color name | `green` | Base color for the context bar and context percentage |
|
|
157
|
+
| `colors.usage` | color name | `brightBlue` | Base color for usage bars and percentages below warning thresholds |
|
|
158
|
+
| `colors.warning` | color name | `yellow` | Warning color for context thresholds and usage warning text |
|
|
159
|
+
| `colors.usageWarning` | color name | `brightMagenta` | Warning color for usage bars and percentages near their threshold |
|
|
160
|
+
| `colors.critical` | color name | `red` | Critical color for limit-reached states and critical thresholds |
|
|
161
|
+
|
|
162
|
+
Supported color names: `red`, `green`, `yellow`, `magenta`, `cyan`, `brightBlue`, `brightMagenta`.
|
|
163
|
+
|
|
164
|
+
### Usage Limits (Pro/Max/Team)
|
|
165
|
+
|
|
166
|
+
Usage display is **enabled by default** for Claude Pro, Max, and Team subscribers. It shows your rate limit consumption on line 2 alongside the context bar.
|
|
167
|
+
|
|
168
|
+
The 7-day percentage appears when above the `display.sevenDayThreshold` (default 80%):
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
Context █████░░░░░ 45% │ Usage ██░░░░░░░░ 25% (1h 30m / 5h) | ██████████ 85% (2d / 7d)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
To disable, set `display.showUsage` to `false`.
|
|
175
|
+
|
|
176
|
+
**Requirements:**
|
|
177
|
+
- Claude Pro, Max, or Team subscription (not available for API users)
|
|
178
|
+
- OAuth credentials from Claude Code (created automatically when you log in)
|
|
179
|
+
|
|
180
|
+
**Troubleshooting:** If usage doesn't appear:
|
|
181
|
+
- Ensure you're logged in with a Pro/Max/Team account (not API key)
|
|
182
|
+
- Check `display.showUsage` is not set to `false` in config
|
|
183
|
+
- API users see no usage display (they have pay-per-token, not rate limits)
|
|
184
|
+
- AWS Bedrock models display `Bedrock` and hide usage limits (usage is managed in AWS)
|
|
185
|
+
- Non-default `ANTHROPIC_BASE_URL` / `ANTHROPIC_API_BASE_URL` settings skip usage display, because the Anthropic OAuth usage API may not apply
|
|
186
|
+
- If you are behind a proxy, set `HTTPS_PROXY` (or `HTTP_PROXY`/`ALL_PROXY`) and optional `NO_PROXY`
|
|
187
|
+
- For high-latency environments, increase usage API timeout with `CLAUDE_HUD_USAGE_TIMEOUT_MS` (milliseconds)
|
|
188
|
+
|
|
189
|
+
### Example Configuration
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"lineLayout": "expanded",
|
|
194
|
+
"pathLevels": 2,
|
|
195
|
+
"elementOrder": ["project", "tools", "context", "usage", "environment", "agents", "todos"],
|
|
196
|
+
"gitStatus": {
|
|
197
|
+
"enabled": true,
|
|
198
|
+
"showDirty": true,
|
|
199
|
+
"showAheadBehind": true,
|
|
200
|
+
"showFileStats": true
|
|
201
|
+
},
|
|
202
|
+
"display": {
|
|
203
|
+
"showTools": true,
|
|
204
|
+
"showAgents": true,
|
|
205
|
+
"showTodos": true,
|
|
206
|
+
"showConfigCounts": true,
|
|
207
|
+
"showDuration": true
|
|
208
|
+
},
|
|
209
|
+
"colors": {
|
|
210
|
+
"context": "cyan",
|
|
211
|
+
"usage": "cyan",
|
|
212
|
+
"warning": "yellow",
|
|
213
|
+
"usageWarning": "magenta",
|
|
214
|
+
"critical": "red"
|
|
215
|
+
},
|
|
216
|
+
"usage": {
|
|
217
|
+
"cacheTtlSeconds": 120,
|
|
218
|
+
"failureCacheTtlSeconds": 30
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Display Examples
|
|
224
|
+
|
|
225
|
+
**1 level (default):** `[Opus] │ my-project git:(main)`
|
|
226
|
+
|
|
227
|
+
**2 levels:** `[Opus] │ apps/my-project git:(main)`
|
|
228
|
+
|
|
229
|
+
**3 levels:** `[Opus] │ dev/apps/my-project git:(main)`
|
|
230
|
+
|
|
231
|
+
**With dirty indicator:** `[Opus] │ my-project git:(main*)`
|
|
232
|
+
|
|
233
|
+
**With ahead/behind:** `[Opus] │ my-project git:(main ↑2 ↓1)`
|
|
234
|
+
|
|
235
|
+
**With file stats:** `[Opus] │ my-project git:(main* !3 +1 ?2)`
|
|
236
|
+
- `!` = modified files, `+` = added/staged, `✘` = deleted, `?` = untracked
|
|
237
|
+
- Counts of 0 are omitted for cleaner display
|
|
238
|
+
|
|
239
|
+
### Troubleshooting
|
|
240
|
+
|
|
241
|
+
**Config not applying?**
|
|
242
|
+
- Check for JSON syntax errors: invalid JSON silently falls back to defaults
|
|
243
|
+
- Ensure valid values: `pathLevels` must be 1, 2, or 3; `lineLayout` must be `expanded` or `compact`
|
|
244
|
+
- Delete config and run `/claude-hud:configure` to regenerate
|
|
245
|
+
|
|
246
|
+
**Git status missing?**
|
|
247
|
+
- Verify you're in a git repository
|
|
248
|
+
- Check `gitStatus.enabled` is not `false` in config
|
|
249
|
+
|
|
250
|
+
**Tool/agent/todo lines missing?**
|
|
251
|
+
- These are hidden by default — enable with `showTools`, `showAgents`, `showTodos` in config
|
|
252
|
+
- They also only appear when there's activity to show
|
|
253
|
+
|
|
254
|
+
**HUD not appearing after setup?**
|
|
255
|
+
- Restart Claude Code so it picks up the new statusLine config
|
|
256
|
+
- On macOS, fully quit Claude Code and run `claude` again in your terminal
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Enhanced Features
|
|
261
|
+
|
|
262
|
+
These features were added in the enhancement fork. All are opt-in and backward-compatible.
|
|
263
|
+
|
|
264
|
+
### Dashboard Rich Mode
|
|
265
|
+
|
|
266
|
+
Enable all visual enhancements:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"display": {
|
|
271
|
+
"activityIndicator": true,
|
|
272
|
+
"treePrefixes": true,
|
|
273
|
+
"mergeToolsAgents": true,
|
|
274
|
+
"barStyle": "modern"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Features:
|
|
280
|
+
- **Activity indicator** (`◉`) — Red when tools running, green when idle
|
|
281
|
+
- **Tree prefixes** (`├─` / `└─`) — Hierarchical connectors for activity lines
|
|
282
|
+
- **Merged tools+agents** — Combined on one line for density
|
|
283
|
+
- **Modern bar chars** (`▰▱`) — Cleaner alternative to `█░`
|
|
284
|
+
- **Todo mini progress bar** (`▪▪▪▪▪`) — Per-item colored squares
|
|
285
|
+
- **Context sparkline** — Mini trend chart of recent context usage
|
|
286
|
+
|
|
287
|
+
### Alerts
|
|
288
|
+
|
|
289
|
+
Configurable threshold alerts with visual, bell, and prediction text:
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"display": { "showAlerts": true },
|
|
294
|
+
"alerts": {
|
|
295
|
+
"context": { "warningThreshold": 70, "criticalThreshold": 85 },
|
|
296
|
+
"usage5h": { "warningThreshold": 70, "criticalThreshold": 90 },
|
|
297
|
+
"usage7d": { "warningThreshold": 80 }
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Framework Integration
|
|
303
|
+
|
|
304
|
+
Monitor AGW combos and Agent Teams worktrees:
|
|
305
|
+
|
|
306
|
+
```json
|
|
307
|
+
{
|
|
308
|
+
"display": { "showFrameworks": true },
|
|
309
|
+
"frameworks": {
|
|
310
|
+
"agw": { "enabled": true, "endpoint": "http://localhost:3000" },
|
|
311
|
+
"agentTeams": { "enabled": true }
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Color Themes
|
|
317
|
+
|
|
318
|
+
One-key theme switching: Default, Catppuccin Mocha, Dracula, Nord.
|
|
319
|
+
|
|
320
|
+
```json
|
|
321
|
+
{ "theme": "catppuccin" }
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Or use the command: `/claude-hud:theme`
|
|
325
|
+
|
|
326
|
+
### Cost Estimation
|
|
327
|
+
|
|
328
|
+
Session cost tracking based on model pricing:
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{ "display": { "showCost": true } }
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Performance
|
|
335
|
+
|
|
336
|
+
- **File-based cache** with TTL reduces I/O on the 300ms polling cycle
|
|
337
|
+
- **Transcript mtime caching** skips re-parsing when file hasn't changed
|
|
338
|
+
- **Git status caching** (2s TTL) eliminates redundant git commands
|
|
339
|
+
- **Responsive layout** adapts to terminal width without truncating content
|
|
340
|
+
|
|
341
|
+
### Additional Commands
|
|
342
|
+
|
|
343
|
+
| Command | Description |
|
|
344
|
+
|---------|-------------|
|
|
345
|
+
| `/claude-hud:health` | Diagnostic health check |
|
|
346
|
+
| `/claude-hud:export` | Export/import/reset config |
|
|
347
|
+
| `/claude-hud:theme` | Switch color theme |
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Requirements
|
|
352
|
+
|
|
353
|
+
- Claude Code v1.0.80+
|
|
354
|
+
- Node.js 18+ or Bun
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## Development
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
git clone https://github.com/jarrodwatts/claude-hud
|
|
362
|
+
cd claude-hud
|
|
363
|
+
npm ci && npm run build
|
|
364
|
+
npm test
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## License
|
|
372
|
+
|
|
373
|
+
MIT — see [LICENSE](LICENSE)
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Star History
|
|
378
|
+
|
|
379
|
+
[](https://star-history.com/#jarrodwatts/claude-hud&Date)
|