@delt/claude-alarm 0.3.1 → 0.3.2
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 +262 -181
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,181 +1,262 @@
|
|
|
1
|
-
# claude-alarm
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
claude-alarm
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
claude-alarm
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
1
|
+
# claude-alarm
|
|
2
|
+
|
|
3
|
+
> Multi-session monitoring dashboard for Claude Code via MCP Channels
|
|
4
|
+
|
|
5
|
+
Monitor and interact with multiple Claude Code sessions from a web dashboard. Get desktop notifications when tasks complete, send messages to Claude, and track session status.
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
graph LR
|
|
11
|
+
subgraph "Your Machine"
|
|
12
|
+
CC1["Claude Code<br/>(Session 1)"] --> CS1["Channel Server"]
|
|
13
|
+
CC2["Claude Code<br/>(Session 2)"] --> CS2["Channel Server"]
|
|
14
|
+
CC3["Claude Code<br/>(Session 3)"] --> CS3["Channel Server"]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
CS1 -->|WebSocket| HUB["Hub Server<br/>:7900"]
|
|
18
|
+
CS2 -->|WebSocket| HUB
|
|
19
|
+
CS3 -->|WebSocket| HUB
|
|
20
|
+
|
|
21
|
+
HUB -->|HTTP| DASH["Web Dashboard"]
|
|
22
|
+
HUB -->|Toast| NOTIF["Desktop<br/>Notifications"]
|
|
23
|
+
|
|
24
|
+
subgraph "Remote Machine (optional)"
|
|
25
|
+
CC4["Claude Code<br/>(Session 4)"] --> CS4["Channel Server"]
|
|
26
|
+
end
|
|
27
|
+
CS4 -->|WebSocket| HUB
|
|
28
|
+
|
|
29
|
+
style HUB fill:#7c6aef,stroke:#5a4db8,color:#fff
|
|
30
|
+
style DASH fill:#3dd68c,stroke:#22a06b,color:#000
|
|
31
|
+
style NOTIF fill:#f5c542,stroke:#d4a72c,color:#000
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
graph TD
|
|
38
|
+
A["Multi-Session<br/>Monitoring"] --> |"real-time"| B["Session Status<br/>idle · working · waiting"]
|
|
39
|
+
A --> |"two-way"| C["Message Exchange<br/>text + markdown + images"]
|
|
40
|
+
A --> |"alerts"| D["Desktop Notifications<br/>Windows · macOS · Linux"]
|
|
41
|
+
A --> |"security"| E["Token Auth<br/>auto-generated"]
|
|
42
|
+
A --> |"theme"| F["Dark / Light Mode"]
|
|
43
|
+
A --> |"remote"| G["Multi-Machine<br/>Support"]
|
|
44
|
+
|
|
45
|
+
style A fill:#7c6aef,stroke:#5a4db8,color:#fff
|
|
46
|
+
style B fill:#60a5fa,stroke:#3b82f6,color:#000
|
|
47
|
+
style C fill:#3dd68c,stroke:#22a06b,color:#000
|
|
48
|
+
style D fill:#f5c542,stroke:#d4a72c,color:#000
|
|
49
|
+
style E fill:#ef4444,stroke:#dc2626,color:#fff
|
|
50
|
+
style F fill:#8b8fa3,stroke:#6b7280,color:#fff
|
|
51
|
+
style G fill:#a78bfa,stroke:#7c3aed,color:#000
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
### 1. Install
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm install -g @delt/claude-alarm
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. Start the Hub
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
claude-alarm hub start
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. Initialize Project
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
cd your-project
|
|
72
|
+
claude-alarm init
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Run Claude Code
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
claude --dangerously-load-development-channels server:claude-alarm
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 5. Open Dashboard
|
|
82
|
+
|
|
83
|
+
Open `http://127.0.0.1:7900` in your browser.
|
|
84
|
+
|
|
85
|
+
## Message Flow
|
|
86
|
+
|
|
87
|
+
```mermaid
|
|
88
|
+
sequenceDiagram
|
|
89
|
+
participant D as Dashboard
|
|
90
|
+
participant H as Hub Server
|
|
91
|
+
participant C as Channel Server
|
|
92
|
+
participant CC as Claude Code
|
|
93
|
+
|
|
94
|
+
D->>H: Send message
|
|
95
|
+
H->>C: Forward via WebSocket
|
|
96
|
+
C->>CC: MCP Channel notification
|
|
97
|
+
CC->>CC: Process & execute
|
|
98
|
+
CC->>C: Call reply tool
|
|
99
|
+
C->>H: Forward reply
|
|
100
|
+
H->>D: Display in chat
|
|
101
|
+
H->>H: Desktop notification
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Dashboard Layout
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
108
|
+
│ Claude Alarm ☽ ● Connected │
|
|
109
|
+
├──────────────┬──────────────────────┬───────────────────────┤
|
|
110
|
+
│ SESSIONS │ Messages │ NOTIFICATIONS │
|
|
111
|
+
│ │ │ │
|
|
112
|
+
│ ┌──────────┐ │ ┌─────────────────┐ │ ┌─────────────────┐ │
|
|
113
|
+
│ │ my-app │ │ │ Claude · 14:30 │ │ │ ● Task complete │ │
|
|
114
|
+
│ │ idle │ │ │ Build succeeded │ │ │ my-app · 14:30│ │
|
|
115
|
+
│ └──────────┘ │ └─────────────────┘ │ └─────────────────┘ │
|
|
116
|
+
│ ┌──────────┐ │ │ ┌─────────────────┐ │
|
|
117
|
+
│ │ api-svc │ │ ┌────────────┐ │ │ ● Error found │ │
|
|
118
|
+
│ │ working │ │ │ You · 14:31│ │ │ api-svc · 14:2│ │
|
|
119
|
+
│ └──────────┘ │ │ Fix the bug│ │ └─────────────────┘ │
|
|
120
|
+
│ ┌──────────┐ │ └────────────┘ │ │
|
|
121
|
+
│ │ frontend │ │ │ │
|
|
122
|
+
│ │ waiting │ │ │ │
|
|
123
|
+
│ └──────────┘ │ │ │
|
|
124
|
+
├──────────────┴──────────────────────┴───────────────────────┤
|
|
125
|
+
│ 📎 [Message input... Shift+Enter ↵] [ Send ] │
|
|
126
|
+
└─────────────────────────────────────────────────────────────┘
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## CLI Commands
|
|
130
|
+
|
|
131
|
+
| Command | Description |
|
|
132
|
+
|---------|-------------|
|
|
133
|
+
| `claude-alarm init` | Setup project and show next steps |
|
|
134
|
+
| `claude-alarm hub start [-d]` | Start hub server (`-d` for daemon) |
|
|
135
|
+
| `claude-alarm hub stop` | Stop hub daemon |
|
|
136
|
+
| `claude-alarm hub status` | Show hub status |
|
|
137
|
+
| `claude-alarm token` | Show auth token |
|
|
138
|
+
| `claude-alarm test` | Send test notification |
|
|
139
|
+
|
|
140
|
+
## Tools Available to Claude
|
|
141
|
+
|
|
142
|
+
| Tool | Description |
|
|
143
|
+
|------|-------------|
|
|
144
|
+
| `notify` | Send a desktop notification (title, message, level) |
|
|
145
|
+
| `reply` | Send a message to the dashboard |
|
|
146
|
+
| `status` | Update session status (idle, working, waiting_input) |
|
|
147
|
+
|
|
148
|
+
## Configuration
|
|
149
|
+
|
|
150
|
+
Config stored at `~/.claude-alarm/config.json`:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"hub": {
|
|
155
|
+
"host": "127.0.0.1",
|
|
156
|
+
"port": 7900,
|
|
157
|
+
"token": "auto-generated-uuid"
|
|
158
|
+
},
|
|
159
|
+
"notifications": {
|
|
160
|
+
"desktop": true,
|
|
161
|
+
"sound": true
|
|
162
|
+
},
|
|
163
|
+
"webhooks": []
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Custom Session Names
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"mcpServers": {
|
|
172
|
+
"claude-alarm": {
|
|
173
|
+
"command": "npx",
|
|
174
|
+
"args": ["-y", "@delt/claude-alarm", "serve"],
|
|
175
|
+
"env": {
|
|
176
|
+
"CLAUDE_ALARM_SESSION_NAME": "my-project"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Webhooks
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"webhooks": [
|
|
188
|
+
{
|
|
189
|
+
"url": "https://hooks.slack.com/services/...",
|
|
190
|
+
"headers": { "Content-Type": "application/json" }
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Remote Access
|
|
197
|
+
|
|
198
|
+
```mermaid
|
|
199
|
+
graph LR
|
|
200
|
+
subgraph "Hub PC"
|
|
201
|
+
HUB["Hub Server<br/>0.0.0.0:7900"]
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
subgraph "Remote PC"
|
|
205
|
+
RC["Claude Code"] --> RCS["Channel Server"]
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
subgraph "Browser (any device)"
|
|
209
|
+
DASH["Dashboard"]
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
RCS -->|"WS + token"| HUB
|
|
213
|
+
DASH -->|"HTTP + token"| HUB
|
|
214
|
+
|
|
215
|
+
style HUB fill:#7c6aef,stroke:#5a4db8,color:#fff
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
1. Set host to `0.0.0.0` in `~/.claude-alarm/config.json`
|
|
219
|
+
2. Open port 7900 in your firewall
|
|
220
|
+
3. On remote machine: `claude-alarm init` → select remote hub (Y)
|
|
221
|
+
|
|
222
|
+
```json
|
|
223
|
+
{
|
|
224
|
+
"mcpServers": {
|
|
225
|
+
"claude-alarm": {
|
|
226
|
+
"command": "npx",
|
|
227
|
+
"args": ["-y", "@delt/claude-alarm", "serve"],
|
|
228
|
+
"env": {
|
|
229
|
+
"CLAUDE_ALARM_HUB_HOST": "your-server-ip",
|
|
230
|
+
"CLAUDE_ALARM_HUB_PORT": "7900",
|
|
231
|
+
"CLAUDE_ALARM_HUB_TOKEN": "your-token"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Image Upload (Local Sessions)
|
|
239
|
+
|
|
240
|
+
Send images to Claude via the dashboard:
|
|
241
|
+
- **Ctrl+V** — Paste from clipboard
|
|
242
|
+
- **Drag & Drop** — Drop image onto message area
|
|
243
|
+
- **Attach button** — Click 📎 to browse files
|
|
244
|
+
|
|
245
|
+
> Images are only available for local sessions (same machine as Hub). Max 10MB, auto-deleted after 5 minutes.
|
|
246
|
+
|
|
247
|
+
## Platform Support
|
|
248
|
+
|
|
249
|
+
| Platform | Notifications | Engine |
|
|
250
|
+
|----------|:---:|--------|
|
|
251
|
+
| Windows | ✓ | SnoreToast |
|
|
252
|
+
| macOS | ✓ | terminal-notifier |
|
|
253
|
+
| Linux | ✓ | notify-send |
|
|
254
|
+
|
|
255
|
+
## Requirements
|
|
256
|
+
|
|
257
|
+
- Node.js >= 18
|
|
258
|
+
- Claude Code with MCP Channels support
|
|
259
|
+
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
MIT
|