@owloops/claude-powerline 1.22.0 → 1.23.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.
@@ -0,0 +1,322 @@
1
+ ---
2
+ name: powerline
3
+ description: Claude Powerline statusline setup wizard
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - AskUserQuestion
10
+ - Glob
11
+ ---
12
+
13
+ # Claude Powerline Setup Wizard
14
+
15
+ You are running an interactive setup wizard to configure the claude-powerline statusline for Claude Code. Follow these steps in order, using AskUserQuestion for each decision point.
16
+
17
+ ## Important Notes
18
+
19
+ - Do not skip steps or combine questions.
20
+ - Always wait for the user's response before moving to the next step.
21
+ - Track the user's choices in variables throughout the wizard.
22
+ - The final config is written as JSON to `~/.claude/claude-powerline.json`.
23
+ - Do NOT use the Agent tool or Explore subagents. All information you need is in this document.
24
+ - Do NOT read source code from the claude-powerline package. Use only the instructions below.
25
+ - IMPORTANT: After running any Bash or Read tool, repeat the key output as text in your response. Some users have a collapsed UI mode where tool outputs require a click to expand. Always relay important results (like version numbers, previews, or file contents) in your text so the user can see them without expanding.
26
+
27
+ ## Step 1: Check Node.js
28
+
29
+ Run this command to check if Node.js 18+ is available:
30
+
31
+ ```bash
32
+ node --version 2>/dev/null || echo "not_installed"
33
+ ```
34
+
35
+ Tell the user the detected version in your text response.
36
+
37
+ ### If Node.js is NOT installed or version is below 18
38
+
39
+ Display:
40
+
41
+ ````markdown
42
+ Claude Powerline requires **Node.js 18+** to run.
43
+
44
+ Install it from https://nodejs.org or via your package manager:
45
+
46
+ ```bash
47
+ # macOS
48
+ brew install node
49
+
50
+ # Ubuntu/Debian
51
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
52
+ sudo apt-get install -y nodejs
53
+ ```
54
+ ````
55
+
56
+ Then ask:
57
+
58
+ - **Question**: "Install Node.js or check again?"
59
+ - **Header**: "Node.js"
60
+ - **Options**:
61
+ - "I installed it, check again" -> Re-run the version check from the top of Step 1
62
+ - "Exit wizard" -> Tell them to install Node.js 18+ and exit
63
+
64
+ ### If Node.js 18+ IS installed
65
+
66
+ Continue to the next step.
67
+
68
+ ## Step 2: Nerd Font Detection
69
+
70
+ > [!IMPORTANT]
71
+ > You cannot display nerd font glyphs properly in your text output.
72
+ > You MUST run the cat command below and let the terminal render it.
73
+ > After running it, tell the user to expand the bash output if they cannot see the icons.
74
+
75
+ ```bash
76
+ cat ${CLAUDE_PLUGIN_ROOT}/templates/nerd-fonts-sample.txt
77
+ ```
78
+
79
+ After running the command, tell the user: "Check the bash output above for Nerd Font icons (folder, code, branch, robot). You may need to click/expand the bash output to see them."
80
+
81
+ Then ask:
82
+
83
+ - **Question**: "Can you see the icons clearly (folder, code, branch, robot)?"
84
+ - **Header**: "Nerd Font"
85
+ - **Options**:
86
+ - "Yes, I can see them" -> Set `charset=unicode`. Continue to Step 3
87
+ - "No, I see boxes or blank spaces" -> Set `charset=text`. Continue to Step 3
88
+
89
+ ## Step 3: Theme Selection
90
+
91
+ Display the available themes and tell the user to type their choice:
92
+
93
+ ````markdown
94
+ **Available themes:**
95
+
96
+ 1. **dark** -- Dark background, high contrast (default)
97
+ 2. **light** -- Light background for light terminals
98
+ 3. **nord** -- Cool blue palette inspired by Arctic colors
99
+ 4. **tokyo-night** -- Modern dark theme with vibrant accents
100
+ 5. **rose-pine** -- Soft, muted palette with rose and pine tones
101
+ 6. **gruvbox** -- Warm retro colors with earthy tones
102
+ ````
103
+
104
+ Then ask:
105
+
106
+ - **Question**: "Which theme? Type a name or pick from the list."
107
+ - **Header**: "Theme"
108
+ - **Options**:
109
+ - "dark" -> Set `chosen_theme=dark`
110
+ - "light" -> Set `chosen_theme=light`
111
+ - "nord" -> Set `chosen_theme=nord`
112
+ - "tokyo-night" -> Set `chosen_theme=tokyo-night`
113
+
114
+ If the user types "rose-pine" or "gruvbox" (or any valid theme name) in the free text field, accept that as their choice. Valid themes: dark, light, nord, tokyo-night, rose-pine, gruvbox.
115
+
116
+ ## Step 4: Style Selection
117
+
118
+ Show a preview of all four styles using the bundled preview script.
119
+
120
+ > [!IMPORTANT]
121
+ > You cannot render ANSI escape codes or nerd font glyphs in your text output.
122
+ > You MUST run the preview command below and let the terminal display the result.
123
+ > Do NOT attempt to describe what the styles look like. Let the user see them.
124
+ > After running, tell the user to expand the bash output if they cannot see the previews.
125
+
126
+ ```bash
127
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-styles --theme=${chosen_theme} --charset=${charset}
128
+ ```
129
+
130
+ After running the command, tell the user: "The four style previews are in the bash output above. Expand it if needed."
131
+
132
+ Then ask:
133
+
134
+ - **Question**: "Which style do you prefer?"
135
+ - **Header**: "Style"
136
+ - **Options**:
137
+ - "minimal" -> Set `chosen_style=minimal`
138
+ - "powerline" -> Set `chosen_style=powerline`
139
+ - "capsule" -> Set `chosen_style=capsule`
140
+ - "tui" -> Set `chosen_style=tui`
141
+
142
+ If the user chose `charset=text`, add a note that powerline and capsule use text fallback separators.
143
+
144
+ **If the user chose "tui":** skip Steps 5 and 6. TUI mode is opinionated and always displays all data regardless of segment configuration. Tell the user: "TUI mode shows all available data automatically. Segment and bar style selection are not needed." Then continue to Step 7.
145
+
146
+ ## Step 5: Segment Selection
147
+
148
+ > [!NOTE]
149
+ > Skip this step if the user chose "tui" style.
150
+
151
+ Display the three presets:
152
+
153
+ ````markdown
154
+ **Choose a segment preset:**
155
+
156
+ 1. **Essential** -- Directory, git, model, context window
157
+ Clean and lightweight. Just the basics.
158
+
159
+ 2. **Standard** -- Essential + session cost, daily cost tracking
160
+ Adds cost visibility without clutter. Good default for most users.
161
+
162
+ 3. **Full** -- Standard + block usage, metrics, version, weekly usage
163
+ Everything on. For users who want maximum information density.
164
+ ````
165
+
166
+ Then ask:
167
+
168
+ - **Question**: "Which segment preset?"
169
+ - **Header**: "Segments"
170
+ - **Options**:
171
+ - "Essential" -> Set `chosen_preset=essential`
172
+ - "Standard" -> Set `chosen_preset=standard`
173
+ - "Full" -> Set `chosen_preset=full`
174
+
175
+ ### Preset to template mapping
176
+
177
+ Each preset has a corresponding template config file in `${CLAUDE_PLUGIN_ROOT}/templates/`:
178
+
179
+ - `essential` -> `config-essential.json`
180
+ - `standard` -> `config-standard.json`
181
+ - `full` -> `config-full.json`
182
+ - `tui` (style) -> `config-tui.json`
183
+
184
+ ## Step 6: Bar Display Style
185
+
186
+ > [!NOTE]
187
+ > Skip this step if the user chose "tui" style. Default to `text` if skipped.
188
+
189
+ Display the available bar styles for progress indicators (used by context, block, and weekly segments):
190
+
191
+ ````markdown
192
+ **Bar display styles** (for context window, block usage, and weekly usage):
193
+
194
+ 1. **text** -- Numbers only, no bar (default). Example: `65,000 (61%)`
195
+ 2. **bar** -- Classic bar. Example: `▓▓▓▓▓░░░░░ 50%`
196
+ 3. **blocks** -- Block fill. Example: `█████░░░░░ 50%`
197
+ 4. **dots** -- Dot fill. Example: `●●●●●○○○○○ 50%`
198
+ 5. **geometric** -- Geometric. Example: `▰▰▰▰▰▱▱▱▱▱ 50%`
199
+ 6. **line** -- Line style. Example: `━━━━━┄┄┄┄┄ 50%`
200
+ ````
201
+
202
+ Then ask:
203
+
204
+ - **Question**: "Which bar style for progress indicators?"
205
+ - **Header**: "Display Style"
206
+ - **Options**:
207
+ - "text" -> Set `chosen_bar_style=text`
208
+ - "bar" -> Set `chosen_bar_style=bar`
209
+ - "blocks" -> Set `chosen_bar_style=blocks`
210
+ - "dots" -> Set `chosen_bar_style=dots`
211
+
212
+ If the user types "geometric", "line", "filled", "squares", "capped", "ball", or "blocks-line" in the free text field, accept that as their choice. All valid display styles: text, ball, bar, blocks, blocks-line, capped, dots, filled, geometric, line, squares.
213
+
214
+ Apply `chosen_bar_style` to the `displayStyle` field of context, block, and weekly segments in the config.
215
+
216
+ ## Step 7: Budget
217
+
218
+ > [!NOTE]
219
+ > Skip this step if the user chose "Essential" preset or "tui" style. The essential template has no budget placeholder, and TUI uses defaults.
220
+
221
+ Ask the user about their daily budget for cost tracking:
222
+
223
+ - **Question**: "Set a daily spending budget? (used by the today segment for percentage warnings)"
224
+ - **Header**: "Budget"
225
+ - **Options**:
226
+ - "$25/day" -> Set `today_budget=25`
227
+ - "$50/day" -> Set `today_budget=50`
228
+ - "$100/day" -> Set `today_budget=100`
229
+ - "No budget" -> Set `today_budget=null` (omit amount from config)
230
+
231
+ ## Step 8: Write Configuration
232
+
233
+ ### Check for existing config
234
+
235
+ ```bash
236
+ test -f ~/.claude/claude-powerline.json && echo "exists" || echo "not_found"
237
+ ```
238
+
239
+ If it exists, ask:
240
+
241
+ - **Question**: "Found existing ~/.claude/claude-powerline.json. What should I do?"
242
+ - **Header**: "Existing Config"
243
+ - **Options**:
244
+ - "Replace it" -> Continue
245
+ - "Back it up first" -> Run `cp ~/.claude/claude-powerline.json ~/.claude/claude-powerline.json.bak` then continue
246
+ - "Keep it and exit" -> Exit the wizard
247
+
248
+ ### Build and write the config
249
+
250
+ 1. **Pick the template file.** If the user chose "tui" style, use `config-tui.json`. Otherwise use the preset template: `config-essential.json`, `config-standard.json`, or `config-full.json`.
251
+
252
+ 2. **Read the template** using the Read tool:
253
+
254
+ ```text
255
+ ${CLAUDE_PLUGIN_ROOT}/templates/<template-file>
256
+ ```
257
+
258
+ 1. **Replace placeholders** in the template content:
259
+
260
+ | Placeholder | Replace with |
261
+ |-------------|-------------|
262
+ | `replace:THEME` | The chosen theme (e.g., `tokyo-night`) |
263
+ | `replace:STYLE` | The chosen style (e.g., `capsule`). Not present in tui template. |
264
+ | `replace:CHARSET` | `unicode` or `text` |
265
+ | `replace:BAR_STYLE` | The chosen bar style (e.g., `blocks`). Default `text` if Step 6 was skipped. Not present in tui template. |
266
+ | `replace:TODAY_BUDGET` | The budget number (e.g., `50`). Not present in essential template. **Important:** replace `"replace:TODAY_BUDGET"` (including the surrounding quotes) with the bare number so the result is `"amount": 50` not `"amount": "50"`. |
267
+
268
+ 1. **Handle "No budget"**: If the user chose "No budget" in Step 7, remove the entire `"amount": "replace:TODAY_BUDGET",` line (including the trailing comma) from the budget section. If Step 7 was skipped (essential preset), do not modify the budget section.
269
+
270
+ 1. **Write the result** to `~/.claude/claude-powerline.json` using the Write tool. Do NOT read or merge with any existing config.
271
+
272
+ ## Step 9: Update settings.json
273
+
274
+ Read `~/.claude/settings.json` if it exists. Add or update ONLY the `statusLine` key:
275
+
276
+ ```json
277
+ {
278
+ "statusLine": {
279
+ "type": "command",
280
+ "command": "npx -y @owloops/claude-powerline@latest"
281
+ }
282
+ }
283
+ ```
284
+
285
+ If the file does not exist, create it with only the statusLine configuration.
286
+ If it exists, preserve ALL other settings (hooks, permissions, plugins, etc.) and only add or update the `statusLine` key.
287
+
288
+ Use the Read tool to load the existing file, merge the statusLine key, and Write to save it back.
289
+
290
+ ## Step 10: Test Installation
291
+
292
+ Run a test with sample data to verify the statusline renders:
293
+
294
+ > [!IMPORTANT]
295
+ > You MUST run this command and tell the user to check the output.
296
+
297
+ ```bash
298
+ ${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${chosen_theme} --style=${chosen_style} --charset=${charset}
299
+ ```
300
+
301
+ Tell the user: "Check the bash output above for your statusline preview. Expand it if needed."
302
+
303
+ If it produced output, tell the user the setup is working.
304
+
305
+ ## Step 11: Success Message
306
+
307
+ Display:
308
+
309
+ ````markdown
310
+ Setup complete.
311
+
312
+ **Files created/updated:**
313
+ - `~/.claude/claude-powerline.json` (powerline config)
314
+ - `~/.claude/settings.json` (claude settings)
315
+
316
+ **What now:**
317
+ 1. Restart Claude Code if the statusline does not appear.
318
+ 2. Run `/powerline` any time to reconfigure.
319
+ 3. Edit `~/.claude/claude-powerline.json` by hand for advanced options.
320
+
321
+ Documentation: https://github.com/Owloops/claude-powerline
322
+ ````
@@ -0,0 +1,36 @@
1
+ {
2
+ "theme": "replace:THEME",
3
+ "display": {
4
+ "style": "replace:STYLE",
5
+ "charset": "replace:CHARSET",
6
+ "colorCompatibility": "auto",
7
+ "autoWrap": true,
8
+ "padding": 1,
9
+ "lines": [
10
+ {
11
+ "segments": {
12
+ "directory": { "enabled": true, "style": "fish" },
13
+ "git": { "enabled": true },
14
+ "model": { "enabled": true }
15
+ }
16
+ },
17
+ {
18
+ "segments": {
19
+ "context": {
20
+ "enabled": true,
21
+ "showPercentageOnly": false,
22
+ "displayStyle": "replace:BAR_STYLE",
23
+ "autocompactBuffer": 33000
24
+ }
25
+ }
26
+ }
27
+ ]
28
+ },
29
+ "budget": {
30
+ "session": { "warningThreshold": 80 }
31
+ },
32
+ "modelContextLimits": {
33
+ "sonnet": 1000000,
34
+ "opus": 200000
35
+ }
36
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "theme": "replace:THEME",
3
+ "display": {
4
+ "style": "replace:STYLE",
5
+ "charset": "replace:CHARSET",
6
+ "colorCompatibility": "auto",
7
+ "autoWrap": true,
8
+ "padding": 1,
9
+ "lines": [
10
+ {
11
+ "segments": {
12
+ "directory": { "enabled": true, "style": "fish" },
13
+ "git": { "enabled": true },
14
+ "model": { "enabled": true },
15
+ "session": { "enabled": true, "type": "tokens", "costSource": "calculated" }
16
+ }
17
+ },
18
+ {
19
+ "segments": {
20
+ "today": { "enabled": true, "type": "cost" },
21
+ "block": { "enabled": true, "type": "cost", "burnType": "cost", "displayStyle": "replace:BAR_STYLE" },
22
+ "weekly": { "enabled": true, "displayStyle": "replace:BAR_STYLE" },
23
+ "context": {
24
+ "enabled": true,
25
+ "showPercentageOnly": false,
26
+ "displayStyle": "replace:BAR_STYLE",
27
+ "autocompactBuffer": 33000
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "segments": {
33
+ "metrics": {
34
+ "enabled": true,
35
+ "showResponseTime": false,
36
+ "showLastResponseTime": false,
37
+ "showDuration": true,
38
+ "showMessageCount": true,
39
+ "showLinesAdded": false,
40
+ "showLinesRemoved": false
41
+ },
42
+ "version": { "enabled": true }
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ "budget": {
48
+ "session": { "warningThreshold": 80 },
49
+ "today": { "amount": "replace:TODAY_BUDGET", "warningThreshold": 80 }
50
+ },
51
+ "modelContextLimits": {
52
+ "sonnet": 1000000,
53
+ "opus": 200000
54
+ }
55
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "theme": "replace:THEME",
3
+ "display": {
4
+ "style": "replace:STYLE",
5
+ "charset": "replace:CHARSET",
6
+ "colorCompatibility": "auto",
7
+ "autoWrap": true,
8
+ "padding": 1,
9
+ "lines": [
10
+ {
11
+ "segments": {
12
+ "directory": { "enabled": true, "style": "fish" },
13
+ "git": { "enabled": true },
14
+ "model": { "enabled": true },
15
+ "session": { "enabled": true, "type": "tokens", "costSource": "calculated" }
16
+ }
17
+ },
18
+ {
19
+ "segments": {
20
+ "today": { "enabled": true, "type": "cost" },
21
+ "context": {
22
+ "enabled": true,
23
+ "showPercentageOnly": false,
24
+ "displayStyle": "replace:BAR_STYLE",
25
+ "autocompactBuffer": 33000
26
+ }
27
+ }
28
+ }
29
+ ]
30
+ },
31
+ "budget": {
32
+ "session": { "warningThreshold": 80 },
33
+ "today": { "amount": "replace:TODAY_BUDGET", "warningThreshold": 80 }
34
+ },
35
+ "modelContextLimits": {
36
+ "sonnet": 1000000,
37
+ "opus": 200000
38
+ }
39
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "theme": "replace:THEME",
3
+ "display": {
4
+ "style": "tui",
5
+ "charset": "replace:CHARSET",
6
+ "colorCompatibility": "auto",
7
+ "autoWrap": true,
8
+ "padding": 0
9
+ },
10
+ "budget": {
11
+ "session": { "warningThreshold": 80 },
12
+ "today": { "amount": "replace:TODAY_BUDGET", "warningThreshold": 80 }
13
+ },
14
+ "modelContextLimits": {
15
+ "sonnet": 1000000,
16
+ "opus": 200000
17
+ }
18
+ }
@@ -0,0 +1,5 @@
1
+ Can you see these icons clearly?
2
+
3
+  folder  code  branch 󰚩 robot
4
+
5
+ If you see boxes or blank spaces instead of icons, choose "No" below.