cc-pulse 1.1.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 +45 -14
- package/dist/cli.js +60 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,16 +30,18 @@ Restart Claude Code — the statusline appears above the input area.
|
|
|
30
30
|
|
|
31
31
|
| Feature | Description |
|
|
32
32
|
|---------|-------------|
|
|
33
|
-
|
|
|
33
|
+
| **Context usage** | Shows % used with color-coded bar — green to red as you approach limits |
|
|
34
34
|
| **Token breakdown** | Input ↓, output ↑, and cache ⟳ tokens at a glance |
|
|
35
|
+
| **Model info** | Shows model with version (e.g., "Opus 4.5", "Sonnet 3.5") |
|
|
35
36
|
| **Cost tracking** | Session cost with color coding ($1 yellow, $2 orange, $5+ red) |
|
|
36
37
|
| **MCP health** | Live connection status for all MCP servers |
|
|
37
38
|
| **Hook monitoring** | Active hooks by event type, with broken path detection |
|
|
39
|
+
| **Skills display** | Shows your custom slash commands/skills |
|
|
38
40
|
| **Git status** | Branch name + new/modified/deleted file counts |
|
|
39
41
|
|
|
40
42
|
## 📊 What You Get
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
Six lines of information, updated on every message:
|
|
43
45
|
|
|
44
46
|

|
|
45
47
|
|
|
@@ -47,9 +49,10 @@ Five lines of information, updated on every message:
|
|
|
47
49
|
|------|---------|
|
|
48
50
|
| **Identity** | Project name + working directory |
|
|
49
51
|
| **Git** | Branch + file changes (new, modified, deleted) |
|
|
50
|
-
| **Engine** | Tier, model, context
|
|
52
|
+
| **Engine** | Tier, model, context used, tokens, cost, duration |
|
|
51
53
|
| **MCP** | Server count + individual status (✓ connected, ✗ disconnected, ○ disabled) |
|
|
52
54
|
| **Hooks** | Hook count by event type, with broken path warnings |
|
|
55
|
+
| **Skills** | Custom slash commands count + names |
|
|
53
56
|
|
|
54
57
|
## ⚙️ Configuration
|
|
55
58
|
|
|
@@ -58,7 +61,7 @@ Create `~/.config/claude-pulse/config.json` to customize. Only include what you
|
|
|
58
61
|
<details>
|
|
59
62
|
<summary><strong>Context Window</strong></summary>
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
Shows how much of the context window is used. Colors shift as usage increases.
|
|
62
65
|
|
|
63
66
|
```json
|
|
64
67
|
{
|
|
@@ -74,16 +77,16 @@ The `→Compact` indicator shows remaining space until auto-compaction. When it
|
|
|
74
77
|
|
|
75
78
|
| Style | Example |
|
|
76
79
|
|-------|---------|
|
|
77
|
-
| `bar` (default) |
|
|
78
|
-
| `
|
|
79
|
-
| `detailed` |
|
|
80
|
-
| `both` | `●●●●●●○○○○
|
|
80
|
+
| `bar` (default) | `Used ●●●●●●○○○○ 58%` |
|
|
81
|
+
| `percent` | `Used 58%` |
|
|
82
|
+
| `detailed` | `Used 116.0k/200.0k (58%)` |
|
|
83
|
+
| `both` | `●●●●●●○○○○ 116.0k / 200.0k` |
|
|
81
84
|
|
|
82
|
-
**Color thresholds** — as
|
|
83
|
-
- **Green**:
|
|
84
|
-
- **Yellow**:
|
|
85
|
-
- **Orange**:
|
|
86
|
-
- **Red + 🔴**:
|
|
85
|
+
**Color thresholds** — as used % increases:
|
|
86
|
+
- **Green**: < 70% used (safe)
|
|
87
|
+
- **Yellow**: 70% used (warn)
|
|
88
|
+
- **Orange**: 85% used (critical)
|
|
89
|
+
- **Red + 🔴**: 95% used (danger)
|
|
87
90
|
|
|
88
91
|
</details>
|
|
89
92
|
|
|
@@ -178,10 +181,37 @@ Color thresholds: green < $1, yellow $1-$2, orange $2-$5, red > $5
|
|
|
178
181
|
|
|
179
182
|
</details>
|
|
180
183
|
|
|
184
|
+
<details>
|
|
185
|
+
<summary><strong>Skills</strong></summary>
|
|
186
|
+
|
|
187
|
+
Shows your custom slash commands from `~/.claude/skills/` and `.claude/skills/`.
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"components": {
|
|
192
|
+
"skills": {
|
|
193
|
+
"showNames": true,
|
|
194
|
+
"showCount": true,
|
|
195
|
+
"maxDisplay": 5
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
| Setting | Result |
|
|
202
|
+
|---------|--------|
|
|
203
|
+
| Both `true` | `✦ Skills 5 commit,pr,branch` |
|
|
204
|
+
| `showNames: false` | `✦ Skills 5` |
|
|
205
|
+
| `maxDisplay: 3` | Shows first 3 names + overflow count |
|
|
206
|
+
|
|
207
|
+
Broken skills (missing SKILL.md or invalid frontmatter) show in red with ▲.
|
|
208
|
+
|
|
209
|
+
</details>
|
|
210
|
+
|
|
181
211
|
<details>
|
|
182
212
|
<summary><strong>Layout</strong></summary>
|
|
183
213
|
|
|
184
|
-
The
|
|
214
|
+
The 6-line structure is fixed. You can toggle lines and change separators:
|
|
185
215
|
|
|
186
216
|
```json
|
|
187
217
|
{
|
|
@@ -199,6 +229,7 @@ The 5-line structure is fixed. You can toggle lines and change separators:
|
|
|
199
229
|
| Engine | `engine` | Yes |
|
|
200
230
|
| MCP | `mcp` | Yes |
|
|
201
231
|
| Hooks | `hooks` | Yes |
|
|
232
|
+
| Skills | `skills` | Yes |
|
|
202
233
|
|
|
203
234
|
</details>
|
|
204
235
|
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ var __export = (target, all) => {
|
|
|
12
12
|
// package.json
|
|
13
13
|
var package_default = {
|
|
14
14
|
name: "cc-pulse",
|
|
15
|
-
version: "1.
|
|
15
|
+
version: "1.3.0",
|
|
16
16
|
description: "A customizable, real-time statusline for Claude Code",
|
|
17
17
|
type: "module",
|
|
18
18
|
bin: {
|
|
@@ -714,29 +714,73 @@ function parseMcpOutput(output) {
|
|
|
714
714
|
return servers;
|
|
715
715
|
}
|
|
716
716
|
// src/components/model.ts
|
|
717
|
+
function parseModelId(modelId) {
|
|
718
|
+
const id = modelId.toLowerCase();
|
|
719
|
+
const newFormat = id.match(/^claude-(\w+)-(\d+)-(\d+)-\d+$/);
|
|
720
|
+
if (newFormat) {
|
|
721
|
+
const [, family, major, minor] = newFormat;
|
|
722
|
+
return { family, version: `${major}.${minor}` };
|
|
723
|
+
}
|
|
724
|
+
const newFormatNoMinor = id.match(/^claude-(\w+)-(\d+)-\d{8}$/);
|
|
725
|
+
if (newFormatNoMinor) {
|
|
726
|
+
const [, family, major] = newFormatNoMinor;
|
|
727
|
+
return { family, version: major };
|
|
728
|
+
}
|
|
729
|
+
const oldFormat = id.match(/^claude-(\d+)-(\d+)-(\w+)-\d+$/);
|
|
730
|
+
if (oldFormat) {
|
|
731
|
+
const [, major, minor, family] = oldFormat;
|
|
732
|
+
return { family, version: `${major}.${minor}` };
|
|
733
|
+
}
|
|
734
|
+
const oldFormatNoMinor = id.match(/^claude-(\d+)-(\w+)-\d+$/);
|
|
735
|
+
if (oldFormatNoMinor) {
|
|
736
|
+
const [, major, family] = oldFormatNoMinor;
|
|
737
|
+
return { family, version: major };
|
|
738
|
+
}
|
|
739
|
+
return null;
|
|
740
|
+
}
|
|
717
741
|
function renderModel(input, config, theme) {
|
|
718
742
|
if (config.enabled === false) {
|
|
719
743
|
return { text: "" };
|
|
720
744
|
}
|
|
745
|
+
const modelId = input.model?.id ?? "";
|
|
721
746
|
const displayName = input.model?.display_name ?? "";
|
|
722
|
-
const modelName = displayName.toLowerCase();
|
|
723
747
|
const icons = config.icons ?? { opus: "\uD83E\uDDE0", sonnet: "\uD83C\uDFB5", haiku: "⚡" };
|
|
724
748
|
const showIcon = config.showIcon !== false;
|
|
725
749
|
let icon = "\uD83E\uDD16";
|
|
726
750
|
let color = theme.text;
|
|
727
751
|
let modelLabel = displayName;
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
752
|
+
const parsed = parseModelId(modelId);
|
|
753
|
+
if (parsed) {
|
|
754
|
+
const family = parsed.family;
|
|
755
|
+
const version = parsed.version;
|
|
756
|
+
if (family === "opus") {
|
|
757
|
+
icon = icons.opus;
|
|
758
|
+
color = theme.mauve;
|
|
759
|
+
modelLabel = `Opus ${version}`;
|
|
760
|
+
} else if (family === "sonnet") {
|
|
761
|
+
icon = icons.sonnet;
|
|
762
|
+
color = theme.blue;
|
|
763
|
+
modelLabel = `Sonnet ${version}`;
|
|
764
|
+
} else if (family === "haiku") {
|
|
765
|
+
icon = icons.haiku;
|
|
766
|
+
color = theme.green;
|
|
767
|
+
modelLabel = `Haiku ${version}`;
|
|
768
|
+
}
|
|
769
|
+
} else {
|
|
770
|
+
const modelName = displayName.toLowerCase();
|
|
771
|
+
if (modelName.includes("opus")) {
|
|
772
|
+
icon = icons.opus;
|
|
773
|
+
color = theme.mauve;
|
|
774
|
+
modelLabel = "Opus";
|
|
775
|
+
} else if (modelName.includes("sonnet")) {
|
|
776
|
+
icon = icons.sonnet;
|
|
777
|
+
color = theme.blue;
|
|
778
|
+
modelLabel = "Sonnet";
|
|
779
|
+
} else if (modelName.includes("haiku")) {
|
|
780
|
+
icon = icons.haiku;
|
|
781
|
+
color = theme.green;
|
|
782
|
+
modelLabel = "Haiku";
|
|
783
|
+
}
|
|
740
784
|
}
|
|
741
785
|
const label = config.label !== undefined ? config.label : modelLabel;
|
|
742
786
|
const iconStr = showIcon ? `${icon} ` : "";
|
|
@@ -803,7 +847,7 @@ function renderSkills(config, theme) {
|
|
|
803
847
|
const showCount = config.showCount !== false;
|
|
804
848
|
const maxDisplay = config.maxDisplay ?? Infinity;
|
|
805
849
|
if (summary.total === 0) {
|
|
806
|
-
const text2 = `${theme.mauve}
|
|
850
|
+
const text2 = `${theme.mauve}✦ ${label} ${theme.overlay0}0${theme.reset}`;
|
|
807
851
|
return { text: text2 };
|
|
808
852
|
}
|
|
809
853
|
const validNames = summary.skills.filter((s) => s.valid).map((s) => s.name ?? s.folder).slice(0, maxDisplay);
|
|
@@ -822,7 +866,7 @@ function renderSkills(config, theme) {
|
|
|
822
866
|
const brokenDisplay = brokenNames.length <= 2 ? brokenNames.join(",") : `${summary.broken} broken`;
|
|
823
867
|
brokenStr = ` ${theme.red}▲${brokenDisplay}${theme.reset}`;
|
|
824
868
|
}
|
|
825
|
-
const text = `${theme.mauve}
|
|
869
|
+
const text = `${theme.mauve}✦ ${label}${theme.reset}${parts.length ? ` ${parts.join(" ")}` : ""}${brokenStr}`;
|
|
826
870
|
return { text };
|
|
827
871
|
}
|
|
828
872
|
function getSkillsSummary() {
|