@promptctl/cc-candybar 1.56.1 → 1.56.2
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/dist/index.mjs +1 -1
- package/package.json +5 -5
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/bin/preview.sh +118 -255
- package/plugin/commands/candybar.md +112 -246
- package/plugin/templates/config.json +8 -0
- package/plugin/templates/nerd-fonts-sample.txt +5 -3
- package/plugin/templates/config-essential.json +0 -36
- package/plugin/templates/config-full.json +0 -55
- package/plugin/templates/config-standard.json +0 -39
- package/plugin/templates/config-tui-compact.json +0 -48
- package/plugin/templates/config-tui-full.json +0 -89
- package/plugin/templates/config-tui-standard.json +0 -56
- package/plugin/templates/config-tui.json +0 -18
|
@@ -12,34 +12,34 @@ allowed-tools:
|
|
|
12
12
|
|
|
13
13
|
# CC Candybar Setup Wizard
|
|
14
14
|
|
|
15
|
-
You are running an interactive setup wizard to configure the cc-candybar statusline for Claude Code. Follow
|
|
15
|
+
You are running an interactive setup wizard to configure the cc-candybar statusline for Claude Code. Follow the steps in order, using AskUserQuestion at each decision point.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Operating rules
|
|
18
18
|
|
|
19
|
-
- Do not skip
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
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.
|
|
19
|
+
- One question per step. Wait for the user's answer before moving on. Do not skip or combine steps.
|
|
20
|
+
- Track the user's choices as four variables: `charset`, `theme`, `style`, `preset`. Every later command and the final config are built from exactly those four.
|
|
21
|
+
- Do NOT use the Agent tool or Explore subagents. Everything you need is in this document.
|
|
22
|
+
- Do NOT read source code from the cc-candybar package. Run only the subcommands this document names (`install`, `check`) and the plugin's preview script against it.
|
|
23
|
+
- 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 need a click to expand. Relay versions, option names, file paths, and command results in your text so the user sees them without expanding.
|
|
24
|
+
- Two things this wizard never does, however natural they feel in the moment: it never edits `~/.claude/settings.json` by hand (Step 9's installer writes that entry), and it never carries its own list of theme names (Step 3's preview output is the list).
|
|
26
25
|
|
|
27
26
|
## Step 1: Check Node.js
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
The runtime needs Node.js **20.19 or later within the 20.x line, or 22.12 or later**. Run:
|
|
30
29
|
|
|
31
30
|
```bash
|
|
32
31
|
node --version 2>/dev/null || echo "not_installed"
|
|
32
|
+
node -e 'const [a,b]=process.versions.node.split(".").map(Number);process.exit((a===20&&b>=19)||(a>=22&&(a>22||b>=12))?0:1)' 2>/dev/null && echo "version_ok" || echo "version_too_old_or_missing"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Tell the user the detected version in your text
|
|
35
|
+
Tell the user the detected version in your text.
|
|
36
36
|
|
|
37
|
-
### If
|
|
37
|
+
### If the second line printed `version_too_old_or_missing`
|
|
38
38
|
|
|
39
39
|
Display:
|
|
40
40
|
|
|
41
41
|
````markdown
|
|
42
|
-
CC Candybar requires **Node.js
|
|
42
|
+
CC Candybar requires **Node.js 20.19+ (20.x line) or 22.12+**.
|
|
43
43
|
|
|
44
44
|
Install it from https://nodejs.org or via your package manager:
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ Install it from https://nodejs.org or via your package manager:
|
|
|
47
47
|
# macOS
|
|
48
48
|
brew install node
|
|
49
49
|
|
|
50
|
-
# Ubuntu/Debian
|
|
50
|
+
# Ubuntu/Debian (NodeSource)
|
|
51
51
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
52
52
|
sudo apt-get install -y nodejs
|
|
53
53
|
```
|
|
@@ -58,346 +58,212 @@ Then ask:
|
|
|
58
58
|
- **Question**: "Install Node.js or check again?"
|
|
59
59
|
- **Header**: "Node.js"
|
|
60
60
|
- **Options**:
|
|
61
|
-
- "I installed it, check again" -> Re-run
|
|
62
|
-
- "Exit wizard" -> Tell them to install Node.js
|
|
61
|
+
- "I installed it, check again" -> Re-run Step 1 from the top
|
|
62
|
+
- "Exit wizard" -> Tell them to install a supported Node.js and rerun `/candybar`, then stop
|
|
63
63
|
|
|
64
|
-
### If
|
|
64
|
+
### If it printed `version_ok`
|
|
65
65
|
|
|
66
|
-
Continue to
|
|
66
|
+
Continue to Step 2.
|
|
67
67
|
|
|
68
68
|
## Step 2: Nerd Font Detection
|
|
69
69
|
|
|
70
70
|
> [!IMPORTANT]
|
|
71
|
-
> You cannot display nerd font glyphs
|
|
71
|
+
> You cannot display nerd font glyphs in your text output.
|
|
72
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
|
|
73
|
+
> After running it, tell the user to expand the bash output if they cannot see the glyphs.
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
cat ${CLAUDE_PLUGIN_ROOT}/templates/nerd-fonts-sample.txt
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
Tell the user: "Check the bash output above. The powerline line should show arrow-shaped joiners between the words and the capsule line should show half-circle caps around them. You may need to click/expand the bash output to see them."
|
|
80
80
|
|
|
81
81
|
Then ask:
|
|
82
82
|
|
|
83
|
-
- **Question**: "
|
|
83
|
+
- **Question**: "Do the powerline arrows and capsule half-circles render as shapes?"
|
|
84
84
|
- **Header**: "Nerd Font"
|
|
85
85
|
- **Options**:
|
|
86
|
-
- "Yes, I
|
|
87
|
-
- "No, I see boxes or
|
|
86
|
+
- "Yes, I see arrows and half-circles" -> Set `charset=unicode`
|
|
87
|
+
- "No, I see boxes, blanks, or question marks" -> Set `charset=ascii`
|
|
88
88
|
|
|
89
|
-
## Step 3: Theme
|
|
90
|
-
|
|
91
|
-
Show a preview of all six themes using the bundled preview script.
|
|
89
|
+
## Step 3: Theme
|
|
92
90
|
|
|
93
91
|
> [!IMPORTANT]
|
|
94
92
|
> You cannot render ANSI escape codes in your text output.
|
|
95
93
|
> You MUST run the preview command below and let the terminal display the result.
|
|
94
|
+
> Do NOT describe what the themes look like. Let the user see them.
|
|
96
95
|
> After running, tell the user to expand the bash output if they cannot see the previews.
|
|
97
96
|
|
|
98
97
|
```bash
|
|
99
98
|
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-themes --charset=${charset}
|
|
100
99
|
```
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
````markdown
|
|
105
|
-
**Available themes:**
|
|
106
|
-
|
|
107
|
-
1. **dark** -- Dark background, high contrast (default)
|
|
108
|
-
2. **light** -- Light background for light terminals
|
|
109
|
-
3. **nord** -- Cool blue palette inspired by Arctic colors
|
|
110
|
-
4. **tokyo-night** -- Modern dark theme with vibrant accents
|
|
111
|
-
5. **rose-pine** -- Soft, muted palette with rose and pine tones
|
|
112
|
-
6. **gruvbox** -- Warm retro colors with earthy tones
|
|
113
|
-
````
|
|
101
|
+
The output is one block per theme: a label line of the theme's name followed by a colon, then that theme's rendered bar. That label list is the theme list; there is no other. List the labeled names in your text (names only, in the order printed) and tell the user the previews are in the bash output above.
|
|
114
102
|
|
|
115
103
|
Then ask:
|
|
116
104
|
|
|
117
|
-
- **Question**: "Which theme?
|
|
105
|
+
- **Question**: "Which theme? Pick one or type any name from the preview."
|
|
118
106
|
- **Header**: "Theme"
|
|
119
|
-
- **Options**:
|
|
120
|
-
- "dark" -> Set `chosen_theme=dark`
|
|
121
|
-
- "light" -> Set `chosen_theme=light`
|
|
122
|
-
- "nord" -> Set `chosen_theme=nord`
|
|
123
|
-
- "tokyo-night" -> Set `chosen_theme=tokyo-night`
|
|
107
|
+
- **Options**: the first four labeled names from the preview output, each -> Set `theme=<that name>`
|
|
124
108
|
|
|
125
|
-
If the user types
|
|
109
|
+
If the user types a name in the free text field, accept it only if the preview labeled it; otherwise show the labeled names again and re-ask. Set `theme`.
|
|
126
110
|
|
|
127
|
-
## Step 4: Style
|
|
128
|
-
|
|
129
|
-
Show a preview of all four styles using the bundled preview script.
|
|
111
|
+
## Step 4: Style
|
|
130
112
|
|
|
131
113
|
> [!IMPORTANT]
|
|
132
114
|
> You cannot render ANSI escape codes or nerd font glyphs in your text output.
|
|
133
115
|
> You MUST run the preview command below and let the terminal display the result.
|
|
134
|
-
> Do NOT
|
|
116
|
+
> Do NOT describe what the styles look like. Let the user see them.
|
|
135
117
|
> After running, tell the user to expand the bash output if they cannot see the previews.
|
|
136
118
|
|
|
137
119
|
```bash
|
|
138
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-styles --theme=${
|
|
120
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-styles --theme=${theme} --charset=${charset}
|
|
139
121
|
```
|
|
140
122
|
|
|
141
|
-
|
|
123
|
+
Tell the user: "The three style previews are in the bash output above, each under its name. Expand it if needed."
|
|
142
124
|
|
|
143
125
|
Then ask:
|
|
144
126
|
|
|
145
|
-
- **Question**: "Which style
|
|
127
|
+
- **Question**: "Which style?"
|
|
146
128
|
- **Header**: "Style"
|
|
147
129
|
- **Options**:
|
|
148
|
-
- "
|
|
149
|
-
- "
|
|
150
|
-
- "
|
|
151
|
-
- "tui" -> Set `chosen_style=tui`
|
|
152
|
-
|
|
153
|
-
If the user chose `charset=text`, add a note that powerline and capsule use text fallback separators.
|
|
154
|
-
|
|
155
|
-
**If the user chose "tui":** skip Steps 5 and 6 and continue to Step 4b for TUI layout selection.
|
|
156
|
-
|
|
157
|
-
## Step 4b: TUI Layout Selection
|
|
130
|
+
- "powerline" -> Set `style=powerline`
|
|
131
|
+
- "capsule" -> Set `style=capsule`
|
|
132
|
+
- "plain" -> Set `style=plain`
|
|
158
133
|
|
|
159
|
-
|
|
160
|
-
> This step only applies if the user chose "tui" style in Step 4. Otherwise skip to Step 5.
|
|
134
|
+
## Step 5: Preset
|
|
161
135
|
|
|
162
|
-
|
|
136
|
+
The preset is the bar's arrangement: which segments, on how many rows.
|
|
163
137
|
|
|
164
138
|
> [!IMPORTANT]
|
|
139
|
+
> You cannot render ANSI escape codes or nerd font glyphs in your text output.
|
|
165
140
|
> You MUST run the preview command below and let the terminal display the result.
|
|
141
|
+
> Do NOT describe what the presets look like. Let the user see them.
|
|
166
142
|
> After running, tell the user to expand the bash output if they cannot see the previews.
|
|
167
143
|
|
|
168
144
|
```bash
|
|
169
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-
|
|
145
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --compare-presets --theme=${theme} --style=${style} --charset=${charset}
|
|
170
146
|
```
|
|
171
147
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Display the three TUI layout presets:
|
|
175
|
-
|
|
176
|
-
````markdown
|
|
177
|
-
**Choose a TUI layout:**
|
|
178
|
-
|
|
179
|
-
1. **Compact** — Git + context window only
|
|
180
|
-
Minimal footprint. Model name in the title bar. Clean and focused.
|
|
181
|
-
|
|
182
|
-
2. **Standard** — Git + context + block usage with progress bars
|
|
183
|
-
Model and directory in the title bar. Good default for most users.
|
|
184
|
-
|
|
185
|
-
3. **Full** — Git, context, block, session, and daily cost
|
|
186
|
-
Title bar with model and directory. Footer with weekly usage and response time.
|
|
187
|
-
Maximum information density.
|
|
188
|
-
````
|
|
189
|
-
|
|
190
|
-
Then ask:
|
|
191
|
-
|
|
192
|
-
- **Question**: "Which TUI layout?"
|
|
193
|
-
- **Header**: "TUI Layout"
|
|
194
|
-
- **Options**:
|
|
195
|
-
- "Compact" -> Set `chosen_tui_layout=compact`
|
|
196
|
-
- "Standard" -> Set `chosen_tui_layout=standard`
|
|
197
|
-
- "Full" -> Set `chosen_tui_layout=full`
|
|
198
|
-
|
|
199
|
-
After selection, skip Steps 5 and 6 (always skipped for TUI). If "Compact" or "Standard", also skip Step 7 (no budget needed). If "Full", continue to Step 7.
|
|
200
|
-
|
|
201
|
-
### TUI preset to template mapping
|
|
202
|
-
|
|
203
|
-
- `compact` -> `config-tui-compact.json`
|
|
204
|
-
- `standard` -> `config-tui-standard.json`
|
|
205
|
-
- `full` -> `config-tui-full.json`
|
|
206
|
-
|
|
207
|
-
## Step 5: Segment Selection
|
|
208
|
-
|
|
209
|
-
> [!NOTE]
|
|
210
|
-
> Skip this step if the user chose "tui" style.
|
|
211
|
-
|
|
212
|
-
Display the three presets:
|
|
148
|
+
Tell the user the previews are in the bash output above, then display:
|
|
213
149
|
|
|
214
150
|
````markdown
|
|
215
|
-
**
|
|
216
|
-
|
|
217
|
-
1. **Essential** -- Directory, git, model, context window
|
|
218
|
-
Clean and lightweight. Just the basics.
|
|
219
|
-
|
|
220
|
-
2. **Standard** -- Essential + session cost, daily cost tracking
|
|
221
|
-
Adds cost visibility without clutter. Good default for most users.
|
|
222
|
-
|
|
223
|
-
3. **Full** -- Standard + block usage, metrics, version, weekly usage
|
|
224
|
-
Everything on. For users who want maximum information density.
|
|
225
|
-
````
|
|
226
|
-
|
|
227
|
-
Then ask:
|
|
228
|
-
|
|
229
|
-
- **Question**: "Which segment preset?"
|
|
230
|
-
- **Header**: "Segments"
|
|
231
|
-
- **Options**:
|
|
232
|
-
- "Essential" -> Set `chosen_preset=essential`
|
|
233
|
-
- "Standard" -> Set `chosen_preset=standard`
|
|
234
|
-
- "Full" -> Set `chosen_preset=full`
|
|
235
|
-
|
|
236
|
-
### Preset to template mapping
|
|
237
|
-
|
|
238
|
-
Each preset has a corresponding template config file in `${CLAUDE_PLUGIN_ROOT}/templates/`:
|
|
239
|
-
|
|
240
|
-
- `essential` -> `config-essential.json`
|
|
241
|
-
- `standard` -> `config-standard.json`
|
|
242
|
-
- `full` -> `config-full.json`
|
|
243
|
-
|
|
244
|
-
For TUI templates, see Step 4b.
|
|
151
|
+
**Presets:**
|
|
245
152
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
> Skip this step if the user chose "tui" style. Default to `text` if skipped.
|
|
250
|
-
|
|
251
|
-
Display the available bar styles for progress indicators (used by context, block, and weekly segments):
|
|
252
|
-
|
|
253
|
-
````markdown
|
|
254
|
-
**Bar display styles** (for context window, block usage, and weekly usage):
|
|
255
|
-
|
|
256
|
-
1. **text** -- Numbers only, no bar (default). Example: `65,000 (61%)`
|
|
257
|
-
2. **bar** -- Classic bar. Example: `▓▓▓▓▓░░░░░ 50%`
|
|
258
|
-
3. **blocks** -- Block fill. Example: `█████░░░░░ 50%`
|
|
259
|
-
4. **dots** -- Dot fill. Example: `●●●●●○○○○○ 50%`
|
|
260
|
-
5. **geometric** -- Geometric. Example: `▰▰▰▰▰▱▱▱▱▱ 50%`
|
|
261
|
-
6. **line** -- Line style. Example: `━━━━━┄┄┄┄┄ 50%`
|
|
153
|
+
1. **default** -- Two rows: an identity row (directory, git, toolbar) over a status row (model, context window, cache timer, 5-hour block usage, weekly usage). Good default.
|
|
154
|
+
2. **compact** -- One row (directory, git, context window) with no cell padding. For narrow terminals and split panes.
|
|
155
|
+
3. **verbose** -- The default's two rows plus pull-request, burn-rate, token-speed and token-sparkline segments. Maximum information.
|
|
262
156
|
````
|
|
263
157
|
|
|
264
158
|
Then ask:
|
|
265
159
|
|
|
266
|
-
- **Question**: "Which
|
|
267
|
-
- **Header**: "
|
|
160
|
+
- **Question**: "Which preset?"
|
|
161
|
+
- **Header**: "Preset"
|
|
268
162
|
- **Options**:
|
|
269
|
-
- "
|
|
270
|
-
- "
|
|
271
|
-
- "
|
|
272
|
-
- "dots" -> Set `chosen_bar_style=dots`
|
|
163
|
+
- "default" -> Set `preset=default`
|
|
164
|
+
- "compact" -> Set `preset=compact`
|
|
165
|
+
- "verbose" -> Set `preset=verbose`
|
|
273
166
|
|
|
274
|
-
|
|
167
|
+
## Step 6: Existing config
|
|
275
168
|
|
|
276
|
-
|
|
169
|
+
The config file is `~/.config/cc-candybar/config.json5`. A `config.json` beside it at the same location is a collision the bar warns about, so check for both:
|
|
277
170
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
171
|
+
```bash
|
|
172
|
+
test -f ~/.config/cc-candybar/config.json5 && echo "json5_exists" || echo "json5_not_found"
|
|
173
|
+
test -f ~/.config/cc-candybar/config.json && echo "json_exists" || echo "json_not_found"
|
|
174
|
+
```
|
|
282
175
|
|
|
283
|
-
|
|
176
|
+
If neither exists, continue to Step 7. If either exists, name the file(s) found and ask:
|
|
284
177
|
|
|
285
|
-
- **Question**: "
|
|
286
|
-
- **Header**: "
|
|
178
|
+
- **Question**: "Found an existing cc-candybar config. What should I do?"
|
|
179
|
+
- **Header**: "Existing Config"
|
|
287
180
|
- **Options**:
|
|
288
|
-
- "
|
|
289
|
-
- "
|
|
290
|
-
- "
|
|
291
|
-
- "No budget" -> Set `today_budget=null` (omit amount from config)
|
|
181
|
+
- "Replace it" -> If `config.json` exists, run `mv ~/.config/cc-candybar/config.json ~/.config/cc-candybar/config.json.bak.${stamp}` so the bar does not warn about the two files colliding. Continue to Step 7 (which overwrites `config.json5`).
|
|
182
|
+
- "Back it up first" -> Run `cp ~/.config/cc-candybar/config.json5 ~/.config/cc-candybar/config.json5.bak.${stamp}` if `config.json5` exists. Then proceed exactly as "Replace it".
|
|
183
|
+
- "Keep it and exit" -> Tell the user nothing was changed and stop.
|
|
292
184
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
### Check for existing config
|
|
185
|
+
Every backup name carries `${stamp}`, so a later wizard run never overwrites an earlier backup. Compute it as the first line of the same Bash call as the `cp`/`mv` (shell variables do not survive between calls), and name the backup path(s) in your text afterwards:
|
|
296
186
|
|
|
297
187
|
```bash
|
|
298
|
-
|
|
188
|
+
stamp=$(date -u +%Y%m%dT%H%M%SZ)
|
|
299
189
|
```
|
|
300
190
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
- **Question**: "Found existing ~/.config/cc-candybar/config.json. What should I do?"
|
|
304
|
-
- **Header**: "Existing Config"
|
|
305
|
-
- **Options**:
|
|
306
|
-
- "Replace it" -> Continue
|
|
307
|
-
- "Back it up first" -> Run `cp ~/.config/cc-candybar/config.json ~/.config/cc-candybar/config.json.bak` then continue
|
|
308
|
-
- "Keep it and exit" -> Exit the wizard
|
|
191
|
+
## Step 7: Write the config
|
|
309
192
|
|
|
310
|
-
|
|
193
|
+
1. Read the template with the Read tool:
|
|
311
194
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
195
|
+
```text
|
|
196
|
+
${CLAUDE_PLUGIN_ROOT}/templates/config.json
|
|
197
|
+
```
|
|
315
198
|
|
|
316
|
-
2.
|
|
199
|
+
2. Replace the four placeholders in the template content:
|
|
317
200
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
201
|
+
| Placeholder | Replace with |
|
|
202
|
+
|-------------|--------------|
|
|
203
|
+
| `replace:THEME` | `theme` (the name chosen in Step 3) |
|
|
204
|
+
| `replace:STYLE` | `style` (`powerline`, `capsule`, or `plain`) |
|
|
205
|
+
| `replace:CHARSET` | `charset` (`unicode` or `ascii`) |
|
|
206
|
+
| `replace:PRESET` | `preset` (`default`, `compact`, or `verbose`) |
|
|
321
207
|
|
|
322
|
-
|
|
208
|
+
3. Write the result to `~/.config/cc-candybar/config.json5` with the Write tool (create the directory if needed). Do NOT read or merge with any existing config; the file is replaced whole.
|
|
323
209
|
|
|
324
|
-
|
|
325
|
-
|-------------|-------------|
|
|
326
|
-
| `replace:THEME` | The chosen theme (e.g., `tokyo-night`) |
|
|
327
|
-
| `replace:STYLE` | The chosen style (e.g., `capsule`). Not present in TUI templates. |
|
|
328
|
-
| `replace:CHARSET` | `unicode` or `text` |
|
|
329
|
-
| `replace:BAR_STYLE` | The chosen bar style (e.g., `blocks`). Default `text` if Step 6 was skipped. Not present in TUI templates. |
|
|
330
|
-
| `replace:TODAY_BUDGET` | The budget number (e.g., `50`). Only present in non-TUI standard/full and TUI full templates. **Important:** replace `"replace:TODAY_BUDGET"` (including the surrounding quotes) with the bare number so the result is `"amount": 50` not `"amount": "50"`. |
|
|
210
|
+
## Step 8: Verify
|
|
331
211
|
|
|
332
|
-
|
|
212
|
+
Check that the written config loads:
|
|
333
213
|
|
|
334
|
-
|
|
214
|
+
```bash
|
|
215
|
+
npx -y @promptctl/cc-candybar@latest check ~/.config/cc-candybar/config.json5
|
|
216
|
+
```
|
|
335
217
|
|
|
336
|
-
|
|
218
|
+
Exit 0 and a `✓` line mean the config loads. A `✗` block names the problem: show it to the user verbatim and stop. Do not continue to the installer, the preview or the success message, and do not claim the setup worked.
|
|
337
219
|
|
|
338
|
-
|
|
220
|
+
## Step 9: Install the runtime
|
|
339
221
|
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
"statusLine": {
|
|
343
|
-
"type": "command",
|
|
344
|
-
"command": "npx -y @promptctl/cc-candybar@latest"
|
|
345
|
-
}
|
|
346
|
-
}
|
|
222
|
+
```bash
|
|
223
|
+
npx -y @promptctl/cc-candybar@latest install
|
|
347
224
|
```
|
|
348
225
|
|
|
349
|
-
|
|
350
|
-
If it exists, preserve ALL other settings (hooks, permissions, plugins, etc.) and only add or update the `statusLine` key.
|
|
226
|
+
This stages the runtime and writes the `statusLine` entry into `~/.claude/settings.json` itself. Relay the command's output in your text. If it exits non-zero, show the error and stop; do not open settings.json to finish the job by hand.
|
|
351
227
|
|
|
352
|
-
|
|
228
|
+
Exit 0 has two outcomes, told apart by the output:
|
|
353
229
|
|
|
354
|
-
|
|
230
|
+
- A line beginning `Updated ` followed by the settings path: settings.json was written. Continue to Step 10.
|
|
231
|
+
- `Skipping settings.json update: existing statusLine.command appears customized.` followed by a `Current:` line: the installer found a statusLine command it did not write and left it alone. Relay the `Current:` command in your text, then ask:
|
|
232
|
+
- **Question**: "Your settings.json already has a statusLine command. Replace it with cc-candybar?"
|
|
233
|
+
- **Header**: "statusLine"
|
|
234
|
+
- **Options**:
|
|
235
|
+
- "Replace it with cc-candybar" -> Run `npx -y @promptctl/cc-candybar@latest install --force`, relay its output, and continue to Step 10.
|
|
236
|
+
- "Keep my existing statusLine" -> Continue to Step 10; the success message says the bar is not wired up.
|
|
355
237
|
|
|
356
|
-
|
|
238
|
+
## Step 10: Preview
|
|
357
239
|
|
|
358
240
|
> [!IMPORTANT]
|
|
359
|
-
> You
|
|
241
|
+
> You cannot render ANSI escape codes or nerd font glyphs in your text output.
|
|
242
|
+
> You MUST run the preview command below and let the terminal display the result.
|
|
243
|
+
> After running, tell the user to expand the bash output if they cannot see the preview.
|
|
360
244
|
|
|
361
245
|
```bash
|
|
362
|
-
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${
|
|
246
|
+
${CLAUDE_PLUGIN_ROOT}/bin/preview.sh --theme=${theme} --style=${style} --charset=${charset} --preset=${preset}
|
|
363
247
|
```
|
|
364
248
|
|
|
365
|
-
Tell the user: "
|
|
249
|
+
Tell the user: "Your statusline is in the bash output above. Expand it if needed."
|
|
366
250
|
|
|
367
|
-
|
|
251
|
+
## Step 11: Success message
|
|
368
252
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
Display:
|
|
253
|
+
Display the message below. The `~/.claude/settings.json` line under **Files written** belongs there only if Step 9 printed `Updated `. If the user kept their existing statusLine, drop that line and make item 1 of **What now**: "Your existing statusLine was left in place, so the bar will not appear until `statusLine.command` in `~/.claude/settings.json` points at cc-candybar. Rerun `/candybar` and choose Replace to have the installer do it."
|
|
372
254
|
|
|
373
255
|
````markdown
|
|
374
256
|
Setup complete.
|
|
375
257
|
|
|
376
|
-
**Files
|
|
377
|
-
- `~/.config/cc-candybar/config.
|
|
378
|
-
- `~/.claude/settings.json` (
|
|
258
|
+
**Files written:**
|
|
259
|
+
- `~/.config/cc-candybar/config.json5` (your candybar config)
|
|
260
|
+
- `~/.claude/settings.json` (`statusLine` entry, written by the installer)
|
|
379
261
|
|
|
380
262
|
**What now:**
|
|
381
263
|
1. Restart Claude Code if the statusline does not appear.
|
|
382
|
-
2.
|
|
383
|
-
3.
|
|
264
|
+
2. The bar has its own settings menu: click `☰ ▸` on the bar to switch theme, look, style, wrap, padding and preset live. Tick `persist?` there to make a choice the durable default.
|
|
265
|
+
3. Hand edits to `~/.config/cc-candybar/config.json5` hot-reload; no restart needed.
|
|
266
|
+
4. Run `/candybar` any time to rerun this wizard.
|
|
384
267
|
|
|
385
268
|
Documentation: https://github.com/promptctl/cc-candybar
|
|
386
269
|
````
|
|
387
|
-
|
|
388
|
-
**If the user chose TUI style**, also display:
|
|
389
|
-
|
|
390
|
-
````markdown
|
|
391
|
-
**Customizing your TUI grid layout:**
|
|
392
|
-
|
|
393
|
-
Edit `display.tui` in `~/.config/cc-candybar/config.json` to fine-tune:
|
|
394
|
-
|
|
395
|
-
- **Box style** — Add `"box": "rounded"` to change borders. Presets: `rounded`, `square`, `heavy`, `double`, `dashed`, `heavy-dashed`, `mixed`, `ascii`, `invisible`
|
|
396
|
-
- **Title/footer** — Edit `title.left`, `title.right`, `footer.left`, `footer.right` using `{segment.part}` tokens (e.g. `{model.icon}`, `{dir}`, `{weekly.pct}`)
|
|
397
|
-
- **Grid areas** — Rearrange cells in `breakpoints[].areas`. Use `.` for empty cells, `---` for dividers. Repeat a name across adjacent cells to span columns
|
|
398
|
-
- **Custom colors** — Add `colors.custom` entries with dot-notation keys (e.g. `"context.bar": { "fg": "#4a9eff" }`)
|
|
399
|
-
- **Responsive breakpoints** — Add breakpoints for different terminal widths. The engine picks the largest `minWidth` that fits
|
|
400
|
-
- **Column sizing** — `"auto"` (fit content), `"1fr"` (fill remaining), or a fixed number like `"20"`
|
|
401
|
-
|
|
402
|
-
See the TUI Grid Layout section in the README for the full reference.
|
|
403
|
-
````
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
Can you see these
|
|
1
|
+
Can you see these joiner glyphs clearly?
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
powerline: one two three
|
|
4
|
+
capsule: one two
|
|
4
5
|
|
|
5
|
-
If you see boxes
|
|
6
|
+
If you see boxes, blank spaces, or question marks instead of arrow and
|
|
7
|
+
half-circle shapes, choose "No" below.
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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, "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
|
-
}
|