ccstatusline 2.2.6 β 2.2.8
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/README.md +44 -534
- package/dist/ccstatusline.js +5207 -4966
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -28,24 +28,35 @@
|
|
|
28
28
|

|
|
29
29
|
|
|
30
30
|
</div>
|
|
31
|
+
<br />
|
|
31
32
|
|
|
32
33
|
## π Table of Contents
|
|
33
34
|
|
|
34
35
|
- [Recent Updates](#-recent-updates)
|
|
35
36
|
- [Features](#-features)
|
|
37
|
+
- [Localizations](#-localizations)
|
|
36
38
|
- [Quick Start](#-quick-start)
|
|
37
|
-
- [Windows Support](
|
|
38
|
-
- [Usage](
|
|
39
|
-
- [
|
|
40
|
-
- [Development](#οΈ-development)
|
|
39
|
+
- [Windows Support](docs/WINDOWS.md)
|
|
40
|
+
- [Usage](docs/USAGE.md)
|
|
41
|
+
- [Development](docs/DEVELOPMENT.md)
|
|
41
42
|
- [Contributing](#-contributing)
|
|
42
43
|
- [License](#-license)
|
|
43
44
|
- [Related Projects](#-related-projects)
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
<br />
|
|
46
47
|
|
|
47
48
|
## π Recent Updates
|
|
48
49
|
|
|
50
|
+
### v2.2.8 - Git widgets, smarter picker search, and minimalist mode
|
|
51
|
+
|
|
52
|
+
- **π New Git PR widget** - Added a `Git PR` widget with clickable PR links plus optional status and title display for the current branch.
|
|
53
|
+
- **π§° Major Git widget expansion** - Added `Git Status`, `Git Staged`, `Git Unstaged`, `Git Untracked`, `Git Ahead/Behind`, `Git Conflicts`, `Git SHA`, `Git Origin Owner`, `Git Origin Repo`, `Git Origin Owner/Repo`, `Git Upstream Owner`, `Git Upstream Repo`, `Git Upstream Owner/Repo`, `Git Is Fork`, `Git Worktree Mode`, `Git Worktree Name`, `Git Worktree Branch`, `Git Worktree Original Branch`, and `Custom Symbol`.
|
|
54
|
+
- **π€ Claude Account Email widget** - Added a session widget that reads the signed-in Claude account email from `~/.claude.json` while respecting `CLAUDE_CONFIG_DIR`.
|
|
55
|
+
- **π§Ό Global Minimalist Mode** - Added a global toggle in `Global Overrides` that forces widgets into raw-value mode for a cleaner, label-free status line.
|
|
56
|
+
- **π Smarter widget picker search** - The add/change widget picker now supports substring, initialism, and fuzzy matching, with ranked results and live match highlighting.
|
|
57
|
+
- **π Better terminal width detection** - Flex separators and right-alignment now work more reliably when ccstatusline is launched through wrapper processes or nested PTYs.
|
|
58
|
+
- **π¨ Powerline theme continuity** - Built-in Powerline themes can now continue colors cleanly across multiple status lines instead of restarting each line.
|
|
59
|
+
|
|
49
60
|
### v2.2.0 - v2.2.6 - Speed, widgets, links, and reliability updates
|
|
50
61
|
|
|
51
62
|
- **π New Token Speed widgets** - Added three widgets: **Input Speed**, **Output Speed**, and **Total Speed**.
|
|
@@ -60,6 +71,10 @@
|
|
|
60
71
|
- **π Git widget link modes (v2.2.6)** - `Git Branch` can render clickable GitHub branch links, and `Git Root Dir` can render clickable IDE links for VS Code and Cursor.
|
|
61
72
|
- **π€ Better subagent-aware speed reporting** - Token speed calculations continue to include referenced subagent activity so displayed speeds better reflect actual concurrent work.
|
|
62
73
|
|
|
74
|
+
<br />
|
|
75
|
+
<details>
|
|
76
|
+
<summary><b>Older updates (v2.1.10 and earlier)</b></summary>
|
|
77
|
+
|
|
63
78
|
### v2.1.0 - v2.1.10 - Usage widgets, links, new git insertions / deletions widgets, and reliability fixes
|
|
64
79
|
|
|
65
80
|
- **π§© New Usage widgets (v2.1.0)** - Added **Session Usage**, **Weekly Usage**, **Block Reset Timer**, and **Context Bar** widgets.
|
|
@@ -156,7 +171,9 @@
|
|
|
156
171
|
- **π€ Custom Separators** - Add multiple Powerline separators with custom hex codes for font support
|
|
157
172
|
- **π Auto Font Install** - Automatic Powerline font installation with user consent
|
|
158
173
|
|
|
159
|
-
|
|
174
|
+
</details>
|
|
175
|
+
|
|
176
|
+
<br />
|
|
160
177
|
|
|
161
178
|
## β¨ Features
|
|
162
179
|
|
|
@@ -166,13 +183,21 @@
|
|
|
166
183
|
- **π Multi-line Support** - Configure multiple independent status lines
|
|
167
184
|
- **π₯οΈ Interactive TUI** - Built-in configuration interface using React/Ink
|
|
168
185
|
- **π Fast Widget Picker** - Add/change widgets by category with search and ranked matching
|
|
169
|
-
- **βοΈ Global Options** - Apply consistent formatting across all widgets (padding, separators, bold,
|
|
186
|
+
- **βοΈ Global Options** - Apply consistent formatting across all widgets (padding, separators, bold, minimalist mode, and color overrides)
|
|
170
187
|
- **π Cross-platform** - Works seamlessly with both Bun and Node.js
|
|
171
188
|
- **π§ Flexible Configuration** - Supports custom Claude Code config directory via `CLAUDE_CONFIG_DIR` environment variable
|
|
172
189
|
- **π Smart Width Detection** - Automatically adapts to terminal width with flex separators
|
|
173
190
|
- **β‘ Zero Config** - Sensible defaults that work out of the box
|
|
174
191
|
|
|
175
|
-
|
|
192
|
+
<br />
|
|
193
|
+
|
|
194
|
+
## π Localizations
|
|
195
|
+
|
|
196
|
+
The localizations in this section are third-party forks maintained outside this repository. They are not maintained, reviewed, or endorsed by this repository, so review their code and releases before using them.
|
|
197
|
+
|
|
198
|
+
- π **δΈζη (Chinese):** [ccstatusline-zh](https://github.com/huangguang1999/ccstatusline-zh)
|
|
199
|
+
|
|
200
|
+
<br />
|
|
176
201
|
|
|
177
202
|
## π Quick Start
|
|
178
203
|
|
|
@@ -186,7 +211,9 @@ npx -y ccstatusline@latest
|
|
|
186
211
|
bunx -y ccstatusline@latest
|
|
187
212
|
```
|
|
188
213
|
|
|
189
|
-
|
|
214
|
+
<br />
|
|
215
|
+
<details>
|
|
216
|
+
<summary><b>Configure ccstatusline</b></summary>
|
|
190
217
|
|
|
191
218
|
The interactive configuration tool provides a terminal UI where you can:
|
|
192
219
|
- Configure multiple separate status lines
|
|
@@ -203,14 +230,16 @@ The interactive configuration tool provides a terminal UI where you can:
|
|
|
203
230
|
> ```bash
|
|
204
231
|
> # Linux/macOS
|
|
205
232
|
> export CLAUDE_CONFIG_DIR=/custom/path/to/.claude
|
|
206
|
-
>
|
|
207
|
-
> # Windows PowerShell
|
|
208
|
-
> $env:CLAUDE_CONFIG_DIR="C:\custom\path\.claude"
|
|
209
233
|
> ```
|
|
210
234
|
|
|
211
235
|
> π **Usage API proxy:** Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
|
|
212
236
|
|
|
213
|
-
|
|
237
|
+
> πͺ **Windows Support:** PowerShell examples, installation notes, fonts, troubleshooting, WSL, and Windows Terminal configuration are in [docs/WINDOWS.md](docs/WINDOWS.md).
|
|
238
|
+
|
|
239
|
+
</details>
|
|
240
|
+
|
|
241
|
+
<details>
|
|
242
|
+
<summary><b>Claude Code settings.json format</b></summary>
|
|
214
243
|
|
|
215
244
|
When you install from the TUI, ccstatusline writes a `statusLine` command object to your Claude Code settings:
|
|
216
245
|
|
|
@@ -228,523 +257,8 @@ Other supported command values are:
|
|
|
228
257
|
- `bunx -y ccstatusline@latest`
|
|
229
258
|
- `ccstatusline` (for self-managed/global installs)
|
|
230
259
|
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
## πͺ Windows Support
|
|
234
|
-
|
|
235
|
-
ccstatusline works seamlessly on Windows with full feature compatibility across PowerShell (5.1+ and 7+), Command Prompt, and Windows Subsystem for Linux (WSL).
|
|
236
|
-
|
|
237
|
-
### Installation on Windows
|
|
238
|
-
|
|
239
|
-
#### Option 1: Using Bun (Recommended)
|
|
240
|
-
```powershell
|
|
241
|
-
# Install Bun for Windows
|
|
242
|
-
irm bun.sh/install.ps1 | iex
|
|
243
|
-
|
|
244
|
-
# Run ccstatusline
|
|
245
|
-
bunx -y ccstatusline@latest
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
#### Option 2: Using Node.js
|
|
249
|
-
```powershell
|
|
250
|
-
# Using npm
|
|
251
|
-
npx -y ccstatusline@latest
|
|
252
|
-
|
|
253
|
-
# Or with Yarn
|
|
254
|
-
yarn dlx ccstatusline@latest
|
|
255
|
-
|
|
256
|
-
# Or with pnpm
|
|
257
|
-
pnpm dlx ccstatusline@latest
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Windows-Specific Features
|
|
261
|
-
|
|
262
|
-
#### Powerline Font Support
|
|
263
|
-
For optimal Powerline rendering on Windows:
|
|
264
|
-
|
|
265
|
-
**Windows Terminal** (Recommended):
|
|
266
|
-
- Supports Powerline fonts natively
|
|
267
|
-
- Download from [Microsoft Store](https://aka.ms/terminal)
|
|
268
|
-
- Auto-detects compatible fonts
|
|
269
|
-
|
|
270
|
-
**PowerShell/Command Prompt**:
|
|
271
|
-
```powershell
|
|
272
|
-
# Install JetBrains Mono Nerd Font via winget
|
|
273
|
-
winget install DEVCOM.JetBrainsMonoNerdFont
|
|
274
|
-
|
|
275
|
-
# Alternative: Install base JetBrains Mono font
|
|
276
|
-
winget install "JetBrains.JetBrainsMono"
|
|
277
|
-
|
|
278
|
-
# Or download manually from: https://www.nerdfonts.com/font-downloads
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
#### Path Handling
|
|
282
|
-
ccstatusline automatically handles Windows-specific paths:
|
|
283
|
-
- Git repositories work with both `/` and `\` path separators
|
|
284
|
-
- Current Working Directory widget displays Windows-style paths correctly
|
|
285
|
-
- Full support for mapped network drives and UNC paths
|
|
286
|
-
- Handles Windows drive letters (C:, D:, etc.)
|
|
287
|
-
|
|
288
|
-
### Windows Troubleshooting
|
|
289
|
-
|
|
290
|
-
#### Common Issues & Solutions
|
|
291
|
-
|
|
292
|
-
**Issue**: Powerline symbols showing as question marks or boxes
|
|
293
|
-
```powershell
|
|
294
|
-
# Solution: Install a compatible Nerd Font
|
|
295
|
-
winget install JetBrainsMono.NerdFont
|
|
296
|
-
# Then set the font in your terminal settings
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
**Issue**: Git commands not recognized
|
|
300
|
-
```powershell
|
|
301
|
-
# Check if Git is installed and in PATH
|
|
302
|
-
git --version
|
|
303
|
-
|
|
304
|
-
# If not found, install Git:
|
|
305
|
-
winget install Git.Git
|
|
306
|
-
# Or download from: https://git-scm.com/download/win
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**Issue**: Permission errors during installation
|
|
310
|
-
```powershell
|
|
311
|
-
# Use non-global installation (recommended)
|
|
312
|
-
npx -y ccstatusline@latest
|
|
313
|
-
|
|
314
|
-
# Or run PowerShell as Administrator for global install
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
**Issue**: "Execution Policy" errors in PowerShell
|
|
318
|
-
```powershell
|
|
319
|
-
# Temporarily allow script execution
|
|
320
|
-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
**Issue**: Windows Defender blocking execution
|
|
324
|
-
```powershell
|
|
325
|
-
# If Windows Defender flags the binary:
|
|
326
|
-
# 1. Open Windows Security
|
|
327
|
-
# 2. Go to "Virus & threat protection"
|
|
328
|
-
# 3. Add exclusion for the ccstatusline binary location
|
|
329
|
-
# Or use temporary bypass (not recommended for production):
|
|
330
|
-
Add-MpPreference -ExclusionPath "$env:USERPROFILE\.bun\bin"
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
#### Windows Subsystem for Linux (WSL)
|
|
334
|
-
ccstatusline works perfectly in WSL environments:
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
# Install in WSL Ubuntu/Debian
|
|
338
|
-
curl -fsSL https://bun.sh/install | bash
|
|
339
|
-
source ~/.bashrc
|
|
340
|
-
bunx -y ccstatusline@latest
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
**WSL Benefits**:
|
|
344
|
-
- Native Unix-style path handling
|
|
345
|
-
- Better font rendering in WSL terminals
|
|
346
|
-
- Seamless integration with Linux development workflows
|
|
347
|
-
|
|
348
|
-
### Windows Terminal Configuration
|
|
349
|
-
|
|
350
|
-
For the best experience, configure Windows Terminal with these recommended settings:
|
|
351
|
-
|
|
352
|
-
#### Terminal Settings (settings.json)
|
|
353
|
-
```json
|
|
354
|
-
{
|
|
355
|
-
"profiles": {
|
|
356
|
-
"defaults": {
|
|
357
|
-
"font": {
|
|
358
|
-
"face": "JetBrainsMono Nerd Font",
|
|
359
|
-
"size": 12
|
|
360
|
-
},
|
|
361
|
-
"colorScheme": "One Half Dark"
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
#### Claude Code Integration
|
|
368
|
-
Configure ccstatusline in your Claude Code settings:
|
|
369
|
-
|
|
370
|
-
**Settings Location:**
|
|
371
|
-
- Default: `~/.claude/settings.json` (Windows: `%USERPROFILE%\.claude\settings.json`)
|
|
372
|
-
- Custom: Set `CLAUDE_CONFIG_DIR` environment variable to use a different directory
|
|
373
|
-
|
|
374
|
-
**For Bun users**:
|
|
375
|
-
```json
|
|
376
|
-
{
|
|
377
|
-
"statusLine": {
|
|
378
|
-
"type": "command",
|
|
379
|
-
"command": "bunx -y ccstatusline@latest",
|
|
380
|
-
"padding": 0
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
**For npm users**:
|
|
386
|
-
```json
|
|
387
|
-
{
|
|
388
|
-
"statusLine": {
|
|
389
|
-
"type": "command",
|
|
390
|
-
"command": "npx -y ccstatusline@latest",
|
|
391
|
-
"padding": 0
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
> π‘ **Custom Config Directory:** If you use a non-standard Claude Code configuration directory, set the `CLAUDE_CONFIG_DIR` environment variable before running ccstatusline. The tool will automatically detect and use your custom location.
|
|
397
|
-
|
|
398
|
-
### Performance on Windows
|
|
399
|
-
|
|
400
|
-
ccstatusline includes Windows-specific runtime behavior:
|
|
401
|
-
- **UTF-8 piped output fix**: In piped mode, it attempts to set code page `65001` for reliable symbol rendering
|
|
402
|
-
- **Path compatibility**: Git and CWD widgets handle both `/` and `\` separators
|
|
403
|
-
- **Block timer cache**: Cached block metrics reduce repeated JSONL scanning
|
|
404
|
-
|
|
405
|
-
### Windows-Specific Widget Behavior
|
|
406
|
-
|
|
407
|
-
Some widgets have Windows-specific optimizations:
|
|
408
|
-
|
|
409
|
-
- **Current Working Directory**: Displays Windows drive letters and UNC paths
|
|
410
|
-
- **Git Widgets**: Handle Windows line endings (CRLF) automatically
|
|
411
|
-
- **Custom Commands**: Support both PowerShell and cmd.exe commands
|
|
412
|
-
- **Block Timer**: Accounts for Windows timezone handling
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## π Usage
|
|
417
|
-
|
|
418
|
-
Once configured, ccstatusline automatically formats your Claude Code status line. The status line appears at the bottom of your terminal during Claude Code sessions.
|
|
419
|
-
|
|
420
|
-
### Runtime Modes
|
|
421
|
-
|
|
422
|
-
- **Interactive mode (TUI)**: Launches when there is no stdin input
|
|
423
|
-
- **Piped mode (renderer)**: Parses Claude Code status JSON from stdin and prints one or more formatted lines
|
|
424
|
-
|
|
425
|
-
```bash
|
|
426
|
-
# Interactive TUI
|
|
427
|
-
bun run start
|
|
428
|
-
|
|
429
|
-
# Piped mode with example payload
|
|
430
|
-
bun run example
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
### π Available Widgets
|
|
434
|
-
|
|
435
|
-
- **Model** - Displays the Claude model name (e.g., "Claude 3.5 Sonnet")
|
|
436
|
-
- **Output Style** - Shows the current Claude Code output style
|
|
437
|
-
- **Git Branch** - Shows the current git branch name
|
|
438
|
-
- **Git Changes** - Shows git changes count (`+insertions`, `-deletions`)
|
|
439
|
-
- **Git Insertions** - Shows git insertions count
|
|
440
|
-
- **Git Deletions** - Shows git deletions count
|
|
441
|
-
- **Git Root Dir** - Shows the git repository root directory name
|
|
442
|
-
- **Git Worktree** - Shows the current git worktree name
|
|
443
|
-
- **Current Working Dir** - Shows current working directory with segment limit, fish-style abbreviation, and optional `~` home abbreviation
|
|
444
|
-
- **Tokens Input** - Shows input token count for the current session
|
|
445
|
-
- **Tokens Output** - Shows output token count for the current session
|
|
446
|
-
- **Tokens Cached** - Shows cached token count for the current session
|
|
447
|
-
- **Tokens Total** - Shows total token count (`input + output + cache`) for the current session
|
|
448
|
-
- **Input Speed** - Shows session-average input token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
|
|
449
|
-
- **Output Speed** - Shows session-average output token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
|
|
450
|
-
- **Total Speed** - Shows session-average total token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
|
|
451
|
-
- **Context Length** - Shows the current context window size in tokens
|
|
452
|
-
- **Context %** - Shows percentage of context window used or remaining
|
|
453
|
-
- **Context % (usable)** - Shows percentage of usable context used or remaining (80% of max before auto-compact)
|
|
454
|
-
- **Session Clock** - Shows elapsed time since current session started
|
|
455
|
-
- **Session Cost** - Shows the total session cost in USD
|
|
456
|
-
- **Block Timer** - Shows current 5-hour block elapsed time or progress
|
|
457
|
-
- **Terminal Width** - Shows current terminal width in columns
|
|
458
|
-
- **Version** - Shows Claude Code CLI version number
|
|
459
|
-
- **Custom Text** - Displays user-defined custom text
|
|
460
|
-
- **Custom Command** - Executes a custom shell command and displays output (refreshes whenever Claude Code updates the status line)
|
|
461
|
-
- **Link** - Displays a clickable terminal hyperlink using OSC 8
|
|
462
|
-
- **Claude Session ID** - Shows the current Claude Code session ID from status JSON
|
|
463
|
-
- **Session Name** - Shows the session name set via `/rename` in Claude Code
|
|
464
|
-
- **Memory Usage** - Shows system memory usage (used/total)
|
|
465
|
-
- **Session Usage** - Shows daily/session API usage percentage
|
|
466
|
-
- **Weekly Usage** - Shows weekly API usage percentage
|
|
467
|
-
- **Block Reset Timer** - Shows time remaining until current 5-hour block reset window
|
|
468
|
-
- **Weekly Reset Timer** - Shows time remaining until weekly usage reset
|
|
469
|
-
- **Context Bar** - Shows context usage as a progress bar with short/full display modes
|
|
470
|
-
- **Skills** - Shows skill activity as last used, total count, or unique list (with optional list limit and hide-when-empty toggle)
|
|
471
|
-
- **Vim Mode** - Displays current vim editor mode
|
|
472
|
-
- **Separator** - Visual divider between widgets (available when Powerline mode is off and no default separator is configured)
|
|
473
|
-
- **Flex Separator** - Expands to fill available space (available when Powerline mode is off)
|
|
474
|
-
|
|
475
|
-
---
|
|
476
|
-
|
|
477
|
-
### Terminal Width Options
|
|
478
|
-
These settings affect where long lines are truncated, and where right-alignment occurs when using flex separators:
|
|
479
|
-
- **Full width always** - Uses full terminal width (may wrap if auto-compact message appears or IDE integration adds text)
|
|
480
|
-
- **Full width minus 40** - Reserves 40 characters for auto-compact message to prevent wrapping (default)
|
|
481
|
-
- **Full width until compact** - Dynamically switches between full width and minus 40 based on context percentage threshold (configurable, default 60%)
|
|
482
|
-
|
|
483
|
-
---
|
|
484
|
-
|
|
485
|
-
### βοΈ Global Options
|
|
486
|
-
|
|
487
|
-
Configure global formatting preferences that apply to all widgets:
|
|
488
|
-
|
|
489
|
-

|
|
490
|
-
|
|
491
|
-
#### Default Padding & Separators
|
|
492
|
-
- **Default Padding** - Add consistent padding to the left and right of each widget
|
|
493
|
-
- **Default Separator** - Automatically insert a separator between all widgets
|
|
494
|
-
- Press **(p)** to edit padding
|
|
495
|
-
- Press **(s)** to edit separator
|
|
496
|
-
|
|
497
|
-
<details>
|
|
498
|
-
<summary><b>Global Formatting Options</b></summary>
|
|
499
|
-
|
|
500
|
-
- **Inherit Colors** - Default separators inherit foreground and background colors from the preceding widget
|
|
501
|
-
- Press **(i)** to toggle
|
|
502
|
-
- **Global Bold** - Apply bold formatting to all text regardless of individual widget settings
|
|
503
|
-
- Press **(o)** to toggle
|
|
504
|
-
- **Override Foreground Color** - Force all widgets to use the same text color
|
|
505
|
-
- Press **(f)** to cycle through colors
|
|
506
|
-
- Press **(g)** to clear override
|
|
507
|
-
- **Override Background Color** - Force all widgets to use the same background color
|
|
508
|
-
- Press **(b)** to cycle through colors
|
|
509
|
-
- Press **(c)** to clear override
|
|
510
|
-
|
|
511
260
|
</details>
|
|
512
261
|
|
|
513
|
-
> π‘ **Note:** These settings are applied during rendering and don't add widgets to your widget list. They provide a consistent look across your entire status line without modifying individual widget configurations.
|
|
514
|
-
|
|
515
|
-
> β οΈ **VSCode Users:** If colors appear incorrect in the VSCode integrated terminal, the "Terminal βΊ Integrated: Minimum Contrast Ratio" (`terminal.integrated.minimumContrastRatio`) setting is forcing a minimum contrast between foreground and background colors. You can adjust this setting to 1 to disable the contrast enforcement, or use a standalone terminal for accurate colors.
|
|
516
|
-
|
|
517
|
-
### β±οΈ Block Timer Widget
|
|
518
|
-
|
|
519
|
-
The Block Timer widget helps you track your progress through Claude Code's 5-hour conversation blocks:
|
|
520
|
-
|
|
521
|
-

|
|
522
|
-
|
|
523
|
-
**Display Modes:**
|
|
524
|
-
- **Time Display** - Shows elapsed time as "3hr 45m" (default)
|
|
525
|
-
- **Progress Bar** - Full width 32-character progress bar with percentage
|
|
526
|
-
- **Progress Bar (Short)** - Compact 16-character progress bar with percentage
|
|
527
|
-
|
|
528
|
-
**Features:**
|
|
529
|
-
- Automatically detects block boundaries from transcript timestamps
|
|
530
|
-
- Floors block start time to the hour for consistent tracking
|
|
531
|
-
- Shows "Block: 3hr 45m" in normal mode or just "3hr 45m" in raw value mode
|
|
532
|
-
- Progress bars show completion percentage (e.g., "[ββββββββββββββββββββββββββββββββ] 73.9%")
|
|
533
|
-
- Toggle between modes with the **(p)** key in the widgets editor
|
|
534
|
-
|
|
535
|
-
### π€ Raw Value Mode
|
|
536
|
-
|
|
537
|
-
Some widgets support "raw value" mode which displays just the value without a label:
|
|
538
|
-
- Normal: `Model: Claude 3.5 Sonnet` β Raw: `Claude 3.5 Sonnet`
|
|
539
|
-
- Normal: `Session: 2hr 15m` β Raw: `2hr 15m`
|
|
540
|
-
- Normal: `Block: 3hr 45m` β Raw: `3hr 45m`
|
|
541
|
-
- Normal: `Ctx: 18.6k` β Raw: `18.6k`
|
|
542
|
-
|
|
543
|
-
### β¨οΈ Widget Editor Keybinds
|
|
544
|
-
|
|
545
|
-
Common controls in the line editor:
|
|
546
|
-
- `a` add widget
|
|
547
|
-
- `i` insert widget
|
|
548
|
-
- `Enter` enter/exit move mode
|
|
549
|
-
- `d` delete selected widget
|
|
550
|
-
- `r` toggle raw value (supported widgets)
|
|
551
|
-
- `m` cycle merge mode (`off` β `merge` β `merge no padding`)
|
|
552
|
-
|
|
553
|
-
Widget-specific shortcuts:
|
|
554
|
-
- **Git widgets**: `h` toggle hide `no git` output
|
|
555
|
-
- **Context % widgets**: `u` toggle used vs remaining display
|
|
556
|
-
- **Block Timer**: `p` cycle display mode (time/full bar/short bar)
|
|
557
|
-
- **Block Reset Timer**: `p` cycle display mode (time/full bar/short bar)
|
|
558
|
-
- **Weekly Reset Timer**: `p` cycle display mode (time/full bar/short bar)
|
|
559
|
-
- **Current Working Dir**: `h` home abbreviation, `s` segment editor, `f` fish-style path
|
|
560
|
-
- **Custom Command**: `e` command, `w` max width, `t` timeout, `p` preserve ANSI colors
|
|
561
|
-
- **Link**: `u` URL, `e` link text
|
|
562
|
-
|
|
563
|
-
---
|
|
564
|
-
|
|
565
|
-
### π§ Custom Widgets
|
|
566
|
-
|
|
567
|
-
#### Custom Text Widget
|
|
568
|
-
Add static text to your status line. Perfect for:
|
|
569
|
-
- Project identifiers
|
|
570
|
-
- Environment indicators (dev/prod)
|
|
571
|
-
- Personal labels or reminders
|
|
572
|
-
|
|
573
|
-
#### Custom Command Widget
|
|
574
|
-
Execute shell commands and display their output dynamically:
|
|
575
|
-
- Refreshes whenever the statusline is updated by Claude Code
|
|
576
|
-
- Receives the full Claude Code JSON data via stdin (model info, session ID, transcript path, etc.)
|
|
577
|
-
- Displays command output inline in your status line
|
|
578
|
-
- Configurable timeout (default: 1000ms)
|
|
579
|
-
- Optional max-width truncation
|
|
580
|
-
- Optional ANSI color preservation (`preserve colors`)
|
|
581
|
-
- Examples:
|
|
582
|
-
- `pwd | xargs basename` - Show current directory name
|
|
583
|
-
- `node -v` - Display Node.js version
|
|
584
|
-
- `git rev-parse --short HEAD` - Show current commit hash
|
|
585
|
-
- `date +%H:%M` - Display current time
|
|
586
|
-
- `curl -s wttr.in?format="%t"` - Show current temperature
|
|
587
|
-
- `npx -y ccusage@latest statusline` - Display Claude usage metrics (set timeout: 5000ms)
|
|
588
|
-
|
|
589
|
-
> β οΈ **Important:** Commands should complete quickly to avoid delays. Long-running commands will be killed after the configured timeout. If you're not seeing output from your custom command, try increasing the timeout value (press 't' in the editor).
|
|
590
|
-
|
|
591
|
-
> π‘ **Tip:** Custom commands can be other Claude Code compatible status line formatters! They receive the same JSON via stdin that ccstatusline receives from Claude Code, allowing you to chain or combine multiple status line tools.
|
|
592
|
-
|
|
593
|
-
#### Link Widget
|
|
594
|
-
Create clickable links in terminals that support OSC 8 hyperlinks:
|
|
595
|
-
- `metadata.url` - target URL (http/https)
|
|
596
|
-
- `metadata.text` - optional display text (defaults to URL)
|
|
597
|
-
- Falls back to plain text when URL is missing or unsupported
|
|
598
|
-
|
|
599
|
-
---
|
|
600
|
-
|
|
601
|
-
### π Integration Example: ccusage
|
|
602
|
-
|
|
603
|
-
[ccusage](https://github.com/ryoppippi/ccusage) is a tool that tracks and displays Claude Code usage metrics. You can integrate it directly into your status line:
|
|
604
|
-
|
|
605
|
-
1. Add a Custom Command widget
|
|
606
|
-
2. Set command: `npx -y ccusage@latest statusline`
|
|
607
|
-
3. Set timeout: `5000` (5 seconds for initial download)
|
|
608
|
-
4. Enable "preserve colors" to keep ccusage's color formatting
|
|
609
|
-
|
|
610
|
-

|
|
611
|
-
|
|
612
|
-
> π **How it works:** The command receives Claude Code's JSON data via stdin, allowing ccusage to access session information, model details, and transcript data for accurate usage tracking.
|
|
613
|
-
|
|
614
|
-
### βοΈ Smart Truncation
|
|
615
|
-
|
|
616
|
-
When terminal width is detected, status lines automatically truncate with ellipsis (...) if they exceed the available width, preventing line wrapping.
|
|
617
|
-
Truncation is ANSI/OSC-aware, so preserved color output and OSC 8 hyperlinks remain well-formed.
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## π API Documentation
|
|
622
|
-
|
|
623
|
-
Complete API documentation is generated using TypeDoc and includes detailed information about:
|
|
624
|
-
|
|
625
|
-
- **Core Types**: Configuration interfaces, widget definitions, and render contexts
|
|
626
|
-
- **Widget System**: All available widgets and their customization options
|
|
627
|
-
- **Utility Functions**: Helper functions for rendering, configuration, and terminal handling
|
|
628
|
-
- **Status Line Rendering**: Core rendering engine and formatting options
|
|
629
|
-
|
|
630
|
-
### Generating Documentation
|
|
631
|
-
|
|
632
|
-
To generate the API documentation locally:
|
|
633
|
-
|
|
634
|
-
```bash
|
|
635
|
-
# Generate documentation
|
|
636
|
-
bun run docs
|
|
637
|
-
|
|
638
|
-
# Clean generated documentation
|
|
639
|
-
bun run docs:clean
|
|
640
|
-
```
|
|
641
|
-
|
|
642
|
-
The documentation will be generated in the `docs/` directory and can be viewed by opening `docs/index.html` in your web browser.
|
|
643
|
-
|
|
644
|
-
### Documentation Structure
|
|
645
|
-
|
|
646
|
-
- **Types**: Core TypeScript interfaces and type definitions
|
|
647
|
-
- **Widgets**: Individual widget implementations and their APIs
|
|
648
|
-
- **Utils**: Utility functions for configuration, rendering, and terminal operations
|
|
649
|
-
- **Main Module**: Primary entry point and orchestration functions
|
|
650
|
-
|
|
651
|
-
---
|
|
652
|
-
|
|
653
|
-
## π οΈ Development
|
|
654
|
-
|
|
655
|
-
### Prerequisites
|
|
656
|
-
|
|
657
|
-
- [Bun](https://bun.sh) (v1.0+)
|
|
658
|
-
- Git
|
|
659
|
-
- Node.js 14+ (optional, for running the built `dist/ccstatusline.js` binary or npm publishing)
|
|
660
|
-
|
|
661
|
-
### Setup
|
|
662
|
-
|
|
663
|
-
```bash
|
|
664
|
-
# Clone the repository
|
|
665
|
-
git clone https://github.com/sirmalloc/ccstatusline.git
|
|
666
|
-
cd ccstatusline
|
|
667
|
-
|
|
668
|
-
# Install dependencies
|
|
669
|
-
bun install
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
### Development Commands
|
|
673
|
-
|
|
674
|
-
```bash
|
|
675
|
-
# Run in TUI mode
|
|
676
|
-
bun run start
|
|
677
|
-
|
|
678
|
-
# Test piped mode with example payload
|
|
679
|
-
bun run example
|
|
680
|
-
|
|
681
|
-
# Run tests
|
|
682
|
-
bun test
|
|
683
|
-
|
|
684
|
-
# Run typecheck + eslint checks without modifying files
|
|
685
|
-
bun run lint
|
|
686
|
-
|
|
687
|
-
# Apply ESLint auto-fixes intentionally
|
|
688
|
-
bun run lint:fix
|
|
689
|
-
|
|
690
|
-
# Build for distribution
|
|
691
|
-
bun run build
|
|
692
|
-
|
|
693
|
-
# Generate TypeDoc documentation
|
|
694
|
-
bun run docs
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
### Configuration Files
|
|
698
|
-
|
|
699
|
-
- `~/.config/ccstatusline/settings.json` - ccstatusline UI/render settings
|
|
700
|
-
- `~/.claude/settings.json` - Claude Code settings (`statusLine` command object)
|
|
701
|
-
- `~/.cache/ccstatusline/block-cache-*.json` - block timer cache (keyed by Claude config directory hash)
|
|
702
|
-
|
|
703
|
-
If you use a custom Claude config location, set `CLAUDE_CONFIG_DIR` and ccstatusline will read/write that path instead of `~/.claude`.
|
|
704
|
-
|
|
705
|
-
### Build Notes
|
|
706
|
-
|
|
707
|
-
- Build target is Node.js 14+ (`dist/ccstatusline.js`)
|
|
708
|
-
- During install, `ink@6.2.0` is patched to fix backspace handling on macOS terminals
|
|
709
|
-
|
|
710
|
-
### π Project Structure
|
|
711
|
-
|
|
712
|
-
```
|
|
713
|
-
ccstatusline/
|
|
714
|
-
βββ src/
|
|
715
|
-
β βββ ccstatusline.ts # Main entry point
|
|
716
|
-
β βββ tui/ # React/Ink configuration UI
|
|
717
|
-
β β βββ App.tsx # Root TUI component
|
|
718
|
-
β β βββ index.tsx # TUI entry point
|
|
719
|
-
β β βββ components/ # UI components
|
|
720
|
-
β β βββ MainMenu.tsx
|
|
721
|
-
β β βββ LineSelector.tsx
|
|
722
|
-
β β βββ ItemsEditor.tsx
|
|
723
|
-
β β βββ ColorMenu.tsx
|
|
724
|
-
β β βββ PowerlineSetup.tsx
|
|
725
|
-
β β βββ ...
|
|
726
|
-
β βββ widgets/ # Status line widget implementations
|
|
727
|
-
β β βββ Model.ts
|
|
728
|
-
β β βββ GitBranch.ts
|
|
729
|
-
β β βββ TokensTotal.ts
|
|
730
|
-
β β βββ OutputStyle.ts
|
|
731
|
-
β β βββ ...
|
|
732
|
-
β βββ utils/ # Utility functions
|
|
733
|
-
β β βββ config.ts # Settings management
|
|
734
|
-
β β βββ renderer.ts # Core rendering logic
|
|
735
|
-
β β βββ powerline.ts # Powerline font utilities
|
|
736
|
-
β β βββ colors.ts # Color definitions
|
|
737
|
-
β β βββ claude-settings.ts # Claude Code integration (supports CLAUDE_CONFIG_DIR)
|
|
738
|
-
β βββ types/ # TypeScript type definitions
|
|
739
|
-
β βββ Settings.ts
|
|
740
|
-
β βββ Widget.ts
|
|
741
|
-
β βββ PowerlineConfig.ts
|
|
742
|
-
β βββ ...
|
|
743
|
-
βββ dist/ # Built files (generated)
|
|
744
|
-
βββ package.json
|
|
745
|
-
βββ tsconfig.json
|
|
746
|
-
βββ README.md
|
|
747
|
-
```
|
|
748
262
|
## π€ Contributing
|
|
749
263
|
|
|
750
264
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -755,7 +269,6 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
755
269
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
756
270
|
5. Open a Pull Request
|
|
757
271
|
|
|
758
|
-
---
|
|
759
272
|
|
|
760
273
|
## Support
|
|
761
274
|
|
|
@@ -763,13 +276,11 @@ If ccstatusline is useful to you, consider buying me a coffee:
|
|
|
763
276
|
|
|
764
277
|
<a href="https://www.buymeacoffee.com/sirmalloc" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|
|
765
278
|
|
|
766
|
-
---
|
|
767
279
|
|
|
768
280
|
## π License
|
|
769
281
|
|
|
770
282
|
[MIT](LICENSE) Β© Matthew Breedlove
|
|
771
283
|
|
|
772
|
-
---
|
|
773
284
|
|
|
774
285
|
## π€ Author
|
|
775
286
|
|
|
@@ -777,14 +288,13 @@ If ccstatusline is useful to you, consider buying me a coffee:
|
|
|
777
288
|
|
|
778
289
|
- GitHub: [@sirmalloc](https://github.com/sirmalloc)
|
|
779
290
|
|
|
780
|
-
---
|
|
781
291
|
|
|
782
292
|
## π Related Projects
|
|
783
293
|
|
|
784
294
|
- [tweakcc](https://github.com/Piebald-AI/tweakcc) - Customize Claude Code themes, thinking verbs, and more.
|
|
785
295
|
- [ccusage](https://github.com/ryoppippi/ccusage) - Track and display Claude Code usage metrics.
|
|
296
|
+
- [codachi](https://github.com/vincent-k2026/codachi) - A tamagotchi-style statusline pet that grows with your context window.
|
|
786
297
|
|
|
787
|
-
---
|
|
788
298
|
|
|
789
299
|
## π Acknowledgments
|
|
790
300
|
|
|
@@ -792,7 +302,7 @@ If ccstatusline is useful to you, consider buying me a coffee:
|
|
|
792
302
|
- Powered by [Ink](https://github.com/vadimdemedes/ink) for the terminal UI
|
|
793
303
|
- Made with β€οΈ for the Claude Code community
|
|
794
304
|
|
|
795
|
-
|
|
305
|
+
<br />
|
|
796
306
|
|
|
797
307
|
## Star History
|
|
798
308
|
|