@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.
Files changed (210) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +20 -0
  3. package/LICENSE +21 -0
  4. package/README.md +379 -0
  5. package/commands/configure.md +361 -0
  6. package/commands/export.md +43 -0
  7. package/commands/health.md +61 -0
  8. package/commands/setup.md +287 -0
  9. package/commands/theme.md +31 -0
  10. package/dist/alert.d.ts +31 -0
  11. package/dist/alert.d.ts.map +1 -0
  12. package/dist/alert.js +53 -0
  13. package/dist/alert.js.map +1 -0
  14. package/dist/burn-rate.d.ts +4 -0
  15. package/dist/burn-rate.d.ts.map +1 -0
  16. package/dist/burn-rate.js +36 -0
  17. package/dist/burn-rate.js.map +1 -0
  18. package/dist/cache.d.ts +6 -0
  19. package/dist/cache.d.ts.map +1 -0
  20. package/dist/cache.js +47 -0
  21. package/dist/cache.js.map +1 -0
  22. package/dist/claude-config-dir.d.ts +4 -0
  23. package/dist/claude-config-dir.d.ts.map +1 -0
  24. package/dist/claude-config-dir.js +24 -0
  25. package/dist/claude-config-dir.js.map +1 -0
  26. package/dist/config-io.d.ts +6 -0
  27. package/dist/config-io.d.ts.map +1 -0
  28. package/dist/config-io.js +27 -0
  29. package/dist/config-io.js.map +1 -0
  30. package/dist/config-reader.d.ts +8 -0
  31. package/dist/config-reader.d.ts.map +1 -0
  32. package/dist/config-reader.js +204 -0
  33. package/dist/config-reader.js.map +1 -0
  34. package/dist/config.d.ts +94 -0
  35. package/dist/config.d.ts.map +1 -0
  36. package/dist/config.js +358 -0
  37. package/dist/config.js.map +1 -0
  38. package/dist/constants.d.ts +11 -0
  39. package/dist/constants.d.ts.map +1 -0
  40. package/dist/constants.js +11 -0
  41. package/dist/constants.js.map +1 -0
  42. package/dist/cost-tracker.d.ts +9 -0
  43. package/dist/cost-tracker.d.ts.map +1 -0
  44. package/dist/cost-tracker.js +46 -0
  45. package/dist/cost-tracker.js.map +1 -0
  46. package/dist/debug.d.ts +6 -0
  47. package/dist/debug.d.ts.map +1 -0
  48. package/dist/debug.js +15 -0
  49. package/dist/debug.js.map +1 -0
  50. package/dist/extra-cmd.d.ts +20 -0
  51. package/dist/extra-cmd.d.ts.map +1 -0
  52. package/dist/extra-cmd.js +112 -0
  53. package/dist/extra-cmd.js.map +1 -0
  54. package/dist/git.d.ts +16 -0
  55. package/dist/git.d.ts.map +1 -0
  56. package/dist/git.js +94 -0
  57. package/dist/git.js.map +1 -0
  58. package/dist/health-check.d.ts +12 -0
  59. package/dist/health-check.d.ts.map +1 -0
  60. package/dist/health-check.js +37 -0
  61. package/dist/health-check.js.map +1 -0
  62. package/dist/index.d.ts +24 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +198 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/providers/agent-teams-provider.d.ts +10 -0
  67. package/dist/providers/agent-teams-provider.d.ts.map +1 -0
  68. package/dist/providers/agent-teams-provider.js +57 -0
  69. package/dist/providers/agent-teams-provider.js.map +1 -0
  70. package/dist/providers/agw-provider.d.ts +10 -0
  71. package/dist/providers/agw-provider.d.ts.map +1 -0
  72. package/dist/providers/agw-provider.js +49 -0
  73. package/dist/providers/agw-provider.js.map +1 -0
  74. package/dist/providers/index.d.ts +14 -0
  75. package/dist/providers/index.d.ts.map +1 -0
  76. package/dist/providers/index.js +25 -0
  77. package/dist/providers/index.js.map +1 -0
  78. package/dist/render/agents-line.d.ts +3 -0
  79. package/dist/render/agents-line.d.ts.map +1 -0
  80. package/dist/render/agents-line.js +40 -0
  81. package/dist/render/agents-line.js.map +1 -0
  82. package/dist/render/alert-line.d.ts +3 -0
  83. package/dist/render/alert-line.d.ts.map +1 -0
  84. package/dist/render/alert-line.js +11 -0
  85. package/dist/render/alert-line.js.map +1 -0
  86. package/dist/render/colors.d.ts +39 -0
  87. package/dist/render/colors.d.ts.map +1 -0
  88. package/dist/render/colors.js +109 -0
  89. package/dist/render/colors.js.map +1 -0
  90. package/dist/render/framework-line.d.ts +3 -0
  91. package/dist/render/framework-line.d.ts.map +1 -0
  92. package/dist/render/framework-line.js +32 -0
  93. package/dist/render/framework-line.js.map +1 -0
  94. package/dist/render/index.d.ts +3 -0
  95. package/dist/render/index.d.ts.map +1 -0
  96. package/dist/render/index.js +435 -0
  97. package/dist/render/index.js.map +1 -0
  98. package/dist/render/lines/environment.d.ts +3 -0
  99. package/dist/render/lines/environment.d.ts.map +1 -0
  100. package/dist/render/lines/environment.js +30 -0
  101. package/dist/render/lines/environment.js.map +1 -0
  102. package/dist/render/lines/identity.d.ts +3 -0
  103. package/dist/render/lines/identity.d.ts.map +1 -0
  104. package/dist/render/lines/identity.js +93 -0
  105. package/dist/render/lines/identity.js.map +1 -0
  106. package/dist/render/lines/index.d.ts +5 -0
  107. package/dist/render/lines/index.d.ts.map +1 -0
  108. package/dist/render/lines/index.js +5 -0
  109. package/dist/render/lines/index.js.map +1 -0
  110. package/dist/render/lines/project.d.ts +3 -0
  111. package/dist/render/lines/project.d.ts.map +1 -0
  112. package/dist/render/lines/project.js +100 -0
  113. package/dist/render/lines/project.js.map +1 -0
  114. package/dist/render/lines/usage.d.ts +3 -0
  115. package/dist/render/lines/usage.d.ts.map +1 -0
  116. package/dist/render/lines/usage.js +65 -0
  117. package/dist/render/lines/usage.js.map +1 -0
  118. package/dist/render/session-line.d.ts +7 -0
  119. package/dist/render/session-line.d.ts.map +1 -0
  120. package/dist/render/session-line.js +227 -0
  121. package/dist/render/session-line.js.map +1 -0
  122. package/dist/render/todos-line.d.ts +3 -0
  123. package/dist/render/todos-line.d.ts.map +1 -0
  124. package/dist/render/todos-line.js +29 -0
  125. package/dist/render/todos-line.js.map +1 -0
  126. package/dist/render/tools-line.d.ts +3 -0
  127. package/dist/render/tools-line.d.ts.map +1 -0
  128. package/dist/render/tools-line.js +45 -0
  129. package/dist/render/tools-line.js.map +1 -0
  130. package/dist/session-history.d.ts +15 -0
  131. package/dist/session-history.d.ts.map +1 -0
  132. package/dist/session-history.js +46 -0
  133. package/dist/session-history.js.map +1 -0
  134. package/dist/session-stats.d.ts +11 -0
  135. package/dist/session-stats.d.ts.map +1 -0
  136. package/dist/session-stats.js +48 -0
  137. package/dist/session-stats.js.map +1 -0
  138. package/dist/speed-tracker.d.ts +7 -0
  139. package/dist/speed-tracker.d.ts.map +1 -0
  140. package/dist/speed-tracker.js +34 -0
  141. package/dist/speed-tracker.js.map +1 -0
  142. package/dist/stdin.d.ts +9 -0
  143. package/dist/stdin.d.ts.map +1 -0
  144. package/dist/stdin.js +142 -0
  145. package/dist/stdin.js.map +1 -0
  146. package/dist/themes.d.ts +10 -0
  147. package/dist/themes.d.ts.map +1 -0
  148. package/dist/themes.js +81 -0
  149. package/dist/themes.js.map +1 -0
  150. package/dist/transcript.d.ts +3 -0
  151. package/dist/transcript.d.ts.map +1 -0
  152. package/dist/transcript.js +221 -0
  153. package/dist/transcript.js.map +1 -0
  154. package/dist/types.d.ts +124 -0
  155. package/dist/types.d.ts.map +1 -0
  156. package/dist/types.js +5 -0
  157. package/dist/types.js.map +1 -0
  158. package/dist/usage-api.d.ts +62 -0
  159. package/dist/usage-api.d.ts.map +1 -0
  160. package/dist/usage-api.js +908 -0
  161. package/dist/usage-api.js.map +1 -0
  162. package/dist/utils/format.d.ts +9 -0
  163. package/dist/utils/format.d.ts.map +1 -0
  164. package/dist/utils/format.js +75 -0
  165. package/dist/utils/format.js.map +1 -0
  166. package/dist/utils/terminal.d.ts +5 -0
  167. package/dist/utils/terminal.d.ts.map +1 -0
  168. package/dist/utils/terminal.js +42 -0
  169. package/dist/utils/terminal.js.map +1 -0
  170. package/package.json +36 -0
  171. package/src/alert.ts +75 -0
  172. package/src/burn-rate.ts +45 -0
  173. package/src/cache.ts +57 -0
  174. package/src/claude-config-dir.ts +27 -0
  175. package/src/config-io.ts +26 -0
  176. package/src/config-reader.ts +236 -0
  177. package/src/config.ts +496 -0
  178. package/src/constants.ts +10 -0
  179. package/src/cost-tracker.ts +53 -0
  180. package/src/debug.ts +16 -0
  181. package/src/extra-cmd.ts +125 -0
  182. package/src/git.ts +126 -0
  183. package/src/health-check.ts +50 -0
  184. package/src/index.ts +234 -0
  185. package/src/providers/agent-teams-provider.ts +56 -0
  186. package/src/providers/agw-provider.ts +47 -0
  187. package/src/providers/index.ts +27 -0
  188. package/src/render/agents-line.ts +51 -0
  189. package/src/render/alert-line.ts +11 -0
  190. package/src/render/colors.ts +145 -0
  191. package/src/render/framework-line.ts +34 -0
  192. package/src/render/index.ts +512 -0
  193. package/src/render/lines/environment.ts +41 -0
  194. package/src/render/lines/identity.ts +109 -0
  195. package/src/render/lines/index.ts +4 -0
  196. package/src/render/lines/project.ts +113 -0
  197. package/src/render/lines/usage.ts +79 -0
  198. package/src/render/session-line.ts +253 -0
  199. package/src/render/todos-line.ts +35 -0
  200. package/src/render/tools-line.ts +58 -0
  201. package/src/session-history.ts +62 -0
  202. package/src/session-stats.ts +65 -0
  203. package/src/speed-tracker.ts +51 -0
  204. package/src/stdin.ts +169 -0
  205. package/src/themes.ts +90 -0
  206. package/src/transcript.ts +268 -0
  207. package/src/types.ts +146 -0
  208. package/src/usage-api.ts +1090 -0
  209. package/src/utils/format.ts +79 -0
  210. 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.