@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,361 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Configure HUD display options (layout, presets, display elements) while preserving advanced manual overrides
|
|
3
|
+
allowed-tools: Read, Write, AskUserQuestion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Configure Claude HUD
|
|
7
|
+
|
|
8
|
+
**FIRST**: Use the Read tool to load `~/.claude/plugins/claude-hud/config.json` if it exists.
|
|
9
|
+
|
|
10
|
+
Store current values and note whether config exists (determines which flow to use).
|
|
11
|
+
|
|
12
|
+
## Always On (Core Features)
|
|
13
|
+
|
|
14
|
+
These are always enabled and NOT configurable:
|
|
15
|
+
- Model name `[Opus]`
|
|
16
|
+
- Context bar `████░░░░░░ 45%`
|
|
17
|
+
|
|
18
|
+
Advanced settings such as `colors.*`, `pathLevels`, `display.usageThreshold`, and
|
|
19
|
+
`display.environmentThreshold` are preserved when saving but are not edited by this guided flow.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Two Flows Based on Config State
|
|
24
|
+
|
|
25
|
+
### Flow A: New User (no config)
|
|
26
|
+
Questions: **Layout → Preset → Bar Style → Turn Off → Turn On**
|
|
27
|
+
|
|
28
|
+
### Flow B: Update Config (config exists)
|
|
29
|
+
Questions: **Turn Off → Turn On → Git Style → Color Theme → Layout/Reset → Custom Line** (6 questions max)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Flow A: New User (6 Questions)
|
|
34
|
+
|
|
35
|
+
### Q1: Layout
|
|
36
|
+
- header: "Layout"
|
|
37
|
+
- question: "Choose your HUD layout:"
|
|
38
|
+
- multiSelect: false
|
|
39
|
+
- options:
|
|
40
|
+
- "Expanded (Recommended)" - Split into semantic lines (identity, project, environment, usage)
|
|
41
|
+
- "Compact" - Everything on one line
|
|
42
|
+
- "Compact + Separators" - One line with separator before activity
|
|
43
|
+
|
|
44
|
+
### Q2: Preset
|
|
45
|
+
- header: "Preset"
|
|
46
|
+
- question: "Choose a starting configuration:"
|
|
47
|
+
- multiSelect: false
|
|
48
|
+
- options:
|
|
49
|
+
- "Full" - Everything enabled (Recommended)
|
|
50
|
+
- "Essential" - Activity + git, minimal info
|
|
51
|
+
- "Minimal" - Core only (model, context bar)
|
|
52
|
+
|
|
53
|
+
### Q3: Bar Style
|
|
54
|
+
- header: "Bar Style"
|
|
55
|
+
- question: "Choose progress bar characters:"
|
|
56
|
+
- multiSelect: false
|
|
57
|
+
- options:
|
|
58
|
+
- "Classic" — █████░░░░░ (default)
|
|
59
|
+
- "Modern" — ▰▰▰▰▰▱▱▱▱▱
|
|
60
|
+
|
|
61
|
+
| Option | Config |
|
|
62
|
+
|--------|--------|
|
|
63
|
+
| Classic | `display.barStyle: "classic"` |
|
|
64
|
+
| Modern | `display.barStyle: "modern"` |
|
|
65
|
+
|
|
66
|
+
### Q4: Turn Off (based on chosen preset)
|
|
67
|
+
- header: "Turn Off"
|
|
68
|
+
- question: "Disable any of these? (enabled by your preset)"
|
|
69
|
+
- multiSelect: true
|
|
70
|
+
- options: **ONLY items that are ON in the chosen preset** (max 4)
|
|
71
|
+
- "Tools activity" - ◐ Edit: file.ts | ✓ Read ×3
|
|
72
|
+
- "Agents status" - ◐ explore [haiku]: Finding code
|
|
73
|
+
- "Todo progress" - ▸ Fix bug (2/5 tasks)
|
|
74
|
+
- "Project name" - my-project path display
|
|
75
|
+
- "Git status" - git:(main*) branch indicator
|
|
76
|
+
- "Config counts" - 2 CLAUDE.md | 4 rules
|
|
77
|
+
- "Token breakdown" - (in: 45k, cache: 12k)
|
|
78
|
+
- "Output speed" - out: 42.1 tok/s
|
|
79
|
+
- "Usage limits" - 5h: 25% | 7d: 10%
|
|
80
|
+
- "Session duration" - ⏱️ 5m
|
|
81
|
+
- "Session name" - fix-auth-bug (session slug or custom title)
|
|
82
|
+
- "Frameworks" — ⟳ AGW: pipeline (3/5) │ ⬡ Teams: fe✓ be◐
|
|
83
|
+
- "Burn rate" — 1.2k tok/m consumption rate
|
|
84
|
+
- "Alerts" — ⚠ Context 92% — ~8 calls
|
|
85
|
+
- "Activity indicator" — ◉ red/green status dot
|
|
86
|
+
- "Tree prefixes" — ├─ └─ hierarchical connectors
|
|
87
|
+
- "Merge tools+agents" — Combine on one line
|
|
88
|
+
|
|
89
|
+
### Q5: Turn On (based on chosen preset)
|
|
90
|
+
- header: "Turn On"
|
|
91
|
+
- question: "Enable any of these? (disabled by your preset)"
|
|
92
|
+
- multiSelect: true
|
|
93
|
+
- options: **ONLY items that are OFF in the chosen preset** (max 4)
|
|
94
|
+
- (same list as above, filtered to OFF items)
|
|
95
|
+
|
|
96
|
+
**Note:** If preset has all items ON (Full), Q5 shows "Nothing to enable - Full preset has everything!"
|
|
97
|
+
If preset has all items OFF (Minimal), Q4 shows "Nothing to disable - Minimal preset is already minimal!"
|
|
98
|
+
|
|
99
|
+
### Q6: Custom Line (optional)
|
|
100
|
+
- header: "Custom Line"
|
|
101
|
+
- question: "Add a custom phrase to display in the HUD? (e.g. a motto, max 80 chars)"
|
|
102
|
+
- multiSelect: false
|
|
103
|
+
- options:
|
|
104
|
+
- "Skip" - No custom line
|
|
105
|
+
- "Enter custom text" - Ask user for their phrase via AskUserQuestion (free text input)
|
|
106
|
+
|
|
107
|
+
If user chooses "Enter custom text", use AskUserQuestion to get their text. Save as `display.customLine` in config.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Flow B: Update Config (6 Questions)
|
|
112
|
+
|
|
113
|
+
### Q1: Turn Off
|
|
114
|
+
- header: "Turn Off"
|
|
115
|
+
- question: "What do you want to DISABLE? (currently enabled)"
|
|
116
|
+
- multiSelect: true
|
|
117
|
+
- options: **ONLY items currently ON** (max 4, prioritize Activity first)
|
|
118
|
+
- "Tools activity" - ◐ Edit: file.ts | ✓ Read ×3
|
|
119
|
+
- "Agents status" - ◐ explore [haiku]: Finding code
|
|
120
|
+
- "Todo progress" - ▸ Fix bug (2/5 tasks)
|
|
121
|
+
- "Project name" - my-project path display
|
|
122
|
+
- "Git status" - git:(main*) branch indicator
|
|
123
|
+
- "Session name" - fix-auth-bug (session slug or custom title)
|
|
124
|
+
- "Usage bar style" - ██░░ 25% visual bar (only if usageBarEnabled is true)
|
|
125
|
+
|
|
126
|
+
If more than 4 items ON, show Activity items (Tools, Agents, Todos, Project, Git) first.
|
|
127
|
+
Info items (Counts, Tokens, Usage, Speed, Duration) can be turned off via "Reset to Minimal" in Q5.
|
|
128
|
+
|
|
129
|
+
### Q2: Turn On
|
|
130
|
+
- header: "Turn On"
|
|
131
|
+
- question: "What do you want to ENABLE? (currently disabled)"
|
|
132
|
+
- multiSelect: true
|
|
133
|
+
- options: **ONLY items currently OFF** (max 4)
|
|
134
|
+
- "Config counts" - 2 CLAUDE.md | 4 rules
|
|
135
|
+
- "Token breakdown" - (in: 45k, cache: 12k)
|
|
136
|
+
- "Output speed" - out: 42.1 tok/s
|
|
137
|
+
- "Usage limits" - 5h: 25% | 7d: 10%
|
|
138
|
+
- "Usage bar style" - ██░░ 25% visual bar (only if usageBarEnabled is false)
|
|
139
|
+
- "Session name" - fix-auth-bug (session slug or custom title)
|
|
140
|
+
- "Session duration" - ⏱️ 5m
|
|
141
|
+
- "Frameworks" — ⟳ AGW: pipeline (3/5) │ ⬡ Teams: fe✓ be◐
|
|
142
|
+
- "Burn rate" — 1.2k tok/m consumption rate
|
|
143
|
+
- "Alerts" — ⚠ Context 92% — ~8 calls
|
|
144
|
+
- "Activity indicator" — ◉ red/green status dot
|
|
145
|
+
- "Tree prefixes" — ├─ └─ hierarchical connectors
|
|
146
|
+
- "Merge tools+agents" — Combine on one line
|
|
147
|
+
|
|
148
|
+
### Q3: Git Style (only if Git is currently enabled)
|
|
149
|
+
- header: "Git Style"
|
|
150
|
+
- question: "How much git info to show?"
|
|
151
|
+
- multiSelect: false
|
|
152
|
+
- options:
|
|
153
|
+
- "Branch only" - git:(main)
|
|
154
|
+
- "Branch + dirty" - git:(main*) shows uncommitted changes
|
|
155
|
+
- "Full details" - git:(main* ↑2 ↓1) includes ahead/behind
|
|
156
|
+
- "File stats" - git:(main* !2 +1 ?3) Starship-compatible format
|
|
157
|
+
|
|
158
|
+
**Skip Q3 if Git is OFF** - proceed to Q4.
|
|
159
|
+
|
|
160
|
+
### Q4: Color Theme
|
|
161
|
+
- header: "Color Theme"
|
|
162
|
+
- question: "Apply a color theme?"
|
|
163
|
+
- multiSelect: false
|
|
164
|
+
- options:
|
|
165
|
+
- "Keep current" — No change
|
|
166
|
+
- "Default" — Green/Blue/Yellow/Red
|
|
167
|
+
- "Catppuccin Mocha" — Pastel dark theme
|
|
168
|
+
- "Dracula" — Purple-accented dark theme
|
|
169
|
+
- "Nord" — Cool blue-toned theme
|
|
170
|
+
|
|
171
|
+
### Q5: Layout/Reset
|
|
172
|
+
- header: "Layout/Reset"
|
|
173
|
+
- question: "Change layout or reset to preset?"
|
|
174
|
+
- multiSelect: false
|
|
175
|
+
- options:
|
|
176
|
+
- "Keep current" - No layout/preset changes (current: Expanded/Compact/Compact + Separators)
|
|
177
|
+
- "Switch to Expanded" - Split into semantic lines (if not current)
|
|
178
|
+
- "Switch to Compact" - Everything on one line (if not current)
|
|
179
|
+
- "Reset to Full" - Enable everything
|
|
180
|
+
- "Reset to Essential" - Activity + git only
|
|
181
|
+
|
|
182
|
+
### Q6: Custom Line (optional)
|
|
183
|
+
- header: "Custom Line"
|
|
184
|
+
- question: "Update your custom phrase? (currently: '{current customLine or none}')"
|
|
185
|
+
- multiSelect: false
|
|
186
|
+
- options:
|
|
187
|
+
- "Keep current" - No change (skip if no customLine set)
|
|
188
|
+
- "Enter custom text" - Set or update custom phrase (max 80 chars)
|
|
189
|
+
- "Remove" - Clear the custom line (only show if customLine is currently set)
|
|
190
|
+
|
|
191
|
+
If user chooses "Enter custom text", use AskUserQuestion to get their text. Save as `display.customLine` in config.
|
|
192
|
+
If user chooses "Remove", set `display.customLine` to `""` in config.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Preset Definitions
|
|
197
|
+
|
|
198
|
+
**Full** (everything ON):
|
|
199
|
+
- Activity: Tools ON, Agents ON, Todos ON
|
|
200
|
+
- Info: Counts ON, Tokens ON, Usage ON, Duration ON, Session Name ON
|
|
201
|
+
- Git: ON (with dirty indicator, no ahead/behind)
|
|
202
|
+
- New features: showFrameworks: true, showBurnRate: true, showAlerts: true, activityIndicator: true, treePrefixes: true, mergeToolsAgents: true
|
|
203
|
+
|
|
204
|
+
**Essential** (activity + git):
|
|
205
|
+
- Activity: Tools ON, Agents ON, Todos ON
|
|
206
|
+
- Info: Counts OFF, Tokens OFF, Usage OFF, Duration ON, Session Name OFF
|
|
207
|
+
- Git: ON (with dirty indicator)
|
|
208
|
+
- New features: showFrameworks: false, showBurnRate: false, showAlerts: true, activityIndicator: true, treePrefixes: true, mergeToolsAgents: true
|
|
209
|
+
|
|
210
|
+
**Minimal** (core only — this is the default):
|
|
211
|
+
- Activity: Tools OFF, Agents OFF, Todos OFF
|
|
212
|
+
- Info: Counts OFF, Tokens OFF, Usage OFF, Duration OFF, Session Name OFF
|
|
213
|
+
- Git: ON (with dirty indicator)
|
|
214
|
+
- New features: showFrameworks: false, showBurnRate: false, showAlerts: true, activityIndicator: true, treePrefixes: false, mergeToolsAgents: false
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Layout Mapping
|
|
219
|
+
|
|
220
|
+
| Option | Config |
|
|
221
|
+
|--------|--------|
|
|
222
|
+
| Expanded | `lineLayout: "expanded", showSeparators: false` |
|
|
223
|
+
| Compact | `lineLayout: "compact", showSeparators: false` |
|
|
224
|
+
| Compact + Separators | `lineLayout: "compact", showSeparators: true` |
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Git Style Mapping
|
|
229
|
+
|
|
230
|
+
| Option | Config |
|
|
231
|
+
|--------|--------|
|
|
232
|
+
| Branch only | `gitStatus: { enabled: true, showDirty: false, showAheadBehind: false, showFileStats: false }` |
|
|
233
|
+
| Branch + dirty | `gitStatus: { enabled: true, showDirty: true, showAheadBehind: false, showFileStats: false }` |
|
|
234
|
+
| Full details | `gitStatus: { enabled: true, showDirty: true, showAheadBehind: true, showFileStats: false }` |
|
|
235
|
+
| File stats | `gitStatus: { enabled: true, showDirty: true, showAheadBehind: false, showFileStats: true }` |
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Element Mapping
|
|
240
|
+
|
|
241
|
+
| Element | Config Key |
|
|
242
|
+
|---------|------------|
|
|
243
|
+
| Tools activity | `display.showTools` |
|
|
244
|
+
| Agents status | `display.showAgents` |
|
|
245
|
+
| Todo progress | `display.showTodos` |
|
|
246
|
+
| Project name | `display.showProject` |
|
|
247
|
+
| Git status | `gitStatus.enabled` |
|
|
248
|
+
| Config counts | `display.showConfigCounts` |
|
|
249
|
+
| Token breakdown | `display.showTokenBreakdown` |
|
|
250
|
+
| Output speed | `display.showSpeed` |
|
|
251
|
+
| Usage limits | `display.showUsage` |
|
|
252
|
+
| Usage bar style | `display.usageBarEnabled` |
|
|
253
|
+
| Session name | `display.showSessionName` |
|
|
254
|
+
| Session duration | `display.showDuration` |
|
|
255
|
+
| Custom line | `display.customLine` |
|
|
256
|
+
| Frameworks status | `display.showFrameworks` |
|
|
257
|
+
| Burn rate | `display.showBurnRate` |
|
|
258
|
+
| Alerts | `display.showAlerts` |
|
|
259
|
+
| Activity indicator | `display.activityIndicator` |
|
|
260
|
+
| Tree prefixes | `display.treePrefixes` |
|
|
261
|
+
| Merge tools+agents | `display.mergeToolsAgents` |
|
|
262
|
+
|
|
263
|
+
**Always true (not configurable):**
|
|
264
|
+
- `display.showModel: true`
|
|
265
|
+
- `display.showContextBar: true`
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Usage Style Mapping
|
|
270
|
+
|
|
271
|
+
| Option | Config |
|
|
272
|
+
|--------|--------|
|
|
273
|
+
| Bar style | `display.usageBarEnabled: true` — Shows `██░░ 25% (1h 30m / 5h)` |
|
|
274
|
+
| Text style | `display.usageBarEnabled: false` — Shows `5h: 25% (1h 30m)` |
|
|
275
|
+
|
|
276
|
+
**Note**: Usage style only applies when `display.showUsage: true`. When 7d usage >= 80%, it also shows with the same style.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Processing Logic
|
|
281
|
+
|
|
282
|
+
### For New Users (Flow A):
|
|
283
|
+
1. Apply chosen preset as base
|
|
284
|
+
2. Apply bar style selection
|
|
285
|
+
3. Apply Turn Off selections (set those items to OFF)
|
|
286
|
+
4. Apply Turn On selections (set those items to ON)
|
|
287
|
+
5. Apply chosen layout
|
|
288
|
+
|
|
289
|
+
### For Returning Users (Flow B):
|
|
290
|
+
1. Start from current config
|
|
291
|
+
2. Apply Turn Off selections (set to OFF, including usageBarEnabled if selected)
|
|
292
|
+
3. Apply Turn On selections (set to ON, including usageBarEnabled if selected)
|
|
293
|
+
4. Apply Git Style selection (if shown)
|
|
294
|
+
5. Apply Color Theme selection (if not "Keep current")
|
|
295
|
+
6. If "Reset to [preset]" selected, override with preset values
|
|
296
|
+
7. If layout change selected, apply it
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Before Writing - Validate & Preview
|
|
301
|
+
|
|
302
|
+
**GUARDS - Do NOT write config if:**
|
|
303
|
+
- User cancels (Esc) → say "Configuration cancelled."
|
|
304
|
+
- No changes from current config → say "No changes needed - config unchanged."
|
|
305
|
+
|
|
306
|
+
**Show preview before saving:**
|
|
307
|
+
|
|
308
|
+
1. **Summary of changes:**
|
|
309
|
+
```
|
|
310
|
+
Layout: Compact → Expanded
|
|
311
|
+
Git style: Branch + dirty
|
|
312
|
+
Changes:
|
|
313
|
+
- Usage limits: OFF → ON
|
|
314
|
+
- Config counts: ON → OFF
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
2. **Preview of HUD (Expanded layout):**
|
|
318
|
+
```
|
|
319
|
+
[Opus | Pro] │ my-project git:(main*)
|
|
320
|
+
Context ████░░░░░ 45% │ Usage ██░░░░░░░░ 25% (1h 30m / 5h)
|
|
321
|
+
◐ Edit: file.ts | ✓ Read ×3
|
|
322
|
+
▸ Fix auth bug (2/5)
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Preview (Expanded, Full preset):**
|
|
326
|
+
```
|
|
327
|
+
◉ [Opus 4.6 | Max] │ my-project git:(main*)
|
|
328
|
+
Context ▰▰▰▰▰▱▱▱▱▱ 45% │ 1.2k tok/m │ Usage ▰▰▱▱▱▱▱▱▱▱ 25% (resets in 1h 30m)
|
|
329
|
+
├─ ⟳ AGW: review-loop (3/5) │ ⬡ Teams: fe✓ be◐
|
|
330
|
+
├─ ◐ Edit: auth.ts │ ✓ Read ×3 │ ◐ explore [haiku] (2m)
|
|
331
|
+
└─ ▸ Fix auth bug (2/5) │ ▪▪▪▪▪
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Preview of HUD (Compact layout):**
|
|
335
|
+
```
|
|
336
|
+
[Opus | Pro] ████░░░░░ 45% | my-project git:(main*) | 5h: 25% | ⏱️ 5m
|
|
337
|
+
◐ Edit: file.ts | ✓ Read ×3
|
|
338
|
+
▸ Fix auth bug (2/5)
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
3. **Confirm**: "Save these changes?"
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Write Configuration
|
|
346
|
+
|
|
347
|
+
Write to `~/.claude/plugins/claude-hud/config.json`.
|
|
348
|
+
|
|
349
|
+
Merge with existing config, preserving:
|
|
350
|
+
- `pathLevels` (not in configure flow)
|
|
351
|
+
- `display.usageThreshold` (advanced config)
|
|
352
|
+
- `display.environmentThreshold` (advanced config)
|
|
353
|
+
- `colors` (advanced manual palette overrides)
|
|
354
|
+
|
|
355
|
+
**Migration note**: Old configs with `layout: "default"` or `layout: "separators"` are automatically migrated to the new `lineLayout` + `showSeparators` format on load.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## After Writing
|
|
360
|
+
|
|
361
|
+
Say: "Configuration saved! The HUD will reflect your changes immediately."
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Export or import Claude HUD configuration
|
|
3
|
+
allowed-tools: Bash, Read, Write, AskUserQuestion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Claude HUD Config Export/Import
|
|
7
|
+
|
|
8
|
+
## Step 1: Choose Action
|
|
9
|
+
|
|
10
|
+
Use AskUserQuestion:
|
|
11
|
+
- header: "Config Management"
|
|
12
|
+
- question: "What would you like to do?"
|
|
13
|
+
- options:
|
|
14
|
+
- "Export config" — Copy current config to clipboard or display
|
|
15
|
+
- "Import config" — Paste a config to apply
|
|
16
|
+
- "Reset to defaults" — Clear all custom config
|
|
17
|
+
|
|
18
|
+
## Export Flow
|
|
19
|
+
|
|
20
|
+
1. Read `~/.claude/plugins/claude-hud/config.json`
|
|
21
|
+
2. Display the JSON content
|
|
22
|
+
3. If `pbcopy` available (macOS), offer to copy to clipboard:
|
|
23
|
+
```bash
|
|
24
|
+
cat ~/.claude/plugins/claude-hud/config.json | pbcopy
|
|
25
|
+
```
|
|
26
|
+
4. Say "Config copied to clipboard!" or display it for manual copy
|
|
27
|
+
|
|
28
|
+
## Import Flow
|
|
29
|
+
|
|
30
|
+
1. Use AskUserQuestion to get the JSON string (free text input)
|
|
31
|
+
2. Validate it's valid JSON
|
|
32
|
+
3. Show preview of what will change
|
|
33
|
+
4. Confirm before writing
|
|
34
|
+
5. Write to `~/.claude/plugins/claude-hud/config.json`
|
|
35
|
+
|
|
36
|
+
## Reset Flow
|
|
37
|
+
|
|
38
|
+
1. Confirm: "This will remove all custom config. The HUD will use default settings. Continue?"
|
|
39
|
+
2. If confirmed, delete the config file:
|
|
40
|
+
```bash
|
|
41
|
+
rm ~/.claude/plugins/claude-hud/config.json
|
|
42
|
+
```
|
|
43
|
+
3. Say "Config reset to defaults. The HUD will use default settings."
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a diagnostic health check on Claude HUD
|
|
3
|
+
allowed-tools: Bash, Read, AskUserQuestion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Claude HUD Health Check
|
|
7
|
+
|
|
8
|
+
Run a comprehensive diagnostic to verify the HUD is working correctly.
|
|
9
|
+
|
|
10
|
+
## Step 1: Check Plugin Installation
|
|
11
|
+
|
|
12
|
+
Run:
|
|
13
|
+
```bash
|
|
14
|
+
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
15
|
+
echo "Plugin cache: $(ls -d "$CLAUDE_DIR/plugins/cache/claude-hud" 2>/dev/null && echo 'YES' || echo 'NO')"
|
|
16
|
+
echo "Config file: $(ls "$CLAUDE_DIR/plugins/claude-hud/config.json" 2>/dev/null && echo 'YES' || echo 'NO')"
|
|
17
|
+
echo "Cache dir: $(ls -d "$CLAUDE_DIR/plugins/claude-hud/.cache" 2>/dev/null && echo 'YES' || echo 'NO')"
|
|
18
|
+
echo "History file: $(ls "$CLAUDE_DIR/plugins/claude-hud/session-history.json" 2>/dev/null && echo 'YES' || echo 'NO')"
|
|
19
|
+
echo "Node: $(node --version 2>/dev/null || echo 'NOT FOUND')"
|
|
20
|
+
echo "Bun: $(bun --version 2>/dev/null || echo 'NOT FOUND')"
|
|
21
|
+
echo "Platform: $(uname -s)"
|
|
22
|
+
echo "Terminal: ${COLUMNS:-unknown} cols"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 2: Validate Config
|
|
26
|
+
|
|
27
|
+
Read `~/.claude/plugins/claude-hud/config.json` if it exists.
|
|
28
|
+
|
|
29
|
+
Check:
|
|
30
|
+
- Is it valid JSON?
|
|
31
|
+
- Are all field names recognized?
|
|
32
|
+
- Is the theme valid (default/catppuccin/dracula/nord)?
|
|
33
|
+
- Are threshold values in range (0-100)?
|
|
34
|
+
|
|
35
|
+
Report any issues found.
|
|
36
|
+
|
|
37
|
+
## Step 3: Check StatusLine Config
|
|
38
|
+
|
|
39
|
+
Read `~/.claude/settings.json` and check if `statusLine` is configured.
|
|
40
|
+
|
|
41
|
+
Report:
|
|
42
|
+
- statusLine type and command
|
|
43
|
+
- Whether the command path exists
|
|
44
|
+
|
|
45
|
+
## Step 4: Test HUD Output
|
|
46
|
+
|
|
47
|
+
Run the statusLine command with sample data:
|
|
48
|
+
```bash
|
|
49
|
+
echo '{"model":{"display_name":"Test"},"context_window":{"current_usage":{"input_tokens":50000},"context_window_size":200000}}' | <statusLine command> 2>/dev/null
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Check if output is non-empty.
|
|
53
|
+
|
|
54
|
+
## Step 5: Report
|
|
55
|
+
|
|
56
|
+
Present results using AskUserQuestion:
|
|
57
|
+
- header: "Health Check Results"
|
|
58
|
+
- question: Show all results with ✓/✘ indicators
|
|
59
|
+
- options: "Everything looks good!" / "I need help with an issue"
|
|
60
|
+
|
|
61
|
+
If user needs help, ask what's wrong and debug.
|