@dolusoft/claude-collab 0.1.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Dolusoft
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,236 @@
1
+ # Claude Collab
2
+
3
+ Real-time team collaboration between Claude Code terminals via MCP (Model Context Protocol).
4
+
5
+ [![npm version](https://badge.fury.io/js/@dolusoft%2Fclaude-collab.svg)](https://www.npmjs.com/package/@dolusoft/claude-collab)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Overview
9
+
10
+ Claude Collab enables multiple Claude Code terminals to communicate with each other in real-time. Perfect for teams where frontend and backend developers need their Claude Code instances to share context, ask questions, and coordinate on complex debugging sessions.
11
+
12
+ ```
13
+ ┌─────────────────┐ ┌─────────────────┐
14
+ │ Frontend │◄───────►│ Backend │
15
+ │ Claude Code │ Hub │ Claude Code │
16
+ │ Terminal │ │ Terminal │
17
+ └─────────────────┘ └─────────────────┘
18
+ ```
19
+
20
+ ## Features
21
+
22
+ - **Real-time Communication**: Instant message exchange between Claude Code terminals
23
+ - **Team Channels**: Organize communication by team (frontend, backend, devops, etc.)
24
+ - **Question & Answer**: Ask questions to other teams and receive responses
25
+ - **Markdown Support**: Share code snippets and formatted text
26
+ - **Auto-Hub**: Hub server starts automatically when needed
27
+ - **Zero Config**: Works out of the box with sensible defaults
28
+
29
+ ## Installation
30
+
31
+ No cloning required! Install directly via npx:
32
+
33
+ ```bash
34
+ # Start the hub server
35
+ npx @dolusoft/claude-collab hub start
36
+
37
+ # Or add to Claude Code with auto-hub
38
+ claude mcp add claude-collab -- npx @dolusoft/claude-collab client --team frontend --auto-hub
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ ### 1. Start the Hub (one-time setup)
44
+
45
+ ```bash
46
+ npx @dolusoft/claude-collab hub start
47
+ ```
48
+
49
+ The hub runs on `localhost:9999` by default.
50
+
51
+ ### 2. Add to Claude Code
52
+
53
+ **Frontend Terminal:**
54
+ ```bash
55
+ claude mcp add claude-collab -- npx @dolusoft/claude-collab client --team frontend
56
+ ```
57
+
58
+ **Backend Terminal:**
59
+ ```bash
60
+ claude mcp add claude-collab -- npx @dolusoft/claude-collab client --team backend
61
+ ```
62
+
63
+ ### 3. Start Collaborating
64
+
65
+ In your Claude Code session, you can now use these tools:
66
+
67
+ ```
68
+ # Join a team
69
+ > Ask Claude to join the frontend team
70
+
71
+ # Ask a question to another team
72
+ > "Ask the backend team: What's the response format for the /users endpoint?"
73
+
74
+ # Check incoming questions
75
+ > "Check my inbox for questions from other teams"
76
+
77
+ # Reply to a question
78
+ > "Reply to question q_123: The endpoint returns JSON with id, name, email fields"
79
+ ```
80
+
81
+ ## MCP Tools
82
+
83
+ | Tool | Description | Example |
84
+ |------|-------------|---------|
85
+ | `join` | Join a team channel | `join("frontend")` |
86
+ | `ask` | Ask a question (waits 30s for response) | `ask("backend", "API format?")` |
87
+ | `inbox` | List incoming questions | `inbox()` |
88
+ | `reply` | Reply to a question | `reply("q_123", "Here's the answer...")` |
89
+
90
+ ## Use Cases
91
+
92
+ ### Bug Coordination
93
+
94
+ ```
95
+ Frontend: "Backend team, we're seeing duplicate SignalR messages.
96
+ Can you check if OnConnectedAsync is being called multiple times?"
97
+
98
+ Backend: "Found it! Logs show 2 connection IDs for the same user:
99
+ conn_abc123 - 10:00:01
100
+ conn_xyz789 - 10:00:01
101
+ Looks like React StrictMode is causing double connections."
102
+ ```
103
+
104
+ ### API Design Sync
105
+
106
+ ```
107
+ Frontend: "What should the request payload look like for the new checkout flow?"
108
+
109
+ Backend: "Here's the schema:
110
+ ```json
111
+ {
112
+ \"items\": [{\"id\": string, \"quantity\": number}],
113
+ \"paymentMethod\": \"card\" | \"paypal\"
114
+ }
115
+ ```"
116
+ ```
117
+
118
+ ## Configuration
119
+
120
+ ### Environment Variables
121
+
122
+ | Variable | Default | Description |
123
+ |----------|---------|-------------|
124
+ | `CLAUDE_COLLAB_PORT` | `9999` | Hub server port |
125
+ | `CLAUDE_COLLAB_HOST` | `localhost` | Hub server host |
126
+
127
+ ### CLI Options
128
+
129
+ ```bash
130
+ # Hub server
131
+ npx @dolusoft/claude-collab hub start --port 9999 --host localhost
132
+
133
+ # Client
134
+ npx @dolusoft/claude-collab client --team frontend --port 9999 --host localhost --auto-hub
135
+ ```
136
+
137
+ ## Architecture
138
+
139
+ Claude Collab uses a hub-and-spoke architecture:
140
+
141
+ ```
142
+ ┌─────────────────────────────────┐
143
+ │ HUB SERVER │
144
+ │ (WebSocket, port 9999) │
145
+ │ │
146
+ │ ┌─────────┐ ┌─────────────┐ │
147
+ │ │ Teams │ │ Questions │ │
148
+ │ │ Members │ │ Answers │ │
149
+ │ └─────────┘ └─────────────┘ │
150
+ └──────────┬──────────────────────┘
151
+
152
+ ┌────────────────┼────────────────┐
153
+ │ │ │
154
+ ▼ ▼ ▼
155
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
156
+ │ MCP │ │ MCP │ │ MCP │
157
+ │ Client 1 │ │ Client 2 │ │ Client N │
158
+ │(frontend)│ │(backend) │ │ (devops) │
159
+ └──────────┘ └──────────┘ └──────────┘
160
+ │ │ │
161
+ ▼ ▼ ▼
162
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
163
+ │ Claude │ │ Claude │ │ Claude │
164
+ │ Code │ │ Code │ │ Code │
165
+ │Terminal 1│ │Terminal 2│ │Terminal N│
166
+ └──────────┘ └──────────┘ └──────────┘
167
+ ```
168
+
169
+ ### Domain-Driven Design
170
+
171
+ The codebase follows DDD principles with 4 layers:
172
+
173
+ ```
174
+ src/
175
+ ├── domain/ # Entities, Value Objects, Domain Events
176
+ ├── application/ # Use Cases, DTOs
177
+ ├── infrastructure/ # WebSocket, Repositories
178
+ └── presentation/ # MCP Tools, CLI
179
+ ```
180
+
181
+ ## Development
182
+
183
+ ### Prerequisites
184
+
185
+ - Node.js 20+
186
+ - pnpm (recommended) or npm
187
+
188
+ ### Setup
189
+
190
+ ```bash
191
+ git clone https://github.com/dolusoft/claude-collab.git
192
+ cd claude-collab
193
+ pnpm install
194
+ ```
195
+
196
+ ### Commands
197
+
198
+ ```bash
199
+ pnpm build # Build the project
200
+ pnpm dev # Watch mode
201
+ pnpm test # Run tests
202
+ pnpm lint # Lint code
203
+ pnpm format # Format code
204
+ ```
205
+
206
+ ### Testing
207
+
208
+ ```bash
209
+ pnpm test # Run all tests
210
+ pnpm test:watch # Watch mode
211
+ pnpm test:coverage # With coverage
212
+ ```
213
+
214
+ ## Contributing
215
+
216
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) first.
217
+
218
+ 1. Fork the repository
219
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
220
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
221
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
222
+ 5. Open a Pull Request
223
+
224
+ ## License
225
+
226
+ MIT License - see [LICENSE](LICENSE) for details.
227
+
228
+ ## Acknowledgments
229
+
230
+ - Built with [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
231
+ - Inspired by the need for better AI-assisted team collaboration
232
+ - Created by [Dolusoft](https://github.com/dolusoft)
233
+
234
+ ---
235
+
236
+ **Note:** This project is in active development. Features may change.
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node