hcom 0.4.0__py3-none-any.whl → 0.5.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.

@@ -1,469 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hcom
3
- Version: 0.4.0
4
- Summary: CLI tool for launching multiple Claude Code terminals with interactive subagents, headless persistence, and real-time communication via hooks
5
- Author: aannoo
6
- License-Expression: 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
- Project-URL: Documentation, https://github.com/aannoo/claude-hook-comms#readme
11
- Keywords: claude,claude-code,hooks,agents,cli,multi-agent,orchestration,terminal
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Environment :: Console
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Operating System :: MacOS
17
- Classifier: Operating System :: Microsoft :: Windows
18
- Classifier: Operating System :: POSIX :: Linux
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Topic :: Communications :: Chat
22
- Classifier: Topic :: Software Development
23
- Classifier: Topic :: System :: Monitoring
24
- Classifier: Topic :: Terminals
25
- Requires-Python: >=3.10
26
- Description-Content-Type: text/markdown
27
-
28
- # hcom - Claude Hook Comms
29
-
30
- [![PyPI - Version](https://img.shields.io/pypi/v/hcom)](https://pypi.org/project/hcom/)
31
- [![PyPI - License](https://img.shields.io/pypi/l/hcom)](https://opensource.org/license/MIT) [![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://python.org) [![DeepWiki](https://img.shields.io/badge/DeepWiki-aannoo%2Fclaude--hook--comms-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAA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dWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/aannoo/claude-hook-comms)
32
-
33
- CLI tool for launching multiple Claude Code terminals with interactive [subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents), headless persistence, and real-time communication via [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks). Works on Mac, Linux, Windows, and Android with zero dependencies.
34
-
35
- ![Claude Code Hook Comms Example](https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/screencapture.gif)
36
-
37
- ## 🥦 Usage
38
-
39
- **Run without installing** ([uv](https://docs.astral.sh/uv/#installation))
40
- ```bash
41
- uvx hcom open 2
42
- ```
43
-
44
- **Install**
45
- ```bash
46
- pip install hcom
47
- hcom open 2
48
- ```
49
-
50
- | Commands | |
51
- |---------|-------------|
52
- | `hcom open [n]` | Launch `n` instances or named agents |
53
- | `hcom watch` | View live dashboard and messaging |
54
- | `hcom stop` | Disable hcom chat for instance |
55
- | `hcom start` | Enable hcom chat for instance |
56
-
57
-
58
- ## 🦆 What It Does
59
-
60
- `hcom open` adds hooks to the `.claude/settings.local.json` file in the current folder and launches terminals with claude code that remain active, waiting to respond to messages in the shared chat. Normal Claude Code opened with `claude` remains unaffected by hcom, but can opt-in via `hcom start` and opt-out with `hcom stop`.
61
-
62
-
63
- ### Interactive subagents in their own terminal
64
- ```bash
65
- # Launch subagents from your .claude/agents
66
- hcom open -a planner -a code-writer -a reviewer
67
- ```
68
-
69
- ### Persistent headless instances
70
- ```bash
71
- # Launch one headless instance (default 30min timeout)
72
- hcom open -p
73
- hcom stop # Stop it earlier than timeout
74
- ```
75
-
76
- ### Groups and direct messages
77
- ```bash
78
- hcom open 2 -t cool # Creates cool-hovoa7 & cool-homab8
79
- hcom send '@cool hi, you are cool'
80
- hcom send '@homab8 hi, you are cooler'
81
- ```
82
-
83
- ### Toggle HCOM in Claude Code
84
- ```bash
85
- claude # Start normal Claude Code
86
- 'run hcom start' # Start HCOM for this instance to receive messages
87
- 'run hcom stop' # Stop HCOM for this instance, continue as normal claude code
88
- ```
89
-
90
- ---
91
-
92
-
93
- <details>
94
- <summary><strong>🦷 Features</strong></summary>
95
-
96
- - **Multi-Terminal Launch** - Launch Claude Code subagents in new terminals
97
- - **Background Mode** - Run headless instances without terminal windows
98
- - **Interactive subagents** - Run subagents in their own terminal window
99
- - **Live Dashboard** - Real-time monitoring and messaging
100
- - **Multi-Agent Communication** - Instances talk to each other via shared chat
101
- - **@Mention Targeting** - Send messages to specific instances or teams
102
- - **Session Persistence** - Resume previous conversations automatically
103
- - **Zero Dependencies** - Pure Python stdlib, works everywhere
104
- - **Cross-platform** - Native support for Windows, WSL, macOS, Linux, Android
105
-
106
- </details>
107
-
108
- <details>
109
- <summary><strong>🥨 All Commands</strong></summary>
110
-
111
- ```bash
112
- Usage:
113
- hcom open [count] [-a agent]... [-t prefix] [-p] [-- claude-args]
114
- hcom watch [--logs|--status|--wait [SEC]]
115
- hcom stop [target] [--force]
116
- hcom start [target]
117
- hcom send "msg"
118
-
119
- Commands:
120
- open Launch Claude instances (default count: 1)
121
- watch Monitor conversation dashboard
122
- stop Stop instances, clear conversation, or remove hooks
123
- start Start stopped instances
124
- send Send message to instances
125
-
126
- Open options:
127
- [count] Number of instances per agent (default 1)
128
- -a, --agent AGENT Agent to launch (repeatable)
129
- -t, --prefix PREFIX Team prefix for names
130
- -p, --background Launch in background
131
-
132
- Stop targets:
133
- (no arg) Stop HCOM for current instance (when inside)
134
- <alias> Stop HCOM for specific instance
135
- all Stop all instances + clear & archive conversation
136
- hooking Remove hooks from current directory
137
- hooking --all Remove hooks from all tracked directories
138
- everything Stop all + clear conversation + remove all hooks
139
-
140
- Start targets:
141
- (no arg) Start HCOM for current instance (when inside)
142
- <alias> Start HCOM for specific instance
143
- hooking Install hooks in current directory
144
-
145
- Watch options:
146
- --logs Show message history
147
- --status Show instance status JSON
148
- --wait [SEC] Wait for new messages (default 60s)
149
-
150
- Stop flags:
151
- --force Force stop (deny Bash tool use)
152
- ```
153
-
154
- </details>
155
-
156
-
157
-
158
- <details>
159
- <summary><strong>🗿 Examples</strong></summary>
160
-
161
- ```bash
162
- # Launch 3 headless instances that time out after 60 seconds of inactivity
163
- HCOM_WAIT_TIMEOUT="60" hcom open 3 -p
164
- # Stop all instances
165
- hcom stop all
166
-
167
- # Launch multiple of the same subagent
168
- hcom open 3 -a reviewer
169
-
170
- # Launch mixed agents with team prefix
171
- hcom open -t api -a backend -a frontend
172
-
173
- # Launch agent with specific prompt
174
- HCOM_INITIAL_PROMPT='write tests' hcom open -a test-writer
175
-
176
- # Resume instance (hcom chat will continue)
177
- hcom open -- --resume session_id
178
-
179
- # Text appended to all messages recieved by instance
180
- HCOM_INSTANCE_HINTS="remember where you came from" hcom open
181
-
182
- # Pass multiple Claude flags
183
- hcom open -a orchestrator -- --model sonnet --resume session_id
184
-
185
- </details>
186
-
187
- <details>
188
- <summary><strong>🦖 Configuration</strong></summary>
189
-
190
- ### Configuration
191
-
192
- Settings can be changed two ways:
193
-
194
- #### Method 1: Environment variable (temporary, per-command/instance)
195
-
196
-
197
- ```bash
198
- HCOM_INSTANCE_HINTS="always update chat with progress" hcom open nice-subagent-but-not-great-with-updates
199
- ```
200
-
201
- #### Method 2: Config file (persistent, affects all instances)
202
-
203
- ### Config File Location
204
-
205
- `~/.hcom/config.json`
206
-
207
- | Setting | Default | Environment Variable | Description |
208
- |---------|---------|---------------------|-------------|
209
- | `wait_timeout` | 1800 | `HCOM_WAIT_TIMEOUT` | How long instances wait for messages (seconds) |
210
- | `max_message_size` | 1048576 | `HCOM_MAX_MESSAGE_SIZE` | Maximum message length (1MB) |
211
- | `max_messages_per_delivery` | 50 | `HCOM_MAX_MESSAGES_PER_DELIVERY` | Messages delivered per batch |
212
- | `sender_name` | "bigboss" | `HCOM_SENDER_NAME` | Your name in chat |
213
- | `sender_emoji` | "🐳" | `HCOM_SENDER_EMOJI` | Your emoji icon |
214
- | `initial_prompt` | "Say hi in chat" | `HCOM_INITIAL_PROMPT` | What new instances are told to do |
215
- | `first_use_text` | "Essential, concise messages only" | `HCOM_FIRST_USE_TEXT` | Welcome message for instances |
216
- | `terminal_mode` | "new_window" | `HCOM_TERMINAL_MODE` | How to launch terminals ("new_window", "same_terminal", "show_commands") |
217
- | `terminal_command` | null | `HCOM_TERMINAL_COMMAND` | Custom terminal command (see Terminal Options) |
218
- | `cli_hints` | "" | `HCOM_CLI_HINTS` | Extra text added to CLI outputs |
219
- | `instance_hints` | "" | `HCOM_INSTANCE_HINTS` | Extra text added to instance messages |
220
- | `auto_watch` | true | `HCOM_AUTO_WATCH` | Auto-launch watch dashboard after open |
221
- | `env_overrides` | {} | - | Additional environment variables for Claude Code |
222
-
223
- ### Examples
224
-
225
- ```bash
226
- # Change your name for one command
227
- HCOM_SENDER_NAME="coolguy" hcom send "LGTM!"
228
-
229
- # Make instances timeout after 60 seconds instead of 30 minutes
230
- HCOM_WAIT_TIMEOUT=60 hcom open 3
231
-
232
- # Custom welcome message
233
- HCOM_FIRST_USE_TEXT="Debug session for issue #123" hcom open 2
234
-
235
- # Bigger delivery batches
236
- HCOM_MAX_MESSAGES_PER_DELIVERY=100 hcom watch --logs
237
- ```
238
-
239
- **Windows PowerShell**:
240
- ```powershell
241
- # Set environment variables in PowerShell
242
- $env:HCOM_TERMINAL_MODE="same_terminal"; hcom open agent-name
243
- $env:HCOM_WAIT_TIMEOUT="60"; hcom open 3
244
- $env:HCOM_INITIAL_PROMPT="go home buddy!"; hcom open
245
- ```
246
-
247
- ### Status Indicators
248
-
249
- When running `hcom watch`, each instance shows its current state:
250
-
251
- - ▶ **active** (green) - Working (processing/executing)
252
- - ▷ **delivered** (cyan) - Just received a message
253
- - ◉ **waiting** (blue) - Waiting for messages
254
- - ■ **blocked** (yellow) - Permission request pending
255
- - ○ **inactive** (red) - Closed/timed out/ended
256
- - ○ **unknown** (gray) - No status data or stale
257
- - **(bg)** suffix - Instance running in background headless mode
258
-
259
- </details>
260
-
261
- <details>
262
- <summary><strong>🎲 How It Works</strong></summary>
263
-
264
- ### Hooks!
265
-
266
- hcom adds hooks to your project directory's `.claude/settings.local.json`:
267
-
268
- 1. **Sending**: Claude uses `hcom send "message"` to communicate
269
- 2. **Receiving**: Other Claudes get notified via Stop hook or immediate delivery after sending
270
- 3. **Waiting**: Stop hook keeps Claude in a waiting state for new messages
271
-
272
- - **Identity**: Each instance gets a unique name based on session ID (e.g., "hovoa7")
273
- - **Persistence**: Names persist across `--resume` maintaining conversation context
274
- - **Status Detection**: Notification hook tracks permission requests and activity
275
- - **Agents**: When you run `hcom open researcher`, it loads an interactive Claude session with a system prompt from `.claude/agents/researcher.md` (local) or `~/.claude/agents/researcher.md` (global). Specified `model:` and `tools:` are carried over
276
-
277
- ### Architecture
278
- - **Single conversation** - All instances share one global conversation
279
- - **Opt-in participation** - Only Claude code instances launched with `hcom open` join automatically, normal instances can use `hcom start`/`stop`
280
- - **@-mention filtering** - Target messages to specific instances or teams
281
-
282
- ### File Structure
283
- ```plaintext
284
- ~/.hcom/
285
- ├── hcom.log # Conversation log
286
- ├── instances/ # Instance tracking
287
- ├── logs/ # Background process logs
288
- ├── config.json # Configuration
289
- └── archive/ # Archived sessions
290
-
291
- your-project/
292
- └── .claude/
293
- └── settings.local.json # hcom hooks
294
- ```
295
-
296
- </details>
297
-
298
-
299
- <details>
300
- <summary><strong>🥔 Terminal Options</strong></summary>
301
-
302
- ### Terminal Mode
303
-
304
- Configure terminal behavior in `~/.hcom/config.json`:
305
- - `"terminal_mode": "new_window"` - Opens new terminal window(s) (default)
306
- - `"terminal_mode": "same_terminal"` - Opens in current terminal
307
-
308
- #### Running in current terminal temporarily
309
- ```bash
310
- # For single instances
311
- HCOM_TERMINAL_MODE=same_terminal hcom open
312
- ```
313
-
314
- ### Default Terminals
315
-
316
- - **macOS**: Terminal.app
317
- - **Linux**: gnome-terminal, konsole, or xterm
318
- - **Windows & WSL**: Windows Terminal / Git Bash
319
- - **Android**: Termux
320
-
321
-
322
- ### Custom Terminals
323
-
324
- Configure `terminal_command` in `~/.hcom/config.json` (permanent) or environment variables (temporary).
325
-
326
- #### How to use this
327
-
328
- The `{script}` placeholder is replaced by HCOM with the path to a temporary bash script that launches Claude Code.
329
-
330
- Your custom command just needs to:
331
- 1. Accept `{script}` as a placeholder that will be replaced with a script path
332
- 2. Execute that script with bash
333
-
334
- Example template: `your_terminal_command --execute "bash {script}"`
335
-
336
- ### Custom Terminal Examples
337
-
338
- #### iTerm2
339
- ```json
340
- "terminal_command": "open -a iTerm {script}"
341
- ```
342
-
343
- #### [ttab](https://github.com/mklement0/ttab) (new tab instead of new window in Terminal.app)
344
- ```json
345
- "terminal_command": "ttab {script}"
346
- ```
347
-
348
- #### [wttab](https://github.com/lalilaloe/wttab) (new tab in Windows Terminal)
349
- ```json
350
- "terminal_command": "wttab {script}"
351
- ```
352
-
353
- #### More
354
- ```json
355
- # WezTerm Linux/Windows
356
- "terminal_command": "wezterm start -- bash {script}"
357
-
358
- # Tabs from within WezTerm
359
- "terminal_command": "wezterm cli spawn -- bash {script}"
360
-
361
- # WezTerm macOS:
362
- "terminal_command": "open -n -a WezTerm.app --args start -- bash {script}"
363
-
364
- # Tabs from within WezTerm macOS
365
- "terminal_command": "/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn -- bash {script}"
366
-
367
- # Wave Terminal Mac/Linux/Windows. From within Wave Terminal:
368
- "terminal_command": "wsh run -- bash {script}"
369
-
370
- # Alacritty macOS:
371
- "terminal_command": "open -n -a Alacritty.app --args -e bash {script}"
372
-
373
- # Alacritty Linux:
374
- "terminal_command": "alacritty -e bash {script}"
375
-
376
- # Kitty macOS:
377
- "terminal_command": "open -n -a kitty.app --args {script}"
378
-
379
- # Kitty Linux
380
- "terminal_command": "kitty {script}"
381
- ```
382
-
383
- #### tmux
384
- ```json
385
- "terminal_command": "tmux new-window -n hcom {script}"
386
- ```
387
- ```bash
388
- # tmux commands work inside tmux, start a session with:
389
- tmux new-session 'hcom open 3' # each instance opens in new tmux window
390
-
391
- # Or one time split-panes:
392
- # Start tmux with split panes and 3 claude instances in hcom chat
393
- HCOM_TERMINAL_COMMAND="tmux split-window -h {script}" hcom open 3
394
- ```
395
-
396
- ### Android (Termux)
397
-
398
- 1. Install [Termux](https://f-droid.org/packages/com.termux/) from F-Droid (not Google Play)
399
- 2. Setup:
400
- ```bash
401
- pkg install python nodejs
402
- npm install -g @anthropic-ai/claude-cli
403
- pip install hcom
404
- ```
405
- 3. Enable:
406
- ```bash
407
- echo "allow-external-apps=true" >> ~/.termux/termux.properties
408
- termux-reload-settings
409
- ```
410
- 4. Enable: "Display over other apps" permission for visible terminals
411
-
412
- 5. Run: `hcom open`
413
-
414
- ---
415
-
416
- </details>
417
-
418
-
419
- <details>
420
- <summary><strong>⚗️ Remove</strong></summary>
421
-
422
-
423
- ### Archive Conversation / Start New
424
- ```bash
425
- hcom stop all
426
- ```
427
-
428
- ### Stop Running Instances
429
- ```bash
430
- # Stop specific instance
431
- hcom stop hovoa7
432
-
433
- # Stop all and archive
434
- hcom stop all
435
- ```
436
-
437
- ### Start Stopped Instances
438
- ```bash
439
- # Start specific instance
440
- hcom start hovoa7
441
- ```
442
-
443
- ### Remove HCOM hooks
444
- ```bash
445
- # Current directory
446
- hcom stop hooking
447
-
448
- # All directories
449
- hcom stop hooking --all
450
- ```
451
-
452
- ### Remove hcom Completely
453
- 1. Remove hcom: `rm /usr/local/bin/hcom` (or wherever you installed hcom)
454
- 2. Remove all data: `rm -rf ~/.hcom`
455
-
456
- </details>
457
-
458
- ## 🦐 Requirements
459
-
460
- - Python 3.10+
461
- - [Claude Code](https://claude.ai/code)
462
-
463
-
464
-
465
- ## 🌮 License
466
-
467
- - MIT License
468
-
469
- ---
@@ -1,7 +0,0 @@
1
- hcom/__init__.py,sha256=fRfNVuDui5tvzbAHMkivkebtGYsOoxtHFP7IoeXKf-I,96
2
- hcom/__main__.py,sha256=3IdNrNypn0Xuuqzs2QURcl2qiI6sRXqR6Bh9C5Jtag4,142409
3
- hcom-0.4.0.dist-info/METADATA,sha256=Ibwp8oDPN91qCgKWFLFJpsQjIkeYzZ92xwk1KuQkdHk,16244
4
- hcom-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
- hcom-0.4.0.dist-info/entry_points.txt,sha256=cz9K9PsgYmORUxNKxVRrpxLS3cxRJcDZkE-PpfvOhI8,44
6
- hcom-0.4.0.dist-info/top_level.txt,sha256=8AS1nVUWA26vxjDQ5viRxgJnwSvUWk1W6GP4g6ldZ-0,5
7
- hcom-0.4.0.dist-info/RECORD,,
File without changes