@owloops/claude-powerline 1.2.0 → 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 +26 -11
- package/dist/index.d.ts +16 -0
- package/dist/index.js +627 -302
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
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
|
|
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),
|
|
144
|
-
# Uses dark theme, minimal style
|
|
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
|
-
###
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
262
|
-
"block": { "bg": "#cc6600", "fg": "#ffffff" },
|
|
270
|
+
"context": { "bg": "#4a5568", "fg": "#ffffff" },
|
|
263
271
|
"tmux": { "bg": "#228b22", "fg": "#ffffff" }
|
|
264
272
|
}
|
|
265
273
|
}
|
|
@@ -336,10 +344,17 @@ 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?**
|
|
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
|
|
|
351
|
+
**Debug logging:** Enable debug output to troubleshoot issues:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
export CLAUDE_POWERLINE_DEBUG=1
|
|
355
|
+
# Then use Claude Code normally - debug info will appear in stderr
|
|
356
|
+
```
|
|
357
|
+
|
|
343
358
|
## Contributing
|
|
344
359
|
|
|
345
360
|
Contributions are welcome! Please feel free to submit issues or pull requests.
|
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 };
|