@cc-status-line/cli 0.1.8 → 0.2.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.full +53 -11
- package/index.js +2 -1
- package/package.json +4 -5
package/README.md.full
CHANGED
|
@@ -130,20 +130,28 @@ cc-status follows a "passive bar + on-demand panel" design. You don't need to re
|
|
|
130
130
|
The bar at the top of every Claude Code prompt. Choose a layout:
|
|
131
131
|
|
|
132
132
|
```sh
|
|
133
|
-
ccs mode compact #
|
|
134
|
-
ccs mode
|
|
135
|
-
ccs mode
|
|
133
|
+
ccs mode compact # 1 line, the basics (default)
|
|
134
|
+
ccs mode minimal # 1 line, just dir + ctx
|
|
135
|
+
ccs mode detailed # 3 lines, all metrics
|
|
136
|
+
ccs mode cost # 2 lines focused on $ spent
|
|
137
|
+
ccs mode tokens # 3 lines focused on token flow
|
|
138
|
+
ccs mode tools # 3 lines focused on Skill / MCP usage
|
|
139
|
+
ccs mode debug # 8 lines, one metric per line with labels
|
|
136
140
|
```
|
|
137
141
|
|
|
138
|
-
Or build your own:
|
|
142
|
+
Or build your own without rewriting:
|
|
139
143
|
|
|
140
144
|
```sh
|
|
141
|
-
ccs segments
|
|
142
|
-
ccs mode
|
|
143
|
-
|
|
144
|
-
ccs mode
|
|
145
|
-
ccs mode
|
|
146
|
-
ccs mode
|
|
145
|
+
ccs segments # see all segments
|
|
146
|
+
ccs mode append cost_today # append a new line to current mode
|
|
147
|
+
ccs mode append hit_rate burn # append several segments together
|
|
148
|
+
ccs mode append --line 1 git # append to an existing line
|
|
149
|
+
ccs mode append --mode detailed cost_today # target a specific mode
|
|
150
|
+
ccs mode edit # full edit in $EDITOR
|
|
151
|
+
ccs mode add mine -l "{dir} {git}" \
|
|
152
|
+
-l "{last_turn} {hit_rate}" # define a brand-new mode
|
|
153
|
+
ccs mode list # show all modes
|
|
154
|
+
ccs mode rm mine # delete one
|
|
147
155
|
```
|
|
148
156
|
|
|
149
157
|
### 2. The detail panel (`ccs status`)
|
|
@@ -181,6 +189,11 @@ Prints a colored cheat-sheet of every segment, every color, every glyph.
|
|
|
181
189
|
| `{burn}` | `🔥 32.4k/min` | Session-average token rate |
|
|
182
190
|
| `{skills}` | `skills: jira×3 wiki×1` | Skill calls, top 4 by count |
|
|
183
191
|
| `{mcp}` | `mcp: github×2` | MCP-server calls, top 4 |
|
|
192
|
+
| `{cost_last}` | `last $0.012` | USD cost of the last turn (current model price) |
|
|
193
|
+
| `{cost_session}` | `sess $1.42` | Cumulative USD cost for the current session |
|
|
194
|
+
| `{cost_today}` | `today $4.18` | USD cost across all sessions today |
|
|
195
|
+
| `{cost_week}` | `7d $24.50` | USD cost over the last 7 days |
|
|
196
|
+
| `{cost}` | `last $0.012 · today $4.18` | Combo: `cost_last + cost_today` |
|
|
184
197
|
| `{mode}` | `[detailed]` | Current mode label |
|
|
185
198
|
|
|
186
199
|
## Configuration
|
|
@@ -235,7 +248,36 @@ Two relevant Claude Code env vars (set in `~/.claude/settings.json` `env` block)
|
|
|
235
248
|
|
|
236
249
|
cc-status reads `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` from the process env at render time, so the bar always matches Claude Code's actual compact behavior.
|
|
237
250
|
|
|
238
|
-
##
|
|
251
|
+
## Pricing & cost segments
|
|
252
|
+
|
|
253
|
+
The `cost*` segments compute USD by multiplying per-model token counts
|
|
254
|
+
against built-in Anthropic prices (Opus, Sonnet, Haiku, with the 1M
|
|
255
|
+
context tier doubling input/output when the model name contains
|
|
256
|
+
`[1m]` / `(1m)`). Override or extend the table in your config:
|
|
257
|
+
|
|
258
|
+
```toml
|
|
259
|
+
[pricing.opus]
|
|
260
|
+
input = 12.00 # $/M tokens
|
|
261
|
+
output = 60.00
|
|
262
|
+
|
|
263
|
+
# Or pin an exact model id (substring match, case-insensitive)
|
|
264
|
+
[pricing."anthropic--claude-opus-latest"]
|
|
265
|
+
input = 13.00
|
|
266
|
+
output = 65.00
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
`{cost_today}` and `{cost_week}` walk every transcript under
|
|
270
|
+
`~/.claude/projects/`, incrementally folded into a rollup at
|
|
271
|
+
`$XDG_CACHE_HOME/cc-status/rollup.json`. First scan touches every
|
|
272
|
+
file; subsequent renders only read newly-appended bytes.
|
|
273
|
+
|
|
274
|
+
> **Caveat**: today/7d cost relies on the model id Claude Code writes
|
|
275
|
+
> into the transcript (`message.model`), which is the canonical id
|
|
276
|
+
> like `claude-opus-4-7` without the `[1m]` suffix. If you run on a
|
|
277
|
+
> 1M-context tier, today/7d under-counts by ~50% unless you add a
|
|
278
|
+
> matching `[pricing.opus]` override that bakes the doubled price in.
|
|
279
|
+
|
|
280
|
+
|
|
239
281
|
|
|
240
282
|
- **Render latency**: ~20 ms (mostly forking `git` for status). Well under Claude Code's 300 ms status-line timeout.
|
|
241
283
|
- **Transcript parsing**: incremental — a per-session JSON cache stores the file offset and aggregated counters. Parsing 1 GB of transcript on the first run is the worst case; every subsequent render reads only newly-appended bytes.
|
package/index.js
CHANGED
|
@@ -20,7 +20,8 @@ function resolveBinary() {
|
|
|
20
20
|
"darwin-arm64": "@cc-status-line/darwin-arm64",
|
|
21
21
|
"linux-x64": "@cc-status-line/linux-x64",
|
|
22
22
|
"linux-arm64": "@cc-status-line/linux-arm64",
|
|
23
|
-
|
|
23
|
+
// win32-x64 is temporarily disabled. Windows users should build
|
|
24
|
+
// from source: https://github.com/hankeGui/cc-status
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
const key = `${platform}-${arch}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cc-status-line/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Multi-line, mode-switchable status line for Claude Code (Rust binary, npm-distributed)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -35,9 +35,8 @@
|
|
|
35
35
|
"postinstall": "node postinstall.js || true"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@cc-status-line/darwin-arm64": "0.1
|
|
39
|
-
"@cc-status-line/linux-x64": "0.1
|
|
40
|
-
"@cc-status-line/linux-arm64": "0.1
|
|
41
|
-
"@cc-status-line/win32-x64": "0.1.8"
|
|
38
|
+
"@cc-status-line/darwin-arm64": "0.2.1",
|
|
39
|
+
"@cc-status-line/linux-x64": "0.2.1",
|
|
40
|
+
"@cc-status-line/linux-arm64": "0.2.1"
|
|
42
41
|
}
|
|
43
42
|
}
|