hcom 0.1.1__tar.gz → 0.6.3__tar.gz

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.

Files changed (58) hide show
  1. hcom-0.6.3/MANIFEST.in +17 -0
  2. hcom-0.6.3/PKG-INFO +281 -0
  3. hcom-0.6.3/README.md +254 -0
  4. hcom-0.6.3/pyproject.toml +46 -0
  5. hcom-0.6.3/src/hcom/__init__.py +6 -0
  6. hcom-0.6.3/src/hcom/__main__.py +4 -0
  7. hcom-0.6.3/src/hcom/api.py +94 -0
  8. hcom-0.6.3/src/hcom/claude_args.py +936 -0
  9. hcom-0.6.3/src/hcom/cli.py +445 -0
  10. hcom-0.6.3/src/hcom/commands/__init__.py +19 -0
  11. hcom-0.6.3/src/hcom/commands/admin.py +411 -0
  12. hcom-0.6.3/src/hcom/commands/lifecycle.py +479 -0
  13. hcom-0.6.3/src/hcom/commands/messaging.py +257 -0
  14. hcom-0.6.3/src/hcom/commands/utils.py +134 -0
  15. hcom-0.6.3/src/hcom/core/__init__.py +4 -0
  16. hcom-0.6.3/src/hcom/core/config.py +434 -0
  17. hcom-0.6.3/src/hcom/core/db.py +482 -0
  18. hcom-0.6.3/src/hcom/core/instances.py +519 -0
  19. hcom-0.6.3/src/hcom/core/messages.py +437 -0
  20. hcom-0.6.3/src/hcom/core/migration.py +38 -0
  21. hcom-0.6.3/src/hcom/core/paths.py +116 -0
  22. hcom-0.6.3/src/hcom/core/runtime.py +319 -0
  23. hcom-0.6.3/src/hcom/hooks/__init__.py +44 -0
  24. hcom-0.6.3/src/hcom/hooks/dispatcher.py +124 -0
  25. hcom-0.6.3/src/hcom/hooks/handlers.py +1131 -0
  26. hcom-0.6.3/src/hcom/hooks/settings.py +114 -0
  27. hcom-0.6.3/src/hcom/hooks/utils.py +274 -0
  28. hcom-0.6.3/src/hcom/shared.py +364 -0
  29. hcom-0.6.3/src/hcom/terminal.py +648 -0
  30. hcom-0.6.3/src/hcom/ui/__init__.py +106 -0
  31. hcom-0.6.3/src/hcom/ui/input.py +236 -0
  32. hcom-0.6.3/src/hcom/ui/launch.py +1056 -0
  33. hcom-0.6.3/src/hcom/ui/manage.py +531 -0
  34. hcom-0.6.3/src/hcom/ui/rendering.py +199 -0
  35. hcom-0.6.3/src/hcom/ui/tui.py +939 -0
  36. hcom-0.6.3/src/hcom/ui/types.py +92 -0
  37. hcom-0.6.3/src/hcom.egg-info/PKG-INFO +281 -0
  38. hcom-0.6.3/src/hcom.egg-info/SOURCES.txt +40 -0
  39. hcom-0.1.1/PKG-INFO +0 -365
  40. hcom-0.1.1/README.md +0 -337
  41. hcom-0.1.1/pyproject.toml +0 -38
  42. hcom-0.1.1/src/hcom/__init__.py +0 -3
  43. hcom-0.1.1/src/hcom/__main__.py +0 -1921
  44. hcom-0.1.1/src/hcom.egg-info/PKG-INFO +0 -365
  45. hcom-0.1.1/src/hcom.egg-info/SOURCES.txt +0 -18
  46. hcom-0.1.1/tests/test_hcom_contracts.py +0 -323
  47. hcom-0.1.1/tests/test_hcom_hooks_detail_integration.py +0 -478
  48. hcom-0.1.1/tests/test_hcom_integration.py +0 -247
  49. hcom-0.1.1/tests/test_hcom_iterm_basic.py +0 -468
  50. hcom-0.1.1/tests/test_hcom_phase3_integration.py +0 -296
  51. hcom-0.1.1/tests/test_hcom_phase4_integration.py +0 -545
  52. hcom-0.1.1/tests/test_hcom_phase5_integration.py +0 -397
  53. hcom-0.1.1/tests/test_hcom_phase6_7_integration.py +0 -435
  54. hcom-0.1.1/tests/test_hcom_unit.py +0 -195
  55. {hcom-0.1.1 → hcom-0.6.3}/setup.cfg +0 -0
  56. {hcom-0.1.1 → hcom-0.6.3}/src/hcom.egg-info/dependency_links.txt +0 -0
  57. {hcom-0.1.1 → hcom-0.6.3}/src/hcom.egg-info/entry_points.txt +0 -0
  58. {hcom-0.1.1 → hcom-0.6.3}/src/hcom.egg-info/top_level.txt +0 -0
hcom-0.6.3/MANIFEST.in ADDED
@@ -0,0 +1,17 @@
1
+ # Exclude development directories from source distribution
2
+ global-exclude __pycache__
3
+ global-exclude *.py[co]
4
+ prune test
5
+ prune tests
6
+ prune docs
7
+ prune dev
8
+ prune old
9
+ prune archive
10
+ prune prototypes
11
+ prune temp
12
+ prune plugin
13
+ prune scripts
14
+ prune reports
15
+ prune tui
16
+ prune todos
17
+ prune logs
hcom-0.6.3/PKG-INFO ADDED
@@ -0,0 +1,281 @@
1
+ Metadata-Version: 2.4
2
+ Name: hcom
3
+ Version: 0.6.3
4
+ Summary: Launch multiple Claude Code instances (terminal, headless, or subagents) that communicate together in real time 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,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/aannoo/claude-hook-comms)
32
+
33
+ Launch multiple Claude Code instances (terminal, headless, or subagents) that communicate together in real time via hooks.
34
+
35
+ ![Demo](https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/screencapture.gif)
36
+
37
+ ## Start
38
+
39
+ #### Run without installing
40
+ ```bash
41
+ uvx hcom 2
42
+ ```
43
+
44
+ #### Run with installing
45
+ ```bash
46
+ pip install hcom
47
+
48
+ hcom # UI
49
+
50
+ claude 'run hcom start' # toggle hcom for any claude code
51
+ ```
52
+
53
+
54
+ ## What it does
55
+
56
+ Adds hooks that enable instant messaging between claude code instances. Launch multiple terminals/headless/subagents that remain active, waiting to respond. Normal `claude` remains unaffected by hcom, but can opt-in (`hcom start`) or opt-out (`hcom stop`) at runtime. Safely remove hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
57
+
58
+
59
+ ## Commands
60
+
61
+ | Command | Description
62
+ |---------|-------------|
63
+ | `hcom` | TUI dashboard |
64
+ | `hcom <n>` | Launch `n` instances |
65
+ | `hcom start` | Enable participation |
66
+ | `hcom stop` | Disable participation |
67
+
68
+
69
+ ## Features
70
+
71
+ #### communicate with task tool subagents
72
+ ```bash
73
+ claude 'use 3x task tool with task: say hi in hcom chat'
74
+ # Each subagent gets unique identity and can communicate with siblings
75
+ # Parent resumes with full conversation history
76
+ ```
77
+
78
+ #### persistent headless instances
79
+ ```bash
80
+ hcom 1 claude -p # launch with default 30min timeout
81
+ hcom # See what it's doing from dashboard
82
+ hcom stop # Let it die earlier than timeout
83
+ ```
84
+
85
+ #### .claude/agents in interactive claude window
86
+ ```bash
87
+ HCOM_AGENT=code-writer hcom 1
88
+ HCOM_AGENT=reviewer hcom 1
89
+ ```
90
+
91
+ #### @-mention: groups and direct
92
+ ```bash
93
+ HCOM_TAG=cooltag hcom 2
94
+ hcom send '@cooltag hi, you both are cool'
95
+ hcom send '@john you are cooler'
96
+ ```
97
+
98
+ #### toggle inside claude code
99
+ ```bash
100
+ claude # Normal Claude Code
101
+ 'run hcom start' # Opt-in to receive messages
102
+ 'run hcom stop' # Opt-out, continue as normal claude code
103
+ ```
104
+
105
+ #### async push notifications from anywhere
106
+ ```bash
107
+ # Any process can message claude instances with custom identity
108
+ hcom send --from background-worker 'i finished, now you go do stuff'
109
+ ```
110
+
111
+
112
+ ---
113
+
114
+ <details>
115
+ <summary><strong>All commands</strong></summary>
116
+
117
+
118
+ ```bash
119
+ Usage: hcom # TUI dashboard
120
+ [ENV_VARS] hcom <COUNT> [claude <ARGS>...]
121
+ hcom watch [--type TYPE] [--instance NAME] [--last N] [--wait SEC]
122
+ hcom list [--json] [--verbose]
123
+ hcom send "message"
124
+ hcom stop [alias|all]
125
+ hcom start [alias]
126
+ hcom reset [logs|hooks|config]
127
+
128
+ Launch Examples:
129
+ hcom 3 open 3 terminals with claude connected to hcom
130
+ hcom 3 claude -p + headless
131
+ HCOM_TAG=api hcom 3 claude -p + @-mention group tag
132
+ claude 'run hcom start' claude code with prompt also works
133
+
134
+ Commands:
135
+ watch Query recent events (JSON per line)
136
+ --type TYPE Filter by event type (message, status)
137
+ --instance ALIAS Filter by instance
138
+ --last N Limit to last N events (default: 20)
139
+ --wait SEC Block until a matching event arrives
140
+
141
+ list Show instance status/metadata
142
+ --json Emit JSON (one instance per line)
143
+ --verbose Include additional metadata
144
+
145
+ send "msg" Send message to all instances
146
+ send "@alias msg" Send to specific instance/group
147
+ --from <name> Custom external identity
148
+
149
+ stop Stop current instance (from inside Claude)
150
+ stop <alias> Stop specific instance
151
+ stop all Stop all instances
152
+
153
+ start Start current instance (from inside Claude)
154
+ start <alias> Start specific instance
155
+
156
+ reset Stop all + archive logs + remove hooks + clear config
157
+ reset logs Clear + archive conversation
158
+ reset hooks Safely remove hcom hooks from claude settings.json
159
+ reset config Clear + archive config.env
160
+
161
+ Environment Variables:
162
+ HCOM_TAG=name Group tag (creates name-* instances)
163
+ HCOM_AGENT=type Agent from .claude/agents/ (comma-separated for multiple)
164
+ HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
165
+ HCOM_HINTS=text Text appended to all messages received by instance
166
+ HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default: 1800s / 30m)
167
+ HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default: 30s)
168
+ HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
169
+
170
+ ANTHROPIC_MODEL=opus # Any env var passed through to Claude Code
171
+
172
+ Persist Env Vars in `~/.hcom/config.env`
173
+ ```
174
+
175
+ ---
176
+
177
+ ### Requirements
178
+
179
+ - Python 3.10+
180
+ - Claude Code
181
+
182
+
183
+
184
+ </details>
185
+
186
+ ---
187
+
188
+ <details>
189
+ <summary><strong> Terminal Options</strong></summary>
190
+
191
+ ### Default Terminals
192
+
193
+ - **macOS**: Terminal.app
194
+ - **Linux**: gnome-terminal, konsole, or xterm
195
+ - **Windows (native) & WSL**: Windows Terminal / Git Bash
196
+ - **Android**: Termux
197
+
198
+ ### Terminal Mode
199
+
200
+ - `HCOM_TERMINAL=new` - New terminal windows (default)
201
+ - `HCOM_TERMINAL=here` - Current terminal window
202
+ - `HCOM_TERMINAL="open -a iTerm {script}"` - Custom terminal
203
+
204
+
205
+ ### Custom Terminal
206
+
207
+ Your custom command just needs to:
208
+ 1. Accept `{script}` as a placeholder that will be replaced with a script path
209
+ 2. Execute that script with bash
210
+
211
+ ### Custom Terminal Examples
212
+
213
+ ##### [ttab](https://github.com/mklement0/ttab) (new tab instead of new window in Terminal.app)
214
+ ```bash
215
+ HCOM_TERMINAL="ttab {script}"
216
+ ```
217
+
218
+ ##### [wttab](https://github.com/lalilaloe/wttab) (new tab in Windows Terminal)
219
+ ```bash
220
+ HCOM_TERMINAL="wttab {script}"
221
+ ```
222
+
223
+ ##### More
224
+ ```bash
225
+ # Wave Terminal Mac/Linux/Windows. From within Wave Terminal:
226
+ HCOM_TERMINAL="wsh run -- bash {script}"
227
+
228
+ # Alacritty macOS:
229
+ HCOM_TERMINAL="open -n -a Alacritty.app --args -e bash {script}"
230
+
231
+ # Alacritty Linux:
232
+ HCOM_TERMINAL="alacritty -e bash {script}"
233
+
234
+ # Kitty macOS:
235
+ HCOM_TERMINAL="open -n -a kitty.app --args {script}"
236
+
237
+ # Kitty Linux
238
+ HCOM_TERMINAL="kitty {script}"
239
+
240
+ # tmux with split panes and 3 claude instances in hcom chat
241
+ HCOM_TERMINAL="tmux split-window -h {script}" hcom 3
242
+
243
+ # WezTerm Linux/Windows
244
+ HCOM_TERMINAL="wezterm start -- bash {script}"
245
+
246
+ # Tabs from within WezTerm
247
+ HCOM_TERMINAL="wezterm cli spawn -- bash {script}"
248
+
249
+ # WezTerm macOS:
250
+ HCOM_TERMINAL="open -n -a WezTerm.app --args start -- bash {script}"
251
+
252
+ # Tabs from within WezTerm macOS
253
+ HCOM_TERMINAL="/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn -- bash {script}"
254
+ ```
255
+
256
+ #### Android (Termux)
257
+
258
+ ```bash
259
+ #1. Install:
260
+ Termux from F-Droid (not Google Play)
261
+ #2. Setup:
262
+ pkg install python nodejs
263
+ npm install -g @anthropic-ai/claude-cli
264
+ pip install hcom
265
+ #3. Enable:
266
+ echo "allow-external-apps=true" >> ~/.termux/termux.properties
267
+ termux-reload-settings
268
+ #4. Enable:
269
+ "Display over other apps" permission for visible terminals
270
+ #5. Run:
271
+ `hcom 2`
272
+ ```
273
+
274
+ </details>
275
+
276
+ ---
277
+
278
+ ### License
279
+
280
+ MIT
281
+
hcom-0.6.3/README.md ADDED
@@ -0,0 +1,254 @@
1
+ # hcom — Claude Hook Comms
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/hcom)](https://pypi.org/project/hcom/)
4
+ [![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,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/aannoo/claude-hook-comms)
5
+
6
+ Launch multiple Claude Code instances (terminal, headless, or subagents) that communicate together in real time via hooks.
7
+
8
+ ![Demo](https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/screencapture.gif)
9
+
10
+ ## Start
11
+
12
+ #### Run without installing
13
+ ```bash
14
+ uvx hcom 2
15
+ ```
16
+
17
+ #### Run with installing
18
+ ```bash
19
+ pip install hcom
20
+
21
+ hcom # UI
22
+
23
+ claude 'run hcom start' # toggle hcom for any claude code
24
+ ```
25
+
26
+
27
+ ## What it does
28
+
29
+ Adds hooks that enable instant messaging between claude code instances. Launch multiple terminals/headless/subagents that remain active, waiting to respond. Normal `claude` remains unaffected by hcom, but can opt-in (`hcom start`) or opt-out (`hcom stop`) at runtime. Safely remove hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
30
+
31
+
32
+ ## Commands
33
+
34
+ | Command | Description
35
+ |---------|-------------|
36
+ | `hcom` | TUI dashboard |
37
+ | `hcom <n>` | Launch `n` instances |
38
+ | `hcom start` | Enable participation |
39
+ | `hcom stop` | Disable participation |
40
+
41
+
42
+ ## Features
43
+
44
+ #### communicate with task tool subagents
45
+ ```bash
46
+ claude 'use 3x task tool with task: say hi in hcom chat'
47
+ # Each subagent gets unique identity and can communicate with siblings
48
+ # Parent resumes with full conversation history
49
+ ```
50
+
51
+ #### persistent headless instances
52
+ ```bash
53
+ hcom 1 claude -p # launch with default 30min timeout
54
+ hcom # See what it's doing from dashboard
55
+ hcom stop # Let it die earlier than timeout
56
+ ```
57
+
58
+ #### .claude/agents in interactive claude window
59
+ ```bash
60
+ HCOM_AGENT=code-writer hcom 1
61
+ HCOM_AGENT=reviewer hcom 1
62
+ ```
63
+
64
+ #### @-mention: groups and direct
65
+ ```bash
66
+ HCOM_TAG=cooltag hcom 2
67
+ hcom send '@cooltag hi, you both are cool'
68
+ hcom send '@john you are cooler'
69
+ ```
70
+
71
+ #### toggle inside claude code
72
+ ```bash
73
+ claude # Normal Claude Code
74
+ 'run hcom start' # Opt-in to receive messages
75
+ 'run hcom stop' # Opt-out, continue as normal claude code
76
+ ```
77
+
78
+ #### async push notifications from anywhere
79
+ ```bash
80
+ # Any process can message claude instances with custom identity
81
+ hcom send --from background-worker 'i finished, now you go do stuff'
82
+ ```
83
+
84
+
85
+ ---
86
+
87
+ <details>
88
+ <summary><strong>All commands</strong></summary>
89
+
90
+
91
+ ```bash
92
+ Usage: hcom # TUI dashboard
93
+ [ENV_VARS] hcom <COUNT> [claude <ARGS>...]
94
+ hcom watch [--type TYPE] [--instance NAME] [--last N] [--wait SEC]
95
+ hcom list [--json] [--verbose]
96
+ hcom send "message"
97
+ hcom stop [alias|all]
98
+ hcom start [alias]
99
+ hcom reset [logs|hooks|config]
100
+
101
+ Launch Examples:
102
+ hcom 3 open 3 terminals with claude connected to hcom
103
+ hcom 3 claude -p + headless
104
+ HCOM_TAG=api hcom 3 claude -p + @-mention group tag
105
+ claude 'run hcom start' claude code with prompt also works
106
+
107
+ Commands:
108
+ watch Query recent events (JSON per line)
109
+ --type TYPE Filter by event type (message, status)
110
+ --instance ALIAS Filter by instance
111
+ --last N Limit to last N events (default: 20)
112
+ --wait SEC Block until a matching event arrives
113
+
114
+ list Show instance status/metadata
115
+ --json Emit JSON (one instance per line)
116
+ --verbose Include additional metadata
117
+
118
+ send "msg" Send message to all instances
119
+ send "@alias msg" Send to specific instance/group
120
+ --from <name> Custom external identity
121
+
122
+ stop Stop current instance (from inside Claude)
123
+ stop <alias> Stop specific instance
124
+ stop all Stop all instances
125
+
126
+ start Start current instance (from inside Claude)
127
+ start <alias> Start specific instance
128
+
129
+ reset Stop all + archive logs + remove hooks + clear config
130
+ reset logs Clear + archive conversation
131
+ reset hooks Safely remove hcom hooks from claude settings.json
132
+ reset config Clear + archive config.env
133
+
134
+ Environment Variables:
135
+ HCOM_TAG=name Group tag (creates name-* instances)
136
+ HCOM_AGENT=type Agent from .claude/agents/ (comma-separated for multiple)
137
+ HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
138
+ HCOM_HINTS=text Text appended to all messages received by instance
139
+ HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default: 1800s / 30m)
140
+ HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default: 30s)
141
+ HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
142
+
143
+ ANTHROPIC_MODEL=opus # Any env var passed through to Claude Code
144
+
145
+ Persist Env Vars in `~/.hcom/config.env`
146
+ ```
147
+
148
+ ---
149
+
150
+ ### Requirements
151
+
152
+ - Python 3.10+
153
+ - Claude Code
154
+
155
+
156
+
157
+ </details>
158
+
159
+ ---
160
+
161
+ <details>
162
+ <summary><strong> Terminal Options</strong></summary>
163
+
164
+ ### Default Terminals
165
+
166
+ - **macOS**: Terminal.app
167
+ - **Linux**: gnome-terminal, konsole, or xterm
168
+ - **Windows (native) & WSL**: Windows Terminal / Git Bash
169
+ - **Android**: Termux
170
+
171
+ ### Terminal Mode
172
+
173
+ - `HCOM_TERMINAL=new` - New terminal windows (default)
174
+ - `HCOM_TERMINAL=here` - Current terminal window
175
+ - `HCOM_TERMINAL="open -a iTerm {script}"` - Custom terminal
176
+
177
+
178
+ ### Custom Terminal
179
+
180
+ Your custom command just needs to:
181
+ 1. Accept `{script}` as a placeholder that will be replaced with a script path
182
+ 2. Execute that script with bash
183
+
184
+ ### Custom Terminal Examples
185
+
186
+ ##### [ttab](https://github.com/mklement0/ttab) (new tab instead of new window in Terminal.app)
187
+ ```bash
188
+ HCOM_TERMINAL="ttab {script}"
189
+ ```
190
+
191
+ ##### [wttab](https://github.com/lalilaloe/wttab) (new tab in Windows Terminal)
192
+ ```bash
193
+ HCOM_TERMINAL="wttab {script}"
194
+ ```
195
+
196
+ ##### More
197
+ ```bash
198
+ # Wave Terminal Mac/Linux/Windows. From within Wave Terminal:
199
+ HCOM_TERMINAL="wsh run -- bash {script}"
200
+
201
+ # Alacritty macOS:
202
+ HCOM_TERMINAL="open -n -a Alacritty.app --args -e bash {script}"
203
+
204
+ # Alacritty Linux:
205
+ HCOM_TERMINAL="alacritty -e bash {script}"
206
+
207
+ # Kitty macOS:
208
+ HCOM_TERMINAL="open -n -a kitty.app --args {script}"
209
+
210
+ # Kitty Linux
211
+ HCOM_TERMINAL="kitty {script}"
212
+
213
+ # tmux with split panes and 3 claude instances in hcom chat
214
+ HCOM_TERMINAL="tmux split-window -h {script}" hcom 3
215
+
216
+ # WezTerm Linux/Windows
217
+ HCOM_TERMINAL="wezterm start -- bash {script}"
218
+
219
+ # Tabs from within WezTerm
220
+ HCOM_TERMINAL="wezterm cli spawn -- bash {script}"
221
+
222
+ # WezTerm macOS:
223
+ HCOM_TERMINAL="open -n -a WezTerm.app --args start -- bash {script}"
224
+
225
+ # Tabs from within WezTerm macOS
226
+ HCOM_TERMINAL="/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn -- bash {script}"
227
+ ```
228
+
229
+ #### Android (Termux)
230
+
231
+ ```bash
232
+ #1. Install:
233
+ Termux from F-Droid (not Google Play)
234
+ #2. Setup:
235
+ pkg install python nodejs
236
+ npm install -g @anthropic-ai/claude-cli
237
+ pip install hcom
238
+ #3. Enable:
239
+ echo "allow-external-apps=true" >> ~/.termux/termux.properties
240
+ termux-reload-settings
241
+ #4. Enable:
242
+ "Display over other apps" permission for visible terminals
243
+ #5. Run:
244
+ `hcom 2`
245
+ ```
246
+
247
+ </details>
248
+
249
+ ---
250
+
251
+ ### License
252
+
253
+ MIT
254
+
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hcom"
7
+ dynamic = ["version"]
8
+ description = "Launch multiple Claude Code instances (terminal, headless, or subagents) that communicate together in real time via hooks."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ authors = [{name = "aannoo"}]
13
+ keywords = ["claude", "claude-code", "hooks", "agents", "cli", "multi-agent", "orchestration", "terminal"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Operating System :: MacOS",
20
+ "Operating System :: Microsoft :: Windows",
21
+ "Operating System :: POSIX :: Linux",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Topic :: Communications :: Chat",
25
+ "Topic :: Software Development",
26
+ "Topic :: System :: Monitoring",
27
+ "Topic :: Terminals",
28
+ ]
29
+
30
+ [project.scripts]
31
+ hcom = "hcom.__main__:main"
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/aannoo/claude-hook-comms"
35
+ Repository = "https://github.com/aannoo/claude-hook-comms"
36
+ Issues = "https://github.com/aannoo/claude-hook-comms/issues"
37
+ Documentation = "https://github.com/aannoo/claude-hook-comms#readme"
38
+
39
+ [tool.setuptools]
40
+ packages = ["hcom", "hcom.core", "hcom.hooks", "hcom.commands", "hcom.ui"]
41
+
42
+ [tool.setuptools.package-dir]
43
+ "" = "src"
44
+
45
+ [tool.setuptools.dynamic]
46
+ version = {attr = "hcom.shared.__version__"}
@@ -0,0 +1,6 @@
1
+ from .shared import __version__
2
+ from .api import *
3
+ from .api import __all__ as _api_all
4
+
5
+ # Public API: version + all api.py exports (see api.py for details)
6
+ __all__ = ['__version__'] + _api_all
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())