@dolusoft/claude-collab 1.5.0 → 1.6.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 +39 -85
- package/dist/cli.js +246 -418
- package/dist/cli.js.map +1 -1
- package/dist/mcp-main.js +154 -441
- package/dist/mcp-main.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,133 +1,88 @@
|
|
|
1
1
|
# Claude Collab
|
|
2
2
|
|
|
3
|
-
Real-time
|
|
3
|
+
Real-time collaboration between Claude Code terminals via MCP (Model Context Protocol).
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@dolusoft/claude-collab)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Claude Collab lets multiple Claude Code terminals communicate with each other in real-time
|
|
10
|
+
Claude Collab lets multiple Claude Code terminals communicate with each other in real-time. One machine runs a lightweight hub server; everyone else connects to it — no firewall rules needed for clients.
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
│
|
|
16
|
-
|
|
17
|
-
auto-discovered via UDP multicast (239.255.42.42)
|
|
13
|
+
alice ──outbound──→ ┌─────────────────┐ ←──outbound── bob
|
|
14
|
+
charlie─outbound──→ │ hub server │ ←──outbound── dave
|
|
15
|
+
│ 192.168.1.5:9999│
|
|
16
|
+
└─────────────────┘
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
##
|
|
19
|
+
## Setup
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
- When a terminal comes online it announces itself; others discover it automatically
|
|
24
|
-
- Direct WebSocket connections are established between peers — no central server
|
|
25
|
-
- When a terminal goes offline, peers detect it and remove it from the list
|
|
21
|
+
### Step 1 — Start the hub (one machine, one time)
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Option 1 — Without global install (recommended)
|
|
23
|
+
Pick any machine on your network. Run in a terminal:
|
|
30
24
|
|
|
31
25
|
```bash
|
|
32
|
-
|
|
26
|
+
npx @dolusoft/claude-collab --hub --port 9999
|
|
33
27
|
```
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
Keep this terminal open. The hub routes messages between everyone.
|
|
36
30
|
|
|
37
|
-
###
|
|
31
|
+
### Step 2 — Add to Claude Code (each machine, one time)
|
|
38
32
|
|
|
39
33
|
```bash
|
|
40
|
-
|
|
41
|
-
claude mcp add claude-collab -- claude-collab --name alice
|
|
34
|
+
claude mcp add claude-collab -- npx -y @dolusoft/claude-collab --name alice --server 192.168.1.5:9999
|
|
42
35
|
```
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
Replace `alice` with your name and `192.168.1.5:9999` with the hub machine's IP and port.
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
> Your name and server address are saved permanently in Claude Code's MCP config. Every time Claude Code opens, it connects automatically — you never need to reconfigure.
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
claude mcp add claude-collab -- npx -y @dolusoft/claude-collab --name alice
|
|
51
|
-
```
|
|
41
|
+
### With global install
|
|
52
42
|
|
|
53
|
-
**Machine 2 (Bob):**
|
|
54
43
|
```bash
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Open Claude Code on both machines. Within ~30 seconds they find each other automatically. Then just use the tools:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
# Ask bob a question (alice's terminal)
|
|
62
|
-
ask("bob", "What's the API response format for /users?")
|
|
44
|
+
npm install -g @dolusoft/claude-collab
|
|
63
45
|
|
|
64
|
-
#
|
|
65
|
-
|
|
46
|
+
# Hub:
|
|
47
|
+
claude-collab --hub --port 9999
|
|
66
48
|
|
|
67
|
-
#
|
|
68
|
-
|
|
49
|
+
# Client (add to Claude Code):
|
|
50
|
+
claude mcp add claude-collab -- claude-collab --name alice --server 192.168.1.5:9999
|
|
69
51
|
```
|
|
70
52
|
|
|
71
53
|
## MCP Tools
|
|
72
54
|
|
|
73
55
|
| Tool | Description |
|
|
74
56
|
|------|-------------|
|
|
75
|
-
| `ask` | Ask
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `get_info` | Show your name, port, local IPs, and connected peers. |
|
|
80
|
-
|
|
81
|
-
## Use Cases
|
|
57
|
+
| `ask` | Ask another peer a question. Waits up to 5 minutes for a response. |
|
|
58
|
+
| `reply` | Reply to an incoming question (called automatically by Claude). |
|
|
59
|
+
| `peers` | Show currently connected peers. |
|
|
60
|
+
| `history` | Show past questions and answers from this session. |
|
|
82
61
|
|
|
83
|
-
|
|
62
|
+
## Example
|
|
84
63
|
|
|
85
64
|
```
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
# Alice asks Bob
|
|
66
|
+
ask("bob", "What's the response format for the /users endpoint?")
|
|
88
67
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### API Design Sync
|
|
68
|
+
# Bob sees the question automatically and replies
|
|
69
|
+
reply("q_abc123", "Returns JSON: { id, name, email }")
|
|
94
70
|
|
|
71
|
+
# Alice sees the answer
|
|
95
72
|
```
|
|
96
|
-
alice: ask("bob", "What should the request payload look like for checkout?")
|
|
97
|
-
|
|
98
|
-
bob: reply("q_xyz", "Here's the schema:
|
|
99
|
-
{ items: [{id: string, quantity: number}], paymentMethod: 'card' | 'paypal' }")
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Network Requirements
|
|
103
|
-
|
|
104
|
-
- All machines must be on the **same local network** (LAN, office Wi-Fi, home network, or VPN)
|
|
105
|
-
- UDP multicast port `11776` must be reachable within the subnet (not blocked between peers)
|
|
106
|
-
- WebSocket port (auto-selected in range `11700–11750`) needs to be accessible on the local network
|
|
107
|
-
|
|
108
|
-
On first run, Windows will ask "Allow this app on the network?" — click **Allow**. This is a one-time prompt per machine.
|
|
109
|
-
|
|
110
|
-
## Configuration
|
|
111
|
-
|
|
112
|
-
| Env variable | Default | Description |
|
|
113
|
-
|---|---|---|
|
|
114
|
-
| `CLAUDE_COLLAB_PORT_MIN` | `11700` | WS port range start |
|
|
115
|
-
| `CLAUDE_COLLAB_PORT_MAX` | `11750` | WS port range end |
|
|
116
73
|
|
|
117
74
|
## Architecture
|
|
118
75
|
|
|
119
76
|
```
|
|
120
77
|
src/
|
|
121
|
-
├── domain/ # Entities, Value Objects, Domain Events
|
|
122
|
-
├── application/ # Use Cases, DTOs
|
|
123
78
|
├── infrastructure/
|
|
124
|
-
│ ├──
|
|
125
|
-
│ │ ├──
|
|
126
|
-
│ │ ├──
|
|
127
|
-
│ │ └──
|
|
128
|
-
│ └── terminal-injector/
|
|
79
|
+
│ ├── hub/
|
|
80
|
+
│ │ ├── hub-server.ts # WebSocket hub — routes messages by name
|
|
81
|
+
│ │ ├── hub-client.ts # Connects to hub, implements ICollabClient
|
|
82
|
+
│ │ └── hub-protocol.ts # Wire protocol types
|
|
83
|
+
│ └── terminal-injector/ # Injects incoming questions into Claude Code
|
|
129
84
|
└── presentation/
|
|
130
|
-
└── mcp/
|
|
85
|
+
└── mcp/ # MCP server + tools
|
|
131
86
|
```
|
|
132
87
|
|
|
133
88
|
## Development
|
|
@@ -136,9 +91,8 @@ src/
|
|
|
136
91
|
git clone https://github.com/dolusoft/claude-collab.git
|
|
137
92
|
cd claude-collab
|
|
138
93
|
pnpm install
|
|
139
|
-
pnpm build
|
|
140
|
-
pnpm test
|
|
141
|
-
pnpm dev # watch mode
|
|
94
|
+
pnpm build
|
|
95
|
+
pnpm test
|
|
142
96
|
```
|
|
143
97
|
|
|
144
98
|
## License
|