@owloops/claude-powerline 1.5.0 → 1.5.2

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 CHANGED
@@ -121,15 +121,15 @@ Options are specified by command line flags. Overall configuration can also use
121
121
 
122
122
  ## Command Line Options
123
123
 
124
- | Option | Values | Description |
125
- |--------|--------|-------------|
126
- | `--theme` | `dark` (default), `light`, `nord`, `tokyo-night`, `rose-pine`, `custom` | Set color theme |
127
- | `--style` | `minimal` (default), `powerline` | Set separator style |
128
- | `--usage` | `cost`, `tokens`, `both`, `breakdown` | Set usage display format |
129
- | `--session-budget` | `AMOUNT` | Set session budget limit in USD |
130
- | `--config` | `PATH` | Use custom config file path |
131
- | `--install-fonts` | - | Install powerline fonts to system |
132
- | `-h, --help` | - | Show help message |
124
+ | Option | Values | Description |
125
+ | ------------------ | ----------------------------------------------------------------------- | --------------------------------- |
126
+ | `--theme` | `dark` (default), `light`, `nord`, `tokyo-night`, `rose-pine`, `custom` | Set color theme |
127
+ | `--style` | `minimal` (default), `powerline` | Set separator style |
128
+ | `--usage` | `cost`, `tokens`, `both`, `breakdown` | Set usage display format |
129
+ | `--session-budget` | `AMOUNT` | Set session budget limit in USD |
130
+ | `--config` | `PATH` | Use custom config file path |
131
+ | `--install-fonts` | - | Install powerline fonts to system |
132
+ | `-h, --help` | - | Show help message |
133
133
 
134
134
  > [!NOTE]
135
135
  > Global options have CLI flags and environment variables. Individual segments are configured through config files.
@@ -173,8 +173,21 @@ claude-powerline --session-budget=50
173
173
 
174
174
  ### Status Indicators
175
175
 
176
+ #### Symbols
177
+
178
+ - **Session**: `§` Section sign for session costs
179
+ - **Block**: `◱` Clock symbol for 5-hour blocks
180
+ - **Today**: `☉` Sun symbol for daily usage
181
+ - **Git Branch**: `⎇` Branch symbol
182
+ - **Git Tag**: `⌂` House/tag symbol
183
+ - **Git SHA**: `♯` Hash symbol
184
+ - **Git Stash**: `⧇` Double square symbol
185
+ - **Metrics Delta**: `Δ` Delta for last response time
186
+
187
+ #### Status States
188
+
176
189
  - **Git**: `✓` Clean, `●` Dirty, `⚠` Conflicts, `↑3` Ahead, `↓2` Behind remote
177
- - **Context**: `⊡ 34,040 (79%)` - Token count and percentage remaining until auto-compact (uses 75% of 200k limit)
190
+ - **Context**: `◔ 34,040 (79%)` - Token count and percentage remaining until auto-compact
178
191
  - **Budget**: `25%` Normal (under 50%), `+75%` Moderate (50-79%), `!85%` Warning (80%+)
179
192
 
180
193
  ## Configuration
@@ -207,8 +220,21 @@ Configuration priority (top overrides bottom):
207
220
  "lines": [
208
221
  {
209
222
  "segments": {
210
- "directory": { "enabled": true },
211
- "git": { "enabled": true, "showSha": true },
223
+ "directory": {
224
+ "enabled": true,
225
+ "showBasename": false
226
+ },
227
+ "git": {
228
+ "enabled": true,
229
+ "showSha": true,
230
+ "showWorkingTree": false,
231
+ "showOperation": false,
232
+ "showTag": false,
233
+ "showTimeSinceCommit": false,
234
+ "showStashCount": false,
235
+ "showUpstream": false,
236
+ "showRepoName": false
237
+ },
212
238
  "model": { "enabled": true },
213
239
  "session": { "enabled": true, "type": "tokens" },
214
240
  "block": { "enabled": true, "type": "cost" },
@@ -218,6 +244,7 @@ Configuration priority (top overrides bottom):
218
244
  "metrics": {
219
245
  "enabled": true,
220
246
  "showResponseTime": true,
247
+ "showLastResponseTime": false,
221
248
  "showDuration": true,
222
249
  "showMessageCount": true,
223
250
  "showCostBurnRate": false,
@@ -232,15 +259,51 @@ Configuration priority (top overrides bottom):
232
259
 
233
260
  ### Segment Details
234
261
 
235
- - **directory**: Current working directory name
236
- - **git**: Branch, status (clean/dirty), ahead/behind counts, SHA (optional)
262
+ - **directory**: Current working directory name (supports `showBasename` option)
263
+ - **git**: Branch, status, and extensive repository information (see Git Configuration below)
237
264
  - **model**: Current Claude model being used
238
265
  - **session**: Token usage and costs for current session
239
266
  - **block**: Usage within current 5-hour billing window
240
267
  - **today**: Total daily usage with budget monitoring
241
268
  - **context**: Context window usage and auto-compact threshold
242
269
  - **tmux**: Tmux session name and window info (when in tmux)
243
- - **metrics**: Performance analytics (response time, session duration, message count, burn rates)
270
+ - **metrics**: Performance analytics (see Metrics Configuration below)
271
+
272
+ #### Directory Configuration
273
+
274
+ ```json
275
+ "directory": {
276
+ "enabled": true,
277
+ "showBasename": false // Show only folder name instead of full path
278
+ }
279
+ ```
280
+
281
+ #### Git Configuration
282
+
283
+ The git segment now supports extensive repository information:
284
+
285
+ ```json
286
+ "git": {
287
+ "enabled": true,
288
+ "showSha": true, // Show abbreviated commit SHA (♯ abc123)
289
+ "showWorkingTree": false, // Show staged/unstaged/untracked counts ((+1 ~2 ?3))
290
+ "showOperation": false, // Show ongoing operations (MERGE/REBASE/CHERRY-PICK)
291
+ "showTag": false, // Show nearest tag (⌂ v1.5.0)
292
+ "showTimeSinceCommit": false, // Show time since last commit (⏰ 2h)
293
+ "showStashCount": false, // Show stash count (⧇ 3)
294
+ "showUpstream": false, // Show upstream branch (→ origin/main)
295
+ "showRepoName": false // Show repository name
296
+ }
297
+ ```
298
+
299
+ **Git Status Indicators:**
300
+
301
+ - `✓` Clean working tree
302
+ - `●` Uncommitted changes
303
+ - `⚠` Merge conflicts
304
+ - `↑3` Commits ahead of upstream
305
+ - `↓2` Commits behind upstream
306
+ - `(+1 ~2 ?3)` Staged/Unstaged/Untracked file counts
244
307
 
245
308
  #### Metrics Configuration
246
309
 
@@ -249,21 +312,23 @@ The metrics segment displays performance analytics from your Claude sessions:
249
312
  ```json
250
313
  "metrics": {
251
314
  "enabled": true,
252
- "showResponseTime": true,
253
- "showDuration": true,
254
- "showMessageCount": true,
255
- "showCostBurnRate": false,
256
- "showTokenBurnRate": false
315
+ "showResponseTime": true, // Average response time (`⧖ 3.2s`)
316
+ "showLastResponseTime": false, // Last response time (`Δ 2.8s`)
317
+ "showDuration": true, // Session duration (`⧗ 28m`)
318
+ "showMessageCount": true, // User message count (`⟐ 93`)
319
+ "showCostBurnRate": false, // Cost per hour (`⟢ $1.20/h`)
320
+ "showTokenBurnRate": false // Tokens per hour (`⟢ 450K/h`)
257
321
  }
258
322
  ```
259
323
 
260
- **Options:**
324
+ **Metrics Display:**
261
325
 
262
- - `showResponseTime`: Average response time per message (`⧖ 3.2s`)
263
- - `showDuration`: Total session duration (`⧗ 28m`)
264
- - `showMessageCount`: Number of user messages (`⟐ 93`)
265
- - `showCostBurnRate`: Cost burn rate per hour (`⟢ $1.20/h`)
266
- - `showTokenBurnRate`: Token burn rate per hour (`⟢ 450K/h`)
326
+ - `showResponseTime`: Average response time across all messages
327
+ - `showLastResponseTime`: Time for the last response (shows `0.0s` while waiting)
328
+ - `showDuration`: Total time since session started
329
+ - `showMessageCount`: Number of user messages sent
330
+ - `showCostBurnRate`: Spending rate per hour
331
+ - `showTokenBurnRate`: Token consumption rate per hour
267
332
 
268
333
  ![Metrics Segment Example](images/claude-powerline-metrics.png)
269
334
 
@@ -294,12 +359,14 @@ The powerline includes three complementary usage segments:
294
359
  **Display Options:**
295
360
 
296
361
  **Session & Today segments:**
362
+
297
363
  - `cost`: Show dollar amounts (`$0.05`)
298
364
  - `tokens`: Show token counts (`1.2K tokens`)
299
365
  - `both`: Show both (`$0.05 (1.2K)`)
300
366
  - `breakdown`: Show token breakdown (`1.2Kin + 0.8Kout + 1.5Kcached`)
301
367
 
302
368
  **Block segment** (always shows time remaining):
369
+
303
370
  - `cost`: Show cost + time (`$0.05 (2h 30m left)`)
304
371
  - `tokens`: Show tokens + time (`1.2K tokens (2h 30m left)`)
305
372
 
@@ -450,21 +517,7 @@ export CLAUDE_POWERLINE_THEME=dark
450
517
  export CLAUDE_POWERLINE_STYLE=powerline
451
518
  export CLAUDE_POWERLINE_USAGE_TYPE=tokens
452
519
  export CLAUDE_POWERLINE_CONFIG=/path/to/config.json
453
- ```
454
-
455
- ## Troubleshooting
456
-
457
- **Arrows not displaying?** Run `claude-powerline --install-fonts` and set terminal font to a powerline-patched font.
458
-
459
- **Cost showing N/A?** Check that Claude session files are accessible in ~/.claude directory.
460
-
461
- **Tmux segment not showing?** Ensure you're in a tmux session and enable it in config.
462
-
463
- **Debug logging:** Enable debug output to troubleshoot issues:
464
-
465
- ```bash
466
- export CLAUDE_POWERLINE_DEBUG=1
467
- # Then use Claude Code normally - debug info will appear in stderr
520
+ export CLAUDE_POWERLINE_DEBUG=1 # Enable debug logging
468
521
  ```
469
522
 
470
523
  ## Contributing