ccstatusline-usage 2.1.16 → 2.1.18

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 (3) hide show
  1. package/README.md +87 -32
  2. package/dist/ccstatusline.js +45679 -35889
  3. package/package.json +8 -6
package/README.md CHANGED
@@ -64,6 +64,12 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
64
64
 
65
65
  ## 🆕 Recent Updates
66
66
 
67
+ ### [v2.1.17](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.17) - Upstream sync + 1M context display
68
+
69
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Upstream sync** — Merged 46 upstream commits: new widgets (Skills, ThinkingEffort, InputSpeed, OutputSpeed, TotalSpeed, Link, GitInsertions, GitDeletions, WeeklyResetTimer), CI pipeline, Dependabot, --config flag, --hook mode, usage API proxy support, 429 backoff, CoercedNumberSchema
70
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **1M context display** — Context bar now shows `68k/1M` instead of `68k/1000k` for 1M context models
71
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Keychain file fallback** — On macOS, usage widget falls back to `~/.claude/.credentials.json` when Keychain is unavailable (tmux/SSH sessions)
72
+
67
73
  ### [v2.1.16](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.16) - Show [1m] suffix on model widget for 1M context models
68
74
 
69
75
  - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **1M context indicator** — Model widget now appends `[1m]` when a 1M context model is active, both in full (`Model: claude-sonnet-4-6 [1m]`) and compact (`M: s4.6[1m]`) display modes
@@ -106,6 +112,31 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
106
112
 
107
113
  - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Upstream sync** — merged 9 upstream commits: Session Name widget, Git Root Dir widget, CWD home abbreviation, block timer caching, git widget refactor, Windows UTF-8 fix, widget picker UX, TUI editor input fix
108
114
 
115
+ ### v2.2.0 - v2.2.4 - Token Speed + Skills widget updates
116
+
117
+ - **🚀 New Token Speed widgets** - Added three widgets: **Input Speed**, **Output Speed**, and **Total Speed**.
118
+ - Each speed widget supports a configurable window of `0-120` seconds in the widget editor (`w` key).
119
+ - `0` disables window mode and uses a full-session average speed.
120
+ - `1-120` calculates recent speed over the selected rolling window.
121
+ - **🧩 New Skills widget controls (v2.2.1)** - Added configurable Skills modes (last/count/list), optional hide-when-empty behavior, and list-size limiting with most-recent-first ordering.
122
+ - **🌐 Usage API proxy support (v2.2.2)** - Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
123
+ - **🧠 New Thinking Effort widget (v2.2.4)** - Added a widget that shows the current Claude Code thinking effort level.
124
+ - **🤝 Better subagent-aware speed reporting** - Token speed calculations continue to include referenced subagent activity so displayed speeds better reflect actual concurrent work.
125
+
126
+ ### v2.1.0 - v2.1.10 - Usage widgets, links, new git insertions / deletions widgets, and reliability fixes
127
+
128
+ - **🧩 New Usage widgets (v2.1.0)** - Added **Session Usage**, **Weekly Usage**, **Block Reset Timer**, and **Context Bar** widgets.
129
+ - **📊 More accurate counts (v2.1.0)** - Usage/context widgets now use new statusline JSON metrics when available for more accurate token and context counts.
130
+ - **🪟 Windows empty file bug fix (v2.1.1)** - Fixed a Windows issue that could create an empty `c:\dev\null` file.
131
+ - **🔗 New Link widget (v2.1.3)** - Added a new **Link** widget with clickable OSC8 rendering, preview parity, and raw mode support.
132
+ - **➕ New Git Insertions widget (v2.1.4)** - Added a dedicated Git widget that shows only uncommitted insertions (e.g., `+42`).
133
+ - **➖ New Git Deletions widget (v2.1.4)** - Added a dedicated Git widget that shows only uncommitted deletions (e.g., `-10`).
134
+ - **🧠 Context format fallback fix (v2.1.6)** - When `context_window_size` is missing, context widgets now infer 1M models from long-context labels such as `[1m]` and `1M context` in model identifiers.
135
+ - **⏳ Weekly reset timer split (v2.1.7)** - Added a separate `Weekly Reset Timer` widget.
136
+ - **⚙️ Custom config file flag (v2.1.8)** - Added `--config <path>` support so ccstatusline can load/save settings from a custom file location.
137
+ - **🔣 Unicode separator hex input upgrade (v2.1.9)** - Powerline separator hex input now supports 4-6 digits (full Unicode code points up to `U+10FFFF`).
138
+ - **🌳 Bare repo worktree detection fix (v2.1.10)** - `Git Worktree` now correctly detects linked worktrees created from bare repositories.
139
+
109
140
  ### v2.0.26 - v2.0.29 - Performance, git internals, and workflow improvements
110
141
 
111
142
  - **🧠 Memory Usage widget (v2.0.29)** - Added a new widget that shows current system memory usage (`Mem: used/total`).
@@ -128,7 +159,7 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
128
159
 
129
160
  ### v2.0.14 - Add remaining mode toggle to Context Percentage widgets
130
161
 
131
- - **Remaining Mode** - You can now toggle the Context Percentage widgets between usage percentage and remaining percentage when configuring them in the TUI by pressing the 'l' key.
162
+ - **Remaining Mode** - You can now toggle the Context Percentage widgets between usage percentage and remaining percentage when configuring them in the TUI by pressing the 'u' key.
132
163
 
133
164
  ### v2.0.12 - Custom Text widget now supports emojis
134
165
 
@@ -242,6 +273,8 @@ The interactive configuration tool provides a terminal UI where you can:
242
273
  > $env:CLAUDE_CONFIG_DIR="C:\custom\path\.claude"
243
274
  > ```
244
275
 
276
+ > 🌐 **Usage API proxy:** Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
277
+
245
278
  ### Claude Code settings.json format
246
279
 
247
280
  When you install from the TUI, ccstatusline writes a `statusLine` command object to your Claude Code settings:
@@ -464,36 +497,45 @@ bun run example
464
497
 
465
498
  ### 📊 Available Widgets
466
499
 
467
- - **Model Name** - Shows the current Claude model (e.g., "Claude 3.5 Sonnet")
468
- - **Git Branch** - Displays current git branch name
469
- - **Git Changes** - Shows uncommitted insertions/deletions (e.g., "+42,-10")
500
+ - **Model** - Displays the Claude model name (e.g., "Claude 3.5 Sonnet")
501
+ - **Output Style** - Shows the current Claude Code output style
502
+ - **Git Branch** - Shows the current git branch name
503
+ - **Git Changes** - Shows git changes count (`+insertions`, `-deletions`)
504
+ - **Git Insertions** - Shows git insertions count
505
+ - **Git Deletions** - Shows git deletions count
470
506
  - **Git Root Dir** - Shows the git repository root directory name
471
- - **Git Worktree** - Shows the name of the current git worktree
472
- - **Session Clock** - Shows elapsed time since session start (e.g., "2hr 15m")
473
- - **Session Cost** - Shows total session cost in USD (e.g., "$1.23")
474
- - **Session Name** - Shows the session name set via `/rename` command in Claude Code
475
- - **Block Timer** - Shows time elapsed in current 5-hour block or progress bar
476
- - **Current Working Directory** - Shows current working directory with segment limit, fish-style abbreviation, and optional `~` home abbreviation
477
- - **Version** - Shows Claude Code version
478
- - **Output Style** - Shows the currently set output style in Claude Code
479
- - **Tokens Input** - Shows input tokens used
480
- - **Tokens Output** - Shows output tokens used
481
- - **Tokens Cached** - Shows cached tokens used
482
- - **Tokens Total** - Shows total tokens used
483
- - **Context Length** - Shows current context length in tokens
484
- - **Context Percentage** - Shows percentage of context limit used (dynamic: 1M for model IDs with `[1m]` suffix, 200k otherwise)
485
- - **Context Percentage (usable)** - Shows percentage of usable context (dynamic: 800k for model IDs with `[1m]` suffix, 160k otherwise, accounting for auto-compact at 80%)
486
- - **Terminal Width** - Shows detected terminal width (for debugging)
487
- - **Memory Usage** - Shows system memory usage (used/total, e.g., "Mem: 12.4G/16.0G")
488
- - **Battery** - Shows battery percentage on macOS and Linux (only visible when on battery power, hidden when charging)
489
- - **Claude Session ID** - Shows the current Claude Code session ID (compact: 8-char truncation)
490
- - **Session Usage** *(ccstatusline-usage)* - Shows 5-hour session API utilization as a progress bar (e.g., "Session: [███░░░░░░░░░░░░] 20%")
491
- - **Weekly Usage** *(ccstatusline-usage)* - Shows 7-day API utilization as a progress bar (e.g., "Weekly: [██░░░░░░░░░░░░░] 12%")
492
- - **Reset Timer** *(ccstatusline-usage)* - Shows time until session limit resets (e.g., "4:30 hr"), or extra usage spending when weekly budget is exhausted
493
- - **Context Bar** *(ccstatusline-usage)* - Shows context window usage as a progress bar (e.g., "Context: [████░░░░░░░░░░░] 50k/200k (25%)")
494
- - **Custom Text** - Add your own custom text to the status line
495
- - **Custom Command** - Execute shell commands and display their output (refreshes whenever the statusline is updated by Claude Code)
496
- - **Separator** - Visual divider between widgets (customizable: |, -, comma, space; available when Powerline mode is off and no default separator is configured)
507
+ - **Git Worktree** - Shows the current git worktree name
508
+ - **Current Working Dir** - Shows current working directory with segment limit, fish-style abbreviation, and optional `~` home abbreviation
509
+ - **Tokens Input** - Shows input token count for the current session
510
+ - **Tokens Output** - Shows output token count for the current session
511
+ - **Tokens Cached** - Shows cached token count for the current session
512
+ - **Tokens Total** - Shows total token count (`input + output + cache`) for the current session
513
+ - **Input Speed** - Shows session-average input token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
514
+ - **Output Speed** - Shows session-average output token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
515
+ - **Total Speed** - Shows session-average total token speed (`tokens/sec`) with optional per-widget window (`0-120` seconds; `0` = full-session average)
516
+ - **Context Length** - Shows the current context window size in tokens
517
+ - **Context %** - Shows percentage of context window used or remaining
518
+ - **Context % (usable)** - Shows percentage of usable context used or remaining (80% of max before auto-compact)
519
+ - **Session Clock** - Shows elapsed time since current session started
520
+ - **Session Cost** - Shows the total session cost in USD
521
+ - **Block Timer** - Shows current 5-hour block elapsed time or progress
522
+ - **Terminal Width** - Shows current terminal width in columns
523
+ - **Version** - Shows Claude Code CLI version number
524
+ - **Custom Text** - Displays user-defined custom text
525
+ - **Custom Command** - Executes a custom shell command and displays output (refreshes whenever Claude Code updates the status line)
526
+ - **Link** - Displays a clickable terminal hyperlink using OSC 8
527
+ - **Claude Session ID** - Shows the current Claude Code session ID from status JSON
528
+ - **Session Name** - Shows the session name set via `/rename` in Claude Code
529
+ - **Memory Usage** - Shows system memory usage (used/total)
530
+ - **Battery** *(ccstatusline-usage)* - Shows battery percentage on macOS and Linux (only visible when on battery power, hidden when charging)
531
+ - **Session Usage** - Shows daily/session API usage percentage
532
+ - **Weekly Usage** - Shows weekly API usage percentage
533
+ - **Block Reset Timer** - Shows time remaining until current 5-hour block reset window
534
+ - **Weekly Reset Timer** - Shows time remaining until weekly usage reset
535
+ - **Context Bar** - Shows context usage as a progress bar with short/full display modes
536
+ - **Skills** - Shows skill activity as last used, total count, or unique list (with optional list limit and hide-when-empty toggle)
537
+ - **Thinking Effort** - Shows the current Claude Code thinking effort level
538
+ - **Separator** - Visual divider between widgets (available when Powerline mode is off and no default separator is configured)
497
539
  - **Flex Separator** - Expands to fill available space (available when Powerline mode is off)
498
540
 
499
541
  ---
@@ -576,10 +618,13 @@ Common controls in the line editor:
576
618
 
577
619
  Widget-specific shortcuts:
578
620
  - **Git widgets**: `h` toggle hide `no git` output
579
- - **Context % widgets**: `l` toggle used vs remaining display
621
+ - **Context % widgets**: `u` toggle used vs remaining display
580
622
  - **Block Timer**: `p` cycle display mode (time/full bar/short bar)
623
+ - **Block Reset Timer**: `p` cycle display mode (time/full bar/short bar)
624
+ - **Weekly Reset Timer**: `p` cycle display mode (time/full bar/short bar)
581
625
  - **Current Working Dir**: `h` home abbreviation, `s` segment editor, `f` fish-style path
582
626
  - **Custom Command**: `e` command, `w` max width, `t` timeout, `p` preserve ANSI colors
627
+ - **Link**: `u` URL, `e` link text
583
628
 
584
629
  ---
585
630
 
@@ -611,6 +656,12 @@ Execute shell commands and display their output dynamically:
611
656
 
612
657
  > 💡 **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.
613
658
 
659
+ #### Link Widget
660
+ Create clickable links in terminals that support OSC 8 hyperlinks:
661
+ - `metadata.url` - target URL (http/https)
662
+ - `metadata.text` - optional display text (defaults to URL)
663
+ - Falls back to plain text when URL is missing or unsupported
664
+
614
665
  ---
615
666
 
616
667
  ### 🔗 Integration Example: ccusage
@@ -629,6 +680,7 @@ Execute shell commands and display their output dynamically:
629
680
  ### ✂️ Smart Truncation
630
681
 
631
682
  When terminal width is detected, status lines automatically truncate with ellipsis (...) if they exceed the available width, preventing line wrapping.
683
+ Truncation is ANSI/OSC-aware, so preserved color output and OSC 8 hyperlinks remain well-formed.
632
684
 
633
685
  ---
634
686
 
@@ -695,9 +747,12 @@ bun run example
695
747
  # Run tests
696
748
  bun test
697
749
 
698
- # Run typecheck + eslint autofix
750
+ # Run typecheck + eslint checks without modifying files
699
751
  bun run lint
700
752
 
753
+ # Apply ESLint auto-fixes intentionally
754
+ bun run lint:fix
755
+
701
756
  # Build for distribution
702
757
  bun run build
703
758