@owloops/claude-powerline 1.2.1 → 1.3.0

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
@@ -51,7 +51,8 @@
51
51
  ### Core Features
52
52
 
53
53
  - **Vim-style powerline** with proper arrows and segments
54
- - **Real-time usage tracking** with costs, tokens, and session blocks
54
+ - **Real-time session tracking** with costs and tokens
55
+ - **Context monitoring** showing tokens used and auto-compact threshold
55
56
  - **Git integration** with branch, status, ahead/behind counts
56
57
 
57
58
  </td>
@@ -140,8 +141,8 @@ Options are specified by command line flags. Overall configuration can also use
140
141
  ### Default Configuration
141
142
 
142
143
  ```bash
143
- # Shows directory, git, model, session usage (tokens), today usage (both)
144
- # Uses dark theme, minimal style, $50 daily budget
144
+ # Shows directory, git, model, session usage (tokens), context info
145
+ # Uses dark theme, minimal style
145
146
  claude-powerline
146
147
  ```
147
148
 
@@ -168,6 +169,7 @@ claude-powerline --daily-budget=50
168
169
  ### Status Indicators
169
170
 
170
171
  - **Git**: `✓` Clean, `●` Dirty, `⚠` Conflicts, `↑3` Ahead, `↓2` Behind remote
172
+ - **Context**: `⊡ 34,040 (79%)` - Token count and percentage remaining until auto-compact
171
173
  - **Budget**: `25%` Normal (under 50%), `+75%` Moderate (50-79%), `!85%` Warning (80%+)
172
174
 
173
175
  ## Configuration
@@ -192,7 +194,7 @@ Configuration priority (top overrides bottom):
192
194
  > [!NOTE]
193
195
  > Config files are reloaded automatically when changed - no need to restart Claude Code.
194
196
 
195
- ### Enable Additional Segments
197
+ ### Available Segments
196
198
 
197
199
  ```json
198
200
  {
@@ -204,8 +206,7 @@ Configuration priority (top overrides bottom):
204
206
  "git": { "enabled": true, "showSha": true },
205
207
  "model": { "enabled": true },
206
208
  "session": { "enabled": true, "type": "tokens" },
207
- "today": { "enabled": true, "type": "both" },
208
- "block": { "enabled": false, "type": "cost" },
209
+ "context": { "enabled": true },
209
210
  "tmux": { "enabled": true }
210
211
  }
211
212
  }
@@ -214,6 +215,15 @@ Configuration priority (top overrides bottom):
214
215
  }
215
216
  ```
216
217
 
218
+ ### Segment Details
219
+
220
+ - **directory**: Current working directory name
221
+ - **git**: Branch, status (clean/dirty), ahead/behind counts, SHA (optional)
222
+ - **model**: Current Claude model being used
223
+ - **session**: Token usage and costs for current session
224
+ - **context**: Context window usage and auto-compact threshold
225
+ - **tmux**: Tmux session name and window info (when in tmux)
226
+
217
227
  ### Multi-line Layout (Optional)
218
228
 
219
229
  To prevent segment cutoff, configure multiple lines:
@@ -232,8 +242,7 @@ To prevent segment cutoff, configure multiple lines:
232
242
  {
233
243
  "segments": {
234
244
  "session": { "enabled": true, "type": "tokens" },
235
- "today": { "enabled": true, "type": "both" },
236
- "block": { "enabled": false, "type": "cost" },
245
+ "context": { "enabled": true },
237
246
  "tmux": { "enabled": true }
238
247
  }
239
248
  }
@@ -258,8 +267,7 @@ To customize colors, copy dark or light theme colors from `src/themes/` in the r
258
267
  "git": { "bg": "#0066cc", "fg": "#ffffff" },
259
268
  "model": { "bg": "#9900cc", "fg": "#ffffff" },
260
269
  "session": { "bg": "#cc0099", "fg": "#ffffff" },
261
- "today": { "bg": "#00cc66", "fg": "#000000" },
262
- "block": { "bg": "#cc6600", "fg": "#ffffff" },
270
+ "context": { "bg": "#4a5568", "fg": "#ffffff" },
263
271
  "tmux": { "bg": "#228b22", "fg": "#ffffff" }
264
272
  }
265
273
  }
@@ -336,11 +344,12 @@ export CLAUDE_POWERLINE_CONFIG=/path/to/config.json
336
344
 
337
345
  **Arrows not displaying?** Run `claude-powerline --install-fonts` and set terminal font to a powerline-patched font.
338
346
 
339
- **Cost showing N/A?** Verify [ccusage](https://github.com/ryanschneider/ccusage) is working and session ID matches.
347
+ **Cost showing N/A?** Check that Claude session files are accessible in ~/.claude directory.
340
348
 
341
349
  **Tmux segment not showing?** Ensure you're in a tmux session and enable it in config.
342
350
 
343
351
  **Debug logging:** Enable debug output to troubleshoot issues:
352
+
344
353
  ```bash
345
354
  export CLAUDE_POWERLINE_DEBUG=1
346
355
  # Then use Claude Code normally - debug info will appear in stderr
package/dist/index.d.ts CHANGED
@@ -1 +1,17 @@
1
1
  #!/usr/bin/env node
2
+ interface ClaudeHookData {
3
+ hook_event_name: string;
4
+ session_id: string;
5
+ transcript_path: string;
6
+ cwd: string;
7
+ model: {
8
+ id: string;
9
+ display_name: string;
10
+ };
11
+ workspace: {
12
+ current_dir: string;
13
+ project_dir: string;
14
+ };
15
+ }
16
+
17
+ export type { ClaudeHookData };