cc-pulse 1.0.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/LICENSE +21 -0
- package/README.md +233 -0
- package/dist/cli.js +14940 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alireza
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# claude-pulse
|
|
2
|
+
|
|
3
|
+
A real-time statusline for [Claude Code](https://docs.anthropic.com/en/docs/claude-code).
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
- **Context & cost** — context window %, input/output/cache token breakdown, cost with burn rate, session duration
|
|
10
|
+
- **MCP server health** — connection status for every server: connected, disconnected, disabled, or erroring
|
|
11
|
+
- **Hook monitoring** — all hooks by event type, with broken path detection
|
|
12
|
+
- **Git at a glance** — branch, new/modified/deleted file counts
|
|
13
|
+
- **Fully customizable** — every component is independently configurable with multiple display styles
|
|
14
|
+
|
|
15
|
+
## What You Get
|
|
16
|
+
|
|
17
|
+
Five lines of information, updated on every message:
|
|
18
|
+
|
|
19
|
+
| Line | What it shows |
|
|
20
|
+
|------|---------------|
|
|
21
|
+
| **Identity** | Project name + working directory |
|
|
22
|
+
| **Git** | Current branch + file changes (new, modified, deleted) |
|
|
23
|
+
| **Engine** | Model, context window %, token cost, session duration |
|
|
24
|
+
| **MCP** | Server connections with health status (connected, disconnected, disabled, error) |
|
|
25
|
+
| **Hooks** | Active hooks by event type, with broken path detection |
|
|
26
|
+
|
|
27
|
+
Context usage changes color as it fills up. Cost goes from green to red. Failed MCP servers and broken hooks are highlighted immediately.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g cc-pulse
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Add to your Claude Code settings (`~/.claude/settings.json`):
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"statusLine": {
|
|
40
|
+
"type": "command",
|
|
41
|
+
"command": "cc-pulse"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Restart Claude Code. The statusline appears above the input area.
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary><strong>Install from source</strong></summary>
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/ali-nr/claude-pulse.git
|
|
53
|
+
cd claude-pulse
|
|
54
|
+
bun install
|
|
55
|
+
bun run build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use the full path in settings: `"command": "node /path/to/claude-pulse/dist/cli.js"`
|
|
59
|
+
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
## Customize
|
|
63
|
+
|
|
64
|
+
Create `~/.config/claude-pulse/config.json` to override defaults. You only need to include what you want to change.
|
|
65
|
+
|
|
66
|
+
<details>
|
|
67
|
+
<summary><strong>Layout</strong></summary>
|
|
68
|
+
|
|
69
|
+
The 5-line structure is fixed. You can enable/disable lines and change separators:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"lines": {
|
|
74
|
+
"hooks": { "enabled": false },
|
|
75
|
+
"engine": { "separator": " | " }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
| Line | Key | Can toggle |
|
|
81
|
+
|------|-----|------------|
|
|
82
|
+
| Identity | — | No (fixed branding) |
|
|
83
|
+
| Git | `git` | Yes |
|
|
84
|
+
| Engine | `engine` | Yes |
|
|
85
|
+
| MCP | `mcp` | Yes |
|
|
86
|
+
| Hooks | `hooks` | Yes |
|
|
87
|
+
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary><strong>Context window</strong></summary>
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"components": {
|
|
96
|
+
"context": {
|
|
97
|
+
"style": "compact",
|
|
98
|
+
"showTokens": true,
|
|
99
|
+
"showRate": false,
|
|
100
|
+
"thresholds": { "warn": 70, "critical": 85, "danger": 95 }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Style | Example |
|
|
107
|
+
|-------|---------|
|
|
108
|
+
| `compact` | `42%` |
|
|
109
|
+
| `bar` | `●●●●○○○○○○ 42%` |
|
|
110
|
+
| `detailed` | `84.0k/200.0k (42%)` |
|
|
111
|
+
| `both` | `●●●●○○○○○○ used:84.0k free:116.0k` |
|
|
112
|
+
|
|
113
|
+
Enable `showTokens` to see `↓input ↑output ⟳cache` breakdown.
|
|
114
|
+
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>MCP servers</strong></summary>
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"components": {
|
|
123
|
+
"mcp": {
|
|
124
|
+
"showNames": true,
|
|
125
|
+
"showOnlyProblems": true,
|
|
126
|
+
"maxDisplay": 4
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- `showNames: true` — list each server with status icon
|
|
133
|
+
- `showOnlyProblems: true` — hide MCP line when everything is healthy
|
|
134
|
+
- Failed/disconnected servers always show in red
|
|
135
|
+
|
|
136
|
+
| Icon | Status |
|
|
137
|
+
|------|--------|
|
|
138
|
+
| `✓` | Connected |
|
|
139
|
+
| `✗` | Disconnected |
|
|
140
|
+
| `○` | Disabled |
|
|
141
|
+
| `▲` | Error |
|
|
142
|
+
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
<details>
|
|
146
|
+
<summary><strong>Hooks</strong></summary>
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"components": {
|
|
151
|
+
"hooks": {
|
|
152
|
+
"showNames": true,
|
|
153
|
+
"showCount": true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
| Setting | Result |
|
|
160
|
+
|---------|--------|
|
|
161
|
+
| Both `true` (default) | `⚡Hooks 8 Submit:3 timezone-context,best-practices Post:2 lint-check` |
|
|
162
|
+
| `showNames: false` | `⚡Hooks 8 Submit:3 Post:2 Start:2 End:1` |
|
|
163
|
+
| Both `false` | `⚡Hooks 8` |
|
|
164
|
+
|
|
165
|
+
Broken hooks (invalid file paths) always show in red with `▲`.
|
|
166
|
+
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><strong>Cost</strong></summary>
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"components": {
|
|
175
|
+
"cost": {
|
|
176
|
+
"showBurnRate": true,
|
|
177
|
+
"label": "$"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Colors change automatically: green < $1, yellow $1-$2, peach $2-$5, red > $5. Burn rate appears after the session is longer than 1 minute.
|
|
184
|
+
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary><strong>Subscription tier</strong></summary>
|
|
189
|
+
|
|
190
|
+
Auto-detects from `~/.claude.json`. Override if detection doesn't work:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"components": {
|
|
195
|
+
"tier": {
|
|
196
|
+
"enabled": true,
|
|
197
|
+
"override": "max"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Options: `"pro"`, `"max"`, `"api"`.
|
|
204
|
+
|
|
205
|
+
</details>
|
|
206
|
+
|
|
207
|
+
<details>
|
|
208
|
+
<summary><strong>Other components</strong></summary>
|
|
209
|
+
|
|
210
|
+
| Component | Key Options |
|
|
211
|
+
|-----------|-------------|
|
|
212
|
+
| `model` | `showIcon: true` adds emoji per model |
|
|
213
|
+
| `session` | `showDuration: true`, `showId: false` |
|
|
214
|
+
| `cache` | Shows cache hit rate percentage |
|
|
215
|
+
| `linesChanged` | Shows `+added -removed` lines changed |
|
|
216
|
+
| `time` | `format: "12h"` or `"24h"`, `showTimezone: true` |
|
|
217
|
+
|
|
218
|
+
All components accept `"enabled": false` to hide them.
|
|
219
|
+
|
|
220
|
+
</details>
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
bun install # Install dependencies
|
|
226
|
+
bun run build # Build to dist/
|
|
227
|
+
bun run lint # Run Biome linter
|
|
228
|
+
bun run dev # Watch mode
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT
|