@owloops/claude-powerline 1.9.6 → 1.9.7
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 +65 -115
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -165,9 +165,8 @@ Config files reload automatically and no restart needed.
|
|
|
165
165
|
|
|
166
166
|
### Segment Configuration
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
Shows current working directory name.
|
|
168
|
+
<details>
|
|
169
|
+
<summary><strong>Directory</strong> - Shows current working directory name</summary>
|
|
171
170
|
|
|
172
171
|
```json
|
|
173
172
|
"directory": {
|
|
@@ -180,11 +179,10 @@ Shows current working directory name.
|
|
|
180
179
|
|
|
181
180
|
- `showBasename`: Show only folder name instead of full path
|
|
182
181
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
#### Git
|
|
182
|
+
</details>
|
|
186
183
|
|
|
187
|
-
|
|
184
|
+
<details>
|
|
185
|
+
<summary><strong>Git</strong> - Shows branch, status, and repository information</summary>
|
|
188
186
|
|
|
189
187
|
```json
|
|
190
188
|
"git": {
|
|
@@ -215,11 +213,10 @@ Shows branch, status, and repository information.
|
|
|
215
213
|
|
|
216
214
|
- `⎇` Branch • `♯` SHA • `⌂` Tag • `⧇` Stash • `✓` Clean • `●` Dirty • `⚠` Conflicts • `↑3` Ahead • `↓2` Behind • `(+1 ~2 ?3)` Staged/Unstaged/Untracked
|
|
217
215
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
#### Metrics
|
|
216
|
+
</details>
|
|
221
217
|
|
|
222
|
-
|
|
218
|
+
<details>
|
|
219
|
+
<summary><strong>Metrics</strong> - Shows performance analytics from your Claude sessions</summary>
|
|
223
220
|
|
|
224
221
|
```json
|
|
225
222
|
"metrics": {
|
|
@@ -246,11 +243,10 @@ Shows performance analytics from your Claude sessions.
|
|
|
246
243
|
|
|
247
244
|
- `⧖` Total API time • `Δ` Last response • `⧗` Session duration • `⟐` Messages • `+` Lines added • `-` Lines removed
|
|
248
245
|
|
|
249
|
-
|
|
246
|
+
</details>
|
|
250
247
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Shows current Claude model being used.
|
|
248
|
+
<details>
|
|
249
|
+
<summary><strong>Model</strong> - Shows current Claude model being used</summary>
|
|
254
250
|
|
|
255
251
|
```json
|
|
256
252
|
"model": {
|
|
@@ -258,11 +254,10 @@ Shows current Claude model being used.
|
|
|
258
254
|
}
|
|
259
255
|
```
|
|
260
256
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
#### Context
|
|
257
|
+
</details>
|
|
264
258
|
|
|
265
|
-
|
|
259
|
+
<details>
|
|
260
|
+
<summary><strong>Context</strong> - Shows context window usage and auto-compact threshold</summary>
|
|
266
261
|
|
|
267
262
|
```json
|
|
268
263
|
"context": {
|
|
@@ -296,11 +291,10 @@ Configure context window limits for different model types. Defaults to 200K toke
|
|
|
296
291
|
|
|
297
292
|
**Note:** Sonnet 4's 1M context window is currently in beta for tier 4+ users. Set `"sonnet": 1000000` when you have access.
|
|
298
293
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
#### Tmux
|
|
294
|
+
</details>
|
|
302
295
|
|
|
303
|
-
|
|
296
|
+
<details>
|
|
297
|
+
<summary><strong>Tmux</strong> - Shows tmux session name and window info when in tmux</summary>
|
|
304
298
|
|
|
305
299
|
```json
|
|
306
300
|
"tmux": {
|
|
@@ -308,11 +302,10 @@ Shows tmux session name and window info when in tmux.
|
|
|
308
302
|
}
|
|
309
303
|
```
|
|
310
304
|
|
|
311
|
-
|
|
305
|
+
</details>
|
|
312
306
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
Shows Claude Code version.
|
|
307
|
+
<details>
|
|
308
|
+
<summary><strong>Version</strong> - Shows Claude Code version</summary>
|
|
316
309
|
|
|
317
310
|
```json
|
|
318
311
|
"version": {
|
|
@@ -322,11 +315,10 @@ Shows Claude Code version.
|
|
|
322
315
|
|
|
323
316
|
**Display:** `v1.0.81`
|
|
324
317
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
#### Session
|
|
318
|
+
</details>
|
|
328
319
|
|
|
329
|
-
|
|
320
|
+
<details>
|
|
321
|
+
<summary><strong>Session</strong> - Shows real-time usage for current Claude conversation</summary>
|
|
330
322
|
|
|
331
323
|
```json
|
|
332
324
|
"session": {
|
|
@@ -343,11 +335,10 @@ Shows real-time usage for current Claude conversation.
|
|
|
343
335
|
|
|
344
336
|
**Symbols:** `§` Session
|
|
345
337
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
#### Block
|
|
338
|
+
</details>
|
|
349
339
|
|
|
350
|
-
|
|
340
|
+
<details>
|
|
341
|
+
<summary><strong>Block</strong> - Shows usage within current 5-hour billing window (Claude's rate limit period)</summary>
|
|
351
342
|
|
|
352
343
|
```json
|
|
353
344
|
"block": {
|
|
@@ -371,11 +362,10 @@ Shows usage within current 5-hour billing window (Claude\'s rate limit period).
|
|
|
371
362
|
> [!TIP]
|
|
372
363
|
> Claude's rate limits consider multiple factors beyond tokens (message count, length, attachments, model). See [Anthropic's usage documentation](https://support.anthropic.com/en/articles/11014257-about-claude-s-max-plan-usage) for details.
|
|
373
364
|
|
|
374
|
-
|
|
365
|
+
</details>
|
|
375
366
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
Shows total daily usage with budget monitoring.
|
|
367
|
+
<details>
|
|
368
|
+
<summary><strong>Today</strong> - Shows total daily usage with budget monitoring</summary>
|
|
379
369
|
|
|
380
370
|
```json
|
|
381
371
|
"today": {
|
|
@@ -390,6 +380,8 @@ Shows total daily usage with budget monitoring.
|
|
|
390
380
|
|
|
391
381
|
**Symbols:** `☉` Today
|
|
392
382
|
|
|
383
|
+
</details>
|
|
384
|
+
|
|
393
385
|
### Budget Configuration
|
|
394
386
|
|
|
395
387
|
```json
|
|
@@ -438,34 +430,16 @@ Prevent segment cutoff by organizing segments across multiple lines.
|
|
|
438
430
|
> [!NOTE]
|
|
439
431
|
> Claude Code system messages may truncate long status lines. Multi-line layouts prevent segment cutoff and improve readability.
|
|
440
432
|
|
|
441
|
-
###
|
|
433
|
+
### Colors & Themes
|
|
442
434
|
|
|
443
|
-
|
|
435
|
+
Create custom themes and configure color compatibility:
|
|
444
436
|
|
|
445
437
|
```json
|
|
446
438
|
{
|
|
439
|
+
"theme": "custom",
|
|
447
440
|
"display": {
|
|
448
441
|
"colorCompatibility": "auto"
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
- `auto` (default) - Automatic detection
|
|
454
|
-
- `ansi` - 16-color text-only mode
|
|
455
|
-
- `ansi256` - 256-color with backgrounds
|
|
456
|
-
- `truecolor` - 24-bit RGB colors
|
|
457
|
-
|
|
458
|
-
Each theme includes optimized color variants for different terminal capabilities.
|
|
459
|
-
|
|
460
|
-
Respects `NO_COLOR`, `FORCE_COLOR`, and `COLORTERM` environment variables.
|
|
461
|
-
|
|
462
|
-
### Custom Colors
|
|
463
|
-
|
|
464
|
-
Create custom themes by defining segment colors.
|
|
465
|
-
|
|
466
|
-
```json
|
|
467
|
-
{
|
|
468
|
-
"theme": "custom",
|
|
442
|
+
},
|
|
469
443
|
"colors": {
|
|
470
444
|
"custom": {
|
|
471
445
|
"directory": { "bg": "#ff6600", "fg": "#ffffff" },
|
|
@@ -476,47 +450,46 @@ Create custom themes by defining segment colors.
|
|
|
476
450
|
}
|
|
477
451
|
```
|
|
478
452
|
|
|
479
|
-
**Color Options:**
|
|
480
|
-
|
|
481
|
-
- `bg`: Background color (hex, `transparent`, or `none`)
|
|
482
|
-
- `fg`: Foreground/text color (hex)
|
|
453
|
+
**Color Options:** `bg` (hex, `transparent`, `none`) • `fg` (hex)
|
|
483
454
|
|
|
484
|
-
|
|
485
|
-
> Copy existing theme colors from `src/themes/` in the repository as a starting point.
|
|
455
|
+
**Compatibility Modes:** `auto` (default), `ansi`, `ansi256`, `truecolor`. Respects `NO_COLOR`, `FORCE_COLOR`, and `COLORTERM` environment variables.
|
|
486
456
|
|
|
487
457
|
## Performance
|
|
488
458
|
|
|
489
|
-
|
|
490
|
-
• **~240ms** full-featured
|
|
459
|
+
Execution times for different configurations:
|
|
491
460
|
|
|
492
|
-
**
|
|
461
|
+
- **~80ms** default config (`directory`, `git`, `model`, `session`, `today`, `context`)
|
|
462
|
+
- **~240ms** full-featured (all segments enabled)
|
|
493
463
|
|
|
494
|
-
|
|
464
|
+
<details>
|
|
465
|
+
<summary><strong>Detailed Segment Timings</strong></summary>
|
|
495
466
|
|
|
496
|
-
| Segment
|
|
497
|
-
|
|
498
|
-
| `directory` | ~40ms
|
|
499
|
-
| `model`
|
|
500
|
-
| `session`
|
|
501
|
-
| `context`
|
|
502
|
-
| `metrics`
|
|
503
|
-
| `git`
|
|
504
|
-
| `tmux`
|
|
505
|
-
| `block`
|
|
506
|
-
| `today`
|
|
507
|
-
| `version`
|
|
467
|
+
| Segment | Timing | Notes |
|
|
468
|
+
|---------|--------|-------|
|
|
469
|
+
| `directory` | ~40ms | No external commands |
|
|
470
|
+
| `model` | ~40ms | Uses hook data |
|
|
471
|
+
| `session` | ~40ms | Minimal transcript parsing |
|
|
472
|
+
| `context` | ~40ms | Hook data calculation |
|
|
473
|
+
| `metrics` | ~40ms | Transcript analysis |
|
|
474
|
+
| `git` | ~60ms | No caching for fresh data |
|
|
475
|
+
| `tmux` | ~50ms | Environment check + command |
|
|
476
|
+
| `block` | ~180ms | 5-hour window transcript load |
|
|
477
|
+
| `today` | ~250ms | Full daily transcript load (cached: ~50ms) |
|
|
478
|
+
| `version` | ~40ms | Uses hook data |
|
|
508
479
|
|
|
509
|
-
|
|
510
|
-
• Disable unused segments
|
|
511
|
-
• **Cache cleanup:** Remove `~/.claude/powerline/` to clear usage cache if needed
|
|
480
|
+
**Benchmark:** `npm run benchmark:timing`
|
|
512
481
|
|
|
513
|
-
|
|
482
|
+
</details>
|
|
514
483
|
|
|
515
|
-
|
|
484
|
+
### Optimization Tips
|
|
516
485
|
|
|
517
|
-
|
|
486
|
+
- **Global install:** `npm install -g` to avoid npx overhead
|
|
487
|
+
- **Disable unused segments** for faster execution
|
|
488
|
+
- **Cache cleanup:** Remove `~/.claude/powerline/` if needed
|
|
518
489
|
|
|
519
|
-
|
|
490
|
+
## Custom Segments
|
|
491
|
+
|
|
492
|
+
Extend the statusline using shell composition:
|
|
520
493
|
|
|
521
494
|
```json
|
|
522
495
|
{
|
|
@@ -528,27 +501,8 @@ Add custom segments using shell commands:
|
|
|
528
501
|
}
|
|
529
502
|
```
|
|
530
503
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
Use `tput` for terminal-compatible colors:
|
|
534
|
-
|
|
535
|
-
```bash
|
|
536
|
-
echo "$(tput setab 4)$(tput setaf 15) ⏱ $(date +%H:%M) $(tput sgr0)"
|
|
537
|
-
# setab: background (1-7) | setaf: foreground (0-15) | sgr0: reset
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
### Advanced Script
|
|
541
|
-
|
|
542
|
-
Create `~/.local/bin/my-statusline` for complex extensions:
|
|
543
|
-
|
|
544
|
-
```bash
|
|
545
|
-
#!/bin/bash
|
|
546
|
-
npx -y @owloops/claude-powerline
|
|
547
|
-
echo "$(tput setab 6)$(tput setaf 0) ⏱ $(date +%H:%M) $(tput sgr0)"
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
> [!TIP]
|
|
551
|
-
> Shell composition provides unlimited flexibility while keeping the core package secure.
|
|
504
|
+
> [!NOTE]
|
|
505
|
+
> Use `tput` for colors: `setab <bg>` (background), `setaf <fg>` (foreground), `sgr0` (reset). Example: `echo "$(tput setab 4)$(tput setaf 15) text $(tput sgr0)"`. For complex logic, create a shell script with multiple commands, conditions, and variables.
|
|
552
506
|
|
|
553
507
|
## Contributing
|
|
554
508
|
|
|
@@ -556,10 +510,6 @@ Contributions are welcome! Please feel free to submit issues or pull requests.
|
|
|
556
510
|
|
|
557
511
|
See [CONTRIBUTORS.md](CONTRIBUTORS.md) for people who have contributed outside of GitHub PRs.
|
|
558
512
|
|
|
559
|
-
### Library Usage
|
|
560
|
-
|
|
561
|
-
Claude-powerline is designed as a CLI tool for Claude Code statuslines. While the codebase contains reusable components like `PricingService` and `PowerlineRenderer`, we currently focus on the CLI use case to keep the project simple and maintainable.
|
|
562
|
-
|
|
563
513
|
## License
|
|
564
514
|
|
|
565
515
|
This project is licensed under the [MIT License](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owloops/claude-powerline",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "Beautiful vim-style powerline statusline for Claude Code with real-time usage tracking, git integration, and custom themes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|