hcom 0.1.0__py3-none-any.whl

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.

Potentially problematic release.


This version of hcom might be problematic. Click here for more details.

@@ -0,0 +1,363 @@
1
+ Metadata-Version: 2.4
2
+ Name: hcom
3
+ Version: 0.1.0
4
+ Summary: Lightweight CLI tool for real-time messaging between Claude Code instances/subagents using hooks
5
+ Author-email: aannoo <your@email.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/aannoo/claude-hook-comms
8
+ Project-URL: Repository, https://github.com/aannoo/claude-hook-comms
9
+ Project-URL: Issues, https://github.com/aannoo/claude-hook-comms/issues
10
+ Keywords: claude,claude-code,hooks,agents,cli,multi-agent-orchestration
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development
24
+ Classifier: Topic :: System :: Shells
25
+ Classifier: Topic :: Communications
26
+ Requires-Python: >=3.6
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Claude Code Hook Comms
30
+
31
+ Lightweight CLI tool for real-time messaging between Claude Code instances/subagents using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
32
+
33
+ ## 🦆 What It Does
34
+
35
+ Creates a group chat where you and multiple interactive Claude Code subagents can communicate with each other across different folders on your computer. Works on Mac, Linux, and Windows with zero dependencies.
36
+
37
+ ![Claude Hook Comms Example](screenshot.jpg)
38
+
39
+ ## 🦷 Key Features
40
+
41
+ - **New Window** - Claude subagents open in new terminals
42
+ - **Multi-Agent Communication** - Claude instances talk to each other across projects
43
+ - **@Mention Targeting** - Send messages to specific subagents or teams
44
+ - **Live Dashboard** - Real-time monitoring of all instances
45
+ - **Zero Dependencies** - Pure Python stdlib, works everywhere
46
+
47
+ ## 🎪 Quick Start
48
+
49
+ ### Download
50
+ ```bash
51
+ curl -sL https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/hcom.py | sudo tee /usr/local/bin/hcom > /dev/null && sudo chmod +x /usr/local/bin/hcom
52
+ ```
53
+
54
+ <details>
55
+ <summary><strong>🦑 Windows</strong></summary>
56
+
57
+ ```powershell
58
+ # Download Python file
59
+ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/hcom.py" -OutFile "hcom.py"
60
+
61
+ # Run python file directly
62
+ python path/to/hcom.py open 2
63
+ ```
64
+ </details>
65
+
66
+ ### Usage
67
+ ```bash
68
+ # 1. Launch 3 Claude instances connected to group chat
69
+ hcom open 3
70
+
71
+ # 2. View/send messages in dashboard
72
+ hcom watch
73
+ ```
74
+
75
+
76
+
77
+ ### Launch Claude Code Agents
78
+ ```bash
79
+ # Launch researcher and code-writer from your .claude/agents
80
+ hcom open researcher code-writer
81
+
82
+ # Launch backend-coder frontend-coder orchestrator tester from your .claude/agents
83
+ hcom open backend-coder frontend-coder orchestrator tester
84
+ ```
85
+
86
+ ### Launch Headless Mode
87
+ ```bash
88
+ # Launch researcher and code-writer from your .claude/agents and work in background
89
+ hcom open researcher code-writer --claude-args "-p"
90
+
91
+ # Launch reviewer in headless mode with a prompt
92
+ hcom open --claude-args "-p 'review git code changes when you get notified'"
93
+ ```
94
+
95
+ ### Launch with Options
96
+ ```bash
97
+ # Launch researcher and code-writer from your .claude/agents and work in background
98
+ hcom open researcher code-writer --prefix 'greenteam'
99
+ hcom send '@greenteam get to work on green stuff'
100
+
101
+ # Launch 2 claude code instances and 2 of your agents
102
+ hcom open 2 backend-coder frontend-coder
103
+ ```
104
+
105
+
106
+ ## 🦐 Requirements
107
+
108
+ - Python 3.6+
109
+ - [Claude Code](https://claude.ai/code)
110
+
111
+
112
+ ## 🥨 Commands
113
+
114
+ ### Commands
115
+ | Command | Description |
116
+ |---------|-------------|
117
+ | `hcom open [n]` | Launch n Claude instances (or named agents) |
118
+ | `hcom watch` | View conversation/status dashboard |
119
+ | `hcom clear` | Clear and archive conversation |
120
+ | `hcom cleanup` | Remove HCOM hooks from current directory |
121
+
122
+ ### Automation Commands
123
+ | Command | Description |
124
+ |---------|-------------|
125
+ | `hcom send 'message'` | Send message |
126
+ | `hcom watch --logs` | View message history (non-interactive) |
127
+ | `hcom watch --status` | Show instance status (non-interactive) |
128
+ | `hcom watch --wait[=seconds]` | Wait for new messages (automation) |
129
+
130
+ ---
131
+
132
+ <details>
133
+ <summary><strong>🦖 Configuration</strong></summary>
134
+
135
+ ### Configuration
136
+
137
+ Settings can be changed two ways:
138
+
139
+ ```bash
140
+ # Method 1: Environment variable (termporary per-command/instance)
141
+ HCOM_INSTANCE_HINTS="always update chat with progress" hcom open nice-subagent-but-not-great-with-updates
142
+
143
+ # Method 2: Config file (affects all instances)
144
+ # Edit ~/.hcom/config.json
145
+ ```
146
+
147
+ ### All Settings
148
+
149
+ ### Config File Location
150
+
151
+ `~/.hcom/config.json`
152
+
153
+ | Setting | Default | Environment Variable | Description |
154
+ |---------|---------|---------------------|-------------|
155
+ | `wait_timeout` | 600 | `HCOM_WAIT_TIMEOUT` | How long instances wait for messages (seconds) |
156
+ | `max_message_size` | 4096 | `HCOM_MAX_MESSAGE_SIZE` | Maximum message length |
157
+ | `max_messages_per_delivery` | 20 | `HCOM_MAX_MESSAGES_PER_DELIVERY` | Messages delivered per batch |
158
+ | `sender_name` | "bigboss" | `HCOM_SENDER_NAME` | Your name in chat |
159
+ | `sender_emoji` | "🐳" | `HCOM_SENDER_EMOJI` | Your emoji icon |
160
+ | `initial_prompt` | "Say hi" | `HCOM_INITIAL_PROMPT` | What new instances are told to do |
161
+ | `first_use_text` | "Essential, concise messages only. Say hi in hcom chat" | `HCOM_FIRST_USE_TEXT` | Welcome message for instances |
162
+ | `terminal_mode` | "new_window" | `HCOM_TERMINAL_MODE` | How to launch terminals ("new_window", "same_terminal", "show_commands") |
163
+ | `terminal_command` | null | `HCOM_TERMINAL_COMMAND` | Custom terminal command (see Terminal Integration) |
164
+ | `cli_hints` | "" | `HCOM_CLI_HINTS` | Extra text added to CLI outputs |
165
+ | `instance_hints` | "" | `HCOM_INSTANCE_HINTS` | Extra text added to instance messages |
166
+ | `env_overrides` | {} | - | Additional environment variables for Claude |
167
+
168
+ ### Examples
169
+
170
+ ```bash
171
+ # Change your name for one command
172
+ HCOM_SENDER_NAME="reviewer" hcom send "LGTM!"
173
+
174
+ # Make instances wait 30 minutes instead of 10
175
+ HCOM_WAIT_TIMEOUT=1800 hcom open 3
176
+
177
+ # Custom welcome message
178
+ HCOM_FIRST_USE_TEXT="Debug session for issue #123" hcom open 2
179
+
180
+ # Bigger messages
181
+ HCOM_MAX_MESSAGE_SIZE=8192 hcom send "$(cat long_report.txt)"
182
+ ```
183
+
184
+ ### Status Indicators
185
+ - ◉ **thinking** (cyan) - Processing input
186
+ - ▷ **responding** (green) - Generating text response
187
+ - ▶ **executing** (green) - Running tools
188
+ - ◉ **waiting** (blue) - Waiting for messages
189
+ - ■ **blocked** (yellow) - Permission blocked
190
+ - ○ **inactive** (red) - Timed out/dead
191
+
192
+ </details>
193
+
194
+ <details>
195
+ <summary><strong>🎲 How It Works</strong></summary>
196
+
197
+ ### Hooks!
198
+
199
+ hcom adds hooks to your project directory's `.claude/settings.local.json`:
200
+
201
+ 1. **Sending**: Claude writes messages with `echo "HCOM_SEND:message"` - captured by PostToolUse hook
202
+ 2. **Receiving**: Other Claudes get notified via Stop hook
203
+ 3. **Waiting**: Stop hook keeps Claude in a waiting state for new messages
204
+
205
+ - **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
206
+ - **Persistence**: Names persist across `claude --resume` maintaining conversation context
207
+ - **Status Detection**: Notification hook tracks permission requests and activity
208
+
209
+ ### Architecture
210
+ - **Single conversation** - All instances share one global conversation
211
+ - **Opt-in participation** - Only instances launched with `hcom open` join the chat
212
+ - **@-mention filtering** - Target messages to specific instances or teams
213
+
214
+ ### File Structure
215
+ ```
216
+ ~/.hcom/
217
+ ├── hcom.log # Conversation log
218
+ ├── hcom.json # Instance tracking
219
+ └── config.json # Configuration
220
+
221
+ your-project/
222
+ └── .claude/
223
+ └── settings.local.json # hcom hooks configuration
224
+ ```
225
+
226
+ </details>
227
+
228
+
229
+ <details>
230
+ <summary><strong>🧈 Launching Claude Code</strong></summary>
231
+
232
+ ### Launching Claude Code
233
+
234
+ Use `hcom open` to automatically launch Claude instances with proper setup:
235
+
236
+ ```bash
237
+ # Launch 3 generic instances
238
+ hcom open 3
239
+
240
+ # Launch with custom terminal mode
241
+ hcom open 2 # Uses terminal_mode from config
242
+
243
+ # Launch named agents
244
+ hcom open writer researcher
245
+ ```
246
+
247
+ Configure terminal behavior in `~/.hcom/config.json`:
248
+ - `"terminal_mode": "new_window"` - Opens new terminal windows (default)
249
+ - `"terminal_mode": "same_terminal"` - Runs in background
250
+ - `"terminal_mode": "show_commands"` - Prints commands without executing
251
+
252
+ ### Running in Current Terminal
253
+ ```bash
254
+ # For single instance work
255
+ HCOM_TERMINAL_MODE=same_terminal hcom open
256
+ # This runs Claude directly in your current terminal
257
+ ```
258
+
259
+ </details>
260
+
261
+ <details>
262
+ <summary><strong>🥔 Integrations</strong></summary>
263
+
264
+ ### Custom Terminal Integration
265
+
266
+ Configure `terminal_command` in `~/.hcom/config.json` to use your preferred terminal:
267
+
268
+ ### iTerm2
269
+ ```json
270
+ {
271
+ "terminal_command": "osascript -e 'tell app \"iTerm\" to create window with default profile command \"{env} {cmd}\"'"
272
+ }
273
+ ```
274
+
275
+ ### Alacritty
276
+ ```json
277
+ {
278
+ "terminal_command": "alacritty -e bash -c '{env} {cmd}'"
279
+ }
280
+ ```
281
+
282
+ ### Windows Terminal
283
+ ```json
284
+ {
285
+ "terminal_command": "wt new-tab cmd /k \"{env} & {cmd}\""
286
+ }
287
+ ```
288
+
289
+ ### Kitty
290
+ ```json
291
+ {
292
+ "terminal_command": "kitty -e bash -c '{env} {cmd}'"
293
+ }
294
+ ```
295
+
296
+ ### tmux
297
+ ```json
298
+ {
299
+ "terminal_command": "tmux new-window -n hcom '{env} {cmd}'"
300
+ }
301
+ ```
302
+
303
+ ### screen
304
+ ```json
305
+ {
306
+ "terminal_command": "screen -dmS hcom-$$ bash -c '{env} {cmd}'"
307
+ }
308
+ ```
309
+
310
+ ### Available Placeholders
311
+ - `{cmd}` - The claude command to execute
312
+ - `{env}` - Environment variables (pre-formatted)
313
+ - `{cwd}` - Current working directory
314
+
315
+ </details>
316
+
317
+ <details>
318
+ <summary><strong>🥚 Troubleshooting</strong></summary>
319
+
320
+ ### Common Issues
321
+
322
+ - **Claude stops responding**: Default idle timeout is 10 minutes (configure via `wait_timeout`)
323
+ - **Message truncated**: Message size limit is 4096 chars (configure via `max_message_size`)
324
+
325
+ ### Debug Commands
326
+ ```bash
327
+ # Run Claude in debug mode to see hook execution
328
+ hcom open --claude-args "--debug"
329
+
330
+ # View conversation log
331
+ tail -f ~/.hcom/hcom.log
332
+
333
+ # Check instance status
334
+ cat ~/.hcom/hcom.json
335
+
336
+ ```
337
+ </details>
338
+
339
+ <details>
340
+ <summary><strong>🦆 Remove</strong></summary>
341
+
342
+
343
+ ### Archive Conversation / Start New
344
+ ```bash
345
+ hcom clear
346
+ ```
347
+
348
+ ### Remove all HCOM hooks
349
+ ```bash
350
+ hcom clenup --all
351
+ ```
352
+
353
+ ### Remove hcom Completely
354
+ 1. Remove hcom: `rm /usr/local/bin/hcom` (or wherever you installed hcom)
355
+ 2. Remove all data: `rm -rf ~/.hcom`
356
+
357
+ </details>
358
+
359
+ ## 🌮 License
360
+
361
+ MIT License
362
+
363
+ ---
@@ -0,0 +1,7 @@
1
+ hcom/__init__.py,sha256=TF-Q3b4Xkh9LTXMYh4JS-zHGLmVx9hiNqeU0lilogYw,96
2
+ hcom/__main__.py,sha256=TIdmomB1z9SPco-Oidt6AloE5-abhS6aanhLUpRzk7s,68712
3
+ hcom-0.1.0.dist-info/METADATA,sha256=O2sTsNatksZ1SVwl2dPbprJKI0gRLeOFUlHMPDvtrg4,10545
4
+ hcom-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ hcom-0.1.0.dist-info/entry_points.txt,sha256=cz9K9PsgYmORUxNKxVRrpxLS3cxRJcDZkE-PpfvOhI8,44
6
+ hcom-0.1.0.dist-info/top_level.txt,sha256=8AS1nVUWA26vxjDQ5viRxgJnwSvUWk1W6GP4g6ldZ-0,5
7
+ hcom-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ hcom = hcom.__main__:main
@@ -0,0 +1 @@
1
+ hcom