@owloops/claude-powerline 1.2.1 → 1.3.1
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 +22 -14
- package/dist/index.d.ts +16 -0
- package/dist/index.js +610 -304
- 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>
|
|
@@ -122,7 +123,6 @@ Options are specified by command line flags. Overall configuration can also use
|
|
|
122
123
|
| `--theme` | `dark` (default), `light`, `nord`, `tokyo-night`, `rose-pine`, `custom` | Set color theme |
|
|
123
124
|
| `--style` | `minimal` (default), `powerline` | Set separator style |
|
|
124
125
|
| `--usage` | `cost`, `tokens`, `both`, `breakdown` | Set usage display format |
|
|
125
|
-
| `--daily-budget` | `AMOUNT` | Set daily budget limit in USD |
|
|
126
126
|
| `--session-budget` | `AMOUNT` | Set session budget limit in USD |
|
|
127
127
|
| `--config` | `PATH` | Use custom config file path |
|
|
128
128
|
| `--install-fonts` | - | Install powerline fonts to system |
|
|
@@ -140,8 +140,8 @@ Options are specified by command line flags. Overall configuration can also use
|
|
|
140
140
|
### Default Configuration
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
|
-
# Shows directory, git, model, session usage (tokens),
|
|
144
|
-
# Uses dark theme, minimal style
|
|
143
|
+
# Shows directory, git, model, session usage (tokens), context info
|
|
144
|
+
# Uses dark theme, minimal style
|
|
145
145
|
claude-powerline
|
|
146
146
|
```
|
|
147
147
|
|
|
@@ -161,13 +161,14 @@ claude-powerline --theme=tokyo-night --style=minimal
|
|
|
161
161
|
# Show token breakdown instead of costs
|
|
162
162
|
claude-powerline --usage=breakdown
|
|
163
163
|
|
|
164
|
-
# Set
|
|
165
|
-
claude-powerline --
|
|
164
|
+
# Set session budget limit
|
|
165
|
+
claude-powerline --session-budget=50
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
### Status Indicators
|
|
169
169
|
|
|
170
170
|
- **Git**: `✓` Clean, `●` Dirty, `⚠` Conflicts, `↑3` Ahead, `↓2` Behind remote
|
|
171
|
+
- **Context**: `⊡ 34,040 (79%)` - Token count and percentage remaining until auto-compact
|
|
171
172
|
- **Budget**: `25%` Normal (under 50%), `+75%` Moderate (50-79%), `!85%` Warning (80%+)
|
|
172
173
|
|
|
173
174
|
## Configuration
|
|
@@ -192,7 +193,7 @@ Configuration priority (top overrides bottom):
|
|
|
192
193
|
> [!NOTE]
|
|
193
194
|
> Config files are reloaded automatically when changed - no need to restart Claude Code.
|
|
194
195
|
|
|
195
|
-
###
|
|
196
|
+
### Available Segments
|
|
196
197
|
|
|
197
198
|
```json
|
|
198
199
|
{
|
|
@@ -204,8 +205,7 @@ Configuration priority (top overrides bottom):
|
|
|
204
205
|
"git": { "enabled": true, "showSha": true },
|
|
205
206
|
"model": { "enabled": true },
|
|
206
207
|
"session": { "enabled": true, "type": "tokens" },
|
|
207
|
-
"
|
|
208
|
-
"block": { "enabled": false, "type": "cost" },
|
|
208
|
+
"context": { "enabled": true },
|
|
209
209
|
"tmux": { "enabled": true }
|
|
210
210
|
}
|
|
211
211
|
}
|
|
@@ -214,6 +214,15 @@ Configuration priority (top overrides bottom):
|
|
|
214
214
|
}
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
### Segment Details
|
|
218
|
+
|
|
219
|
+
- **directory**: Current working directory name
|
|
220
|
+
- **git**: Branch, status (clean/dirty), ahead/behind counts, SHA (optional)
|
|
221
|
+
- **model**: Current Claude model being used
|
|
222
|
+
- **session**: Token usage and costs for current session
|
|
223
|
+
- **context**: Context window usage and auto-compact threshold
|
|
224
|
+
- **tmux**: Tmux session name and window info (when in tmux)
|
|
225
|
+
|
|
217
226
|
### Multi-line Layout (Optional)
|
|
218
227
|
|
|
219
228
|
To prevent segment cutoff, configure multiple lines:
|
|
@@ -232,8 +241,7 @@ To prevent segment cutoff, configure multiple lines:
|
|
|
232
241
|
{
|
|
233
242
|
"segments": {
|
|
234
243
|
"session": { "enabled": true, "type": "tokens" },
|
|
235
|
-
"
|
|
236
|
-
"block": { "enabled": false, "type": "cost" },
|
|
244
|
+
"context": { "enabled": true },
|
|
237
245
|
"tmux": { "enabled": true }
|
|
238
246
|
}
|
|
239
247
|
}
|
|
@@ -258,8 +266,7 @@ To customize colors, copy dark or light theme colors from `src/themes/` in the r
|
|
|
258
266
|
"git": { "bg": "#0066cc", "fg": "#ffffff" },
|
|
259
267
|
"model": { "bg": "#9900cc", "fg": "#ffffff" },
|
|
260
268
|
"session": { "bg": "#cc0099", "fg": "#ffffff" },
|
|
261
|
-
"
|
|
262
|
-
"block": { "bg": "#cc6600", "fg": "#ffffff" },
|
|
269
|
+
"context": { "bg": "#4a5568", "fg": "#ffffff" },
|
|
263
270
|
"tmux": { "bg": "#228b22", "fg": "#ffffff" }
|
|
264
271
|
}
|
|
265
272
|
}
|
|
@@ -336,11 +343,12 @@ export CLAUDE_POWERLINE_CONFIG=/path/to/config.json
|
|
|
336
343
|
|
|
337
344
|
**Arrows not displaying?** Run `claude-powerline --install-fonts` and set terminal font to a powerline-patched font.
|
|
338
345
|
|
|
339
|
-
**Cost showing N/A?**
|
|
346
|
+
**Cost showing N/A?** Check that Claude session files are accessible in ~/.claude directory.
|
|
340
347
|
|
|
341
348
|
**Tmux segment not showing?** Ensure you're in a tmux session and enable it in config.
|
|
342
349
|
|
|
343
350
|
**Debug logging:** Enable debug output to troubleshoot issues:
|
|
351
|
+
|
|
344
352
|
```bash
|
|
345
353
|
export CLAUDE_POWERLINE_DEBUG=1
|
|
346
354
|
# 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 };
|