ccstatusline-usage 2.0.26 → 2.0.28
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 +18 -8
- package/dist/ccstatusline.js +17 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
|
|
|
42
42
|
|
|
43
43
|
To use the enhanced configuration, copy `defaults/settings-enhanced.json` to your config directory.
|
|
44
44
|
|
|
45
|
-

|
|
46
46
|
|
|
47
47
|
</div>
|
|
48
48
|
|
|
@@ -77,7 +77,7 @@ To use the enhanced configuration, copy `defaults/settings-enhanced.json` to you
|
|
|
77
77
|
|
|
78
78
|
- **👾 Emoji Support** - You can now paste emoji into the custom text widget. You can also turn on the merge option to get emoji labels for your widgets like this:
|
|
79
79
|
|
|
80
|
-

|
|
81
81
|
|
|
82
82
|
### v2.0.11 - Unlimited Status Lines
|
|
83
83
|
|
|
@@ -90,13 +90,13 @@ To use the enhanced configuration, copy `defaults/settings-enhanced.json` to you
|
|
|
90
90
|
|
|
91
91
|
### v2.0.8 - Powerline Auto-Alignment
|
|
92
92
|
|
|
93
|
-

|
|
94
94
|
|
|
95
95
|
- **🎯 Widget Alignment** - Auto-align widgets across multiple status lines in Powerline mode for a clean, columnar layout (toggle with 'a' in Powerline Setup)
|
|
96
96
|
|
|
97
97
|
### v2.0.7 - Current Working Directory & Session Cost
|
|
98
98
|
|
|
99
|
-

|
|
100
100
|
|
|
101
101
|
- **📁 Current Working Directory** - Display the current working directory with configurable segment display
|
|
102
102
|
- Set the number of path segments to show (e.g., show only last 2 segments: `.../Personal/ccstatusline`)
|
|
@@ -114,7 +114,7 @@ To use the enhanced configuration, copy `defaults/settings-enhanced.json` to you
|
|
|
114
114
|
|
|
115
115
|
### v2.0.2 - Block Timer Widget
|
|
116
116
|
|
|
117
|
-

|
|
118
118
|
|
|
119
119
|
- **⏱️ Block Timer** - Track your progress through 5-hour Claude Code blocks
|
|
120
120
|
- Displays time elapsed in current block as hours/minutes (e.g., "3hr 45m")
|
|
@@ -136,6 +136,8 @@ To use the enhanced configuration, copy `defaults/settings-enhanced.json` to you
|
|
|
136
136
|
## ✨ Features
|
|
137
137
|
|
|
138
138
|
- **📊 Real-time Metrics** - Display model name, git branch, token usage, session duration, block timer, and more
|
|
139
|
+
- **📈 API Usage Tracking** - Real-time 5-hour session and weekly utilization from Anthropic API with progress bars
|
|
140
|
+
- **⏱️ Reset Timer** - Countdown to when your 5-hour session window resets
|
|
139
141
|
- **🎨 Fully Customizable** - Choose what to display and customize colors for each element
|
|
140
142
|
- **⚡ Powerline Support** - Beautiful Powerline-style rendering with arrow separators, caps, and custom fonts
|
|
141
143
|
- **📐 Multi-line Support** - Configure multiple independent status lines
|
|
@@ -366,7 +368,15 @@ Once configured, ccstatusline automatically formats your Claude Code status line
|
|
|
366
368
|
|
|
367
369
|
### 📊 Available Widgets
|
|
368
370
|
|
|
371
|
+
#### API Usage Widgets (Fork Enhancement)
|
|
372
|
+
- **Session Usage** - 5-hour session utilization with progress bar (e.g., "Session: [████░░░░░░░░░░░] 29.0%")
|
|
373
|
+
- **Weekly Usage** - 7-day utilization with progress bar (e.g., "Weekly: [█░░░░░░░░░░░░░░] 7.0%")
|
|
374
|
+
- **Reset Timer** - Time until 5-hour session window resets (e.g., "2:59 hr")
|
|
375
|
+
- **Context Bar** - Visual context window usage with bar (e.g., "Context: [███████░░░░░░░░] 103k/200k (51%)")
|
|
376
|
+
|
|
377
|
+
#### Standard Widgets
|
|
369
378
|
- **Model Name** - Shows the current Claude model (e.g., "Claude 3.5 Sonnet")
|
|
379
|
+
- **Claude Session ID** - Shows the current session UUID
|
|
370
380
|
- **Git Branch** - Displays current git branch name
|
|
371
381
|
- **Git Changes** - Shows uncommitted insertions/deletions (e.g., "+42,-10")
|
|
372
382
|
- **Git Worktree** - Shows the name of the current git worktree
|
|
@@ -403,7 +413,7 @@ These settings affect where long lines are truncated, and where right-alignment
|
|
|
403
413
|
|
|
404
414
|
Configure global formatting preferences that apply to all widgets:
|
|
405
415
|
|
|
406
|
-

|
|
407
417
|
|
|
408
418
|
#### Default Padding & Separators
|
|
409
419
|
- **Default Padding** - Add consistent padding to the left and right of each widget
|
|
@@ -435,7 +445,7 @@ Configure global formatting preferences that apply to all widgets:
|
|
|
435
445
|
|
|
436
446
|
The Block Timer widget helps you track your progress through Claude Code's 5-hour conversation blocks:
|
|
437
447
|
|
|
438
|
-

|
|
439
449
|
|
|
440
450
|
**Display Modes:**
|
|
441
451
|
- **Time Display** - Shows elapsed time as "3hr 45m" (default)
|
|
@@ -496,7 +506,7 @@ Execute shell commands and display their output dynamically:
|
|
|
496
506
|
3. Set timeout: `5000` (5 seconds for initial download)
|
|
497
507
|
4. Enable "preserve colors" to keep ccusage's color formatting
|
|
498
508
|
|
|
499
|
-

|
|
500
510
|
|
|
501
511
|
> 📄 **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.
|
|
502
512
|
|
package/dist/ccstatusline.js
CHANGED
|
@@ -50982,13 +50982,19 @@ var SettingsSchema = exports_external.object({
|
|
|
50982
50982
|
version: exports_external.number().default(CURRENT_VERSION),
|
|
50983
50983
|
lines: exports_external.array(exports_external.array(WidgetItemSchema)).min(1).default([
|
|
50984
50984
|
[
|
|
50985
|
-
{ id: "model", type: "model", color: "
|
|
50985
|
+
{ id: "model", type: "model", color: "magenta" },
|
|
50986
50986
|
{ id: "sep1", type: "separator" },
|
|
50987
50987
|
{ id: "context", type: "context-percentage", color: "blue" },
|
|
50988
50988
|
{ id: "sep2", type: "separator" },
|
|
50989
|
-
{ id: "session-
|
|
50989
|
+
{ id: "session-clock", type: "session-clock", color: "yellow" },
|
|
50990
|
+
{ id: "sep3", type: "separator" },
|
|
50991
|
+
{ id: "session-id", type: "claude-session-id", color: "cyan" }
|
|
50992
|
+
],
|
|
50993
|
+
[
|
|
50994
|
+
{ id: "git-branch", type: "git-branch", color: "green" },
|
|
50995
|
+
{ id: "sep4", type: "separator" },
|
|
50996
|
+
{ id: "git-changes", type: "git-changes", color: "yellow" }
|
|
50990
50997
|
],
|
|
50991
|
-
[],
|
|
50992
50998
|
[]
|
|
50993
50999
|
]),
|
|
50994
51000
|
flexMode: FlexModeSchema.default("full-minus-40"),
|
|
@@ -51444,7 +51450,7 @@ import { execSync as execSync3 } from "child_process";
|
|
|
51444
51450
|
import * as fs5 from "fs";
|
|
51445
51451
|
import * as path4 from "path";
|
|
51446
51452
|
var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils";
|
|
51447
|
-
var PACKAGE_VERSION = "2.0.
|
|
51453
|
+
var PACKAGE_VERSION = "2.0.28";
|
|
51448
51454
|
function getPackageVersion() {
|
|
51449
51455
|
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
51450
51456
|
return PACKAGE_VERSION;
|
|
@@ -58214,9 +58220,9 @@ var StatusJSONSchema = exports_external.looseObject({
|
|
|
58214
58220
|
total_lines_removed: exports_external.number().optional()
|
|
58215
58221
|
}).optional(),
|
|
58216
58222
|
context_window: exports_external.object({
|
|
58217
|
-
context_window_size: exports_external.number().optional(),
|
|
58218
|
-
total_input_tokens: exports_external.number().optional(),
|
|
58219
|
-
total_output_tokens: exports_external.number().optional(),
|
|
58223
|
+
context_window_size: exports_external.number().nullable().optional(),
|
|
58224
|
+
total_input_tokens: exports_external.number().nullable().optional(),
|
|
58225
|
+
total_output_tokens: exports_external.number().nullable().optional(),
|
|
58220
58226
|
current_usage: exports_external.union([
|
|
58221
58227
|
exports_external.number(),
|
|
58222
58228
|
exports_external.object({
|
|
@@ -58225,10 +58231,10 @@ var StatusJSONSchema = exports_external.looseObject({
|
|
|
58225
58231
|
cache_creation_input_tokens: exports_external.number().optional(),
|
|
58226
58232
|
cache_read_input_tokens: exports_external.number().optional()
|
|
58227
58233
|
})
|
|
58228
|
-
]).optional(),
|
|
58229
|
-
used_percentage: exports_external.number().optional(),
|
|
58230
|
-
remaining_percentage: exports_external.number().optional()
|
|
58231
|
-
}).optional()
|
|
58234
|
+
]).nullable().optional(),
|
|
58235
|
+
used_percentage: exports_external.number().nullable().optional(),
|
|
58236
|
+
remaining_percentage: exports_external.number().nullable().optional()
|
|
58237
|
+
}).nullable().optional()
|
|
58232
58238
|
});
|
|
58233
58239
|
|
|
58234
58240
|
// src/utils/jsonl.ts
|