@owloops/claude-powerline 1.9.6 → 1.9.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.
Files changed (2) hide show
  1. package/README.md +70 -120
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -153,7 +153,7 @@ export CLAUDE_POWERLINE_DEBUG=1 # Enable debug logging
153
153
  curl -o ~/.claude/claude-powerline.json https://raw.githubusercontent.com/Owloops/claude-powerline/main/.claude-powerline.json
154
154
  ```
155
155
 
156
- **Config locations** (first found wins):
156
+ **Config locations** (in priority order):
157
157
 
158
158
  - `./.claude-powerline.json` - Project-specific
159
159
  - `~/.claude/claude-powerline.json` - User config
@@ -165,9 +165,8 @@ Config files reload automatically and no restart needed.
165
165
 
166
166
  ### Segment Configuration
167
167
 
168
- #### Directory
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
- Shows branch, status, and repository information.
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
- ---
216
+ </details>
219
217
 
220
- #### Metrics
221
-
222
- Shows performance analytics from your Claude sessions.
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
- ---
250
-
251
- #### Model
246
+ </details>
252
247
 
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
- ---
257
+ </details>
262
258
 
263
- #### Context
264
-
265
- Shows context window usage and auto-compact threshold.
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
- Shows tmux session name and window info when in tmux.
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,12 @@ Shows tmux session name and window info when in tmux.
308
302
  }
309
303
  ```
310
304
 
311
- ---
305
+ **Display:** `tmux:session-name`
312
306
 
313
- #### Version
307
+ </details>
314
308
 
315
- Shows Claude Code version.
309
+ <details>
310
+ <summary><strong>Version</strong> - Shows Claude Code version</summary>
316
311
 
317
312
  ```json
318
313
  "version": {
@@ -322,11 +317,10 @@ Shows Claude Code version.
322
317
 
323
318
  **Display:** `v1.0.81`
324
319
 
325
- ---
326
-
327
- #### Session
320
+ </details>
328
321
 
329
- Shows real-time usage for current Claude conversation.
322
+ <details>
323
+ <summary><strong>Session</strong> - Shows real-time usage for current Claude conversation</summary>
330
324
 
331
325
  ```json
332
326
  "session": {
@@ -343,11 +337,10 @@ Shows real-time usage for current Claude conversation.
343
337
 
344
338
  **Symbols:** `§` Session
345
339
 
346
- ---
340
+ </details>
347
341
 
348
- #### Block
349
-
350
- Shows usage within current 5-hour billing window (Claude\'s rate limit period).
342
+ <details>
343
+ <summary><strong>Block</strong> - Shows usage within current 5-hour billing window (Claude's rate limit period)</summary>
351
344
 
352
345
  ```json
353
346
  "block": {
@@ -364,18 +357,12 @@ Shows usage within current 5-hour billing window (Claude\'s rate limit period).
364
357
 
365
358
  **Weighted Tokens:** Opus tokens count 5x toward rate limits compared to Sonnet/Haiku tokens
366
359
 
367
- **Rate Limit Indicators:** `25%` Normal • `+75%` Moderate (50-79%) • `!85%` Warning (80%+)
368
-
369
360
  **Symbols:** `◱` Block
370
361
 
371
- > [!TIP]
372
- > 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
-
374
- ---
375
-
376
- #### Today
362
+ </details>
377
363
 
378
- Shows total daily usage with budget monitoring.
364
+ <details>
365
+ <summary><strong>Today</strong> - Shows total daily usage with budget monitoring</summary>
379
366
 
380
367
  ```json
381
368
  "today": {
@@ -390,6 +377,8 @@ Shows total daily usage with budget monitoring.
390
377
 
391
378
  **Symbols:** `☉` Today
392
379
 
380
+ </details>
381
+
393
382
  ### Budget Configuration
394
383
 
395
384
  ```json
@@ -408,6 +397,9 @@ Shows total daily usage with budget monitoring.
408
397
 
409
398
  **Indicators:** `25%` Normal • `+75%` Moderate (50-79%) • `!85%` Warning (80%+)
410
399
 
400
+ > [!TIP]
401
+ > 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.
402
+
411
403
  ### Multi-line Layout
412
404
 
413
405
  Prevent segment cutoff by organizing segments across multiple lines.
@@ -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
- ### Color Compatibility
433
+ ### Colors & Themes
442
434
 
443
- Automatically detects terminal color capabilities for optimal display.
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
- > [!TIP]
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
- **~80ms** default config (`directory`, `git`, `model`, `session`, `today`, `context`)
490
- • **~240ms** full-featured
459
+ Execution times for different configurations:
491
460
 
492
- **Benchmark Tool:**
461
+ - **~80ms** default config (`directory`, `git`, `model`, `session`, `today`, `context`)
462
+ - **~240ms** full-featured (all segments enabled)
493
463
 
494
- - `npm run benchmark:timing` - Execution timing tests
464
+ <details>
465
+ <summary><strong>Detailed Segment Timings</strong></summary>
495
466
 
496
- | Segment | Timing | Notes |
497
- |-------------|-----------|--------------------------------|
498
- | `directory` | ~40ms | No external commands |
499
- | `model` | ~40ms | Uses hook data |
500
- | `session` | ~40ms | Minimal transcript parsing |
501
- | `context` | ~40ms | Hook data calculation |
502
- | `metrics` | ~40ms | Transcript analysis |
503
- | `git` | ~60ms | No caching for fresh data |
504
- | `tmux` | ~50ms | Environment check + command |
505
- | `block` | ~180ms | 5-hour window transcript load |
506
- | `today` | ~250ms | Full daily transcript load (cached: ~50ms) |
507
- | `version` | ~40ms | Uses hook data |
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
- **Tips:** Install globally (`npm install -g`) to avoid npx overhead
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
- ## Custom Segments
482
+ </details>
483
+
484
+ ### Optimization Tips
514
485
 
515
- Extend the statusline using shell composition for unlimited flexibility.
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
516
489
 
517
- ### Simple Addition
490
+ ## Custom Segments
518
491
 
519
- Add custom segments using shell commands:
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
- ### With Colors
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.6",
3
+ "version": "1.9.8",
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",