@kosinal/claude-code-dashboard 0.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 +674 -0
- package/README.md +89 -0
- package/dist/bin.js +1421 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# claude-code-dashboard
|
|
2
|
+
|
|
3
|
+
Real-time browser dashboard for Claude Code session states.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Claude Code hooks ──POST JSON──▶ HTTP server ──SSE──▶ Browser dashboard
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Claude Code fires [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks) on session lifecycle events. The dashboard installs hooks that `curl`/`Invoke-WebRequest` each event to a local HTTP server. The server maintains an in-memory session store and pushes updates to all connected browsers via Server-Sent Events (SSE).
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @kosinal/claude-code-dashboard
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Open `http://localhost:8377` in your browser, then start a Claude Code session — it will appear on the dashboard automatically.
|
|
20
|
+
|
|
21
|
+
Press `Ctrl+C` to stop. Hooks are removed automatically on exit.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Quick mode (default)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx @kosinal/claude-code-dashboard # start on default port 8377
|
|
29
|
+
npx @kosinal/claude-code-dashboard --port 9000 # use a custom port
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Starts the server and installs temporary hooks into `~/.claude/settings.json`. Hooks are cleaned up when the dashboard stops.
|
|
33
|
+
|
|
34
|
+
### Install mode
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @kosinal/claude-code-dashboard install # persistent install
|
|
38
|
+
npx @kosinal/claude-code-dashboard install --port 9000 # custom port
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Copies the server to `~/.claude/dashboard/` and installs persistent hooks. The dashboard auto-launches in the background when any Claude Code session starts.
|
|
42
|
+
|
|
43
|
+
### Uninstall
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @kosinal/claude-code-dashboard uninstall
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Removes hooks from `settings.json` and deletes `~/.claude/dashboard/`.
|
|
50
|
+
|
|
51
|
+
### Options
|
|
52
|
+
|
|
53
|
+
| Flag | Description |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `--port <number>` | Port to listen on (default: `8377`) |
|
|
56
|
+
| `--no-hooks` | Start the server without installing hooks |
|
|
57
|
+
| `-h`, `--help` | Show help message |
|
|
58
|
+
|
|
59
|
+
## Session states
|
|
60
|
+
|
|
61
|
+
| Hook event | Dashboard status |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `SessionStart` | Waiting for input |
|
|
64
|
+
| `UserPromptSubmit` | Running |
|
|
65
|
+
| `Stop` | Waiting for input |
|
|
66
|
+
| `SessionEnd` | Done |
|
|
67
|
+
|
|
68
|
+
Sessions are sorted by status (running first, then waiting, then done) and by last update time within each group.
|
|
69
|
+
|
|
70
|
+
## Limitations
|
|
71
|
+
|
|
72
|
+
- Sessions that were already running before the dashboard started are **not tracked**. Only sessions that fire a hook event after the dashboard is running will appear.
|
|
73
|
+
- Session state is held in memory — restarting the dashboard clears all sessions.
|
|
74
|
+
|
|
75
|
+
## Requirements
|
|
76
|
+
|
|
77
|
+
- Node.js >= 18
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm install # install dev dependencies
|
|
83
|
+
npm run build # bundle with tsup (ESM, node18 target)
|
|
84
|
+
npm test # run tests (node:test with --experimental-strip-types)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
GNU GENERAL PUBLIC LICENSE
|