hcom 0.1.1__tar.gz → 0.1.2__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.

hcom-0.1.2/MANIFEST.in ADDED
@@ -0,0 +1,13 @@
1
+ include README.md
2
+ include pyproject.toml
3
+ recursive-include src/hcom *.py
4
+ global-exclude __pycache__
5
+ global-exclude *.py[co]
6
+ prune tests
7
+ prune docs
8
+ prune old
9
+ prune shite
10
+ prune examples
11
+ prune requirements
12
+ prune test_results
13
+ prune hcom-older-stuff
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hcom
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Lightweight CLI tool for real-time messaging between Claude Code instances/subagents using hooks
5
5
  Author-email: aannoo <your@email.com>
6
6
  License: MIT
@@ -28,33 +28,26 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  # Claude Code Hook Comms
30
30
 
31
- Lightweight CLI tool for launching and real-time communication between claude code subagents/instances using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
31
+ Lightweight CLI tool for real-time communication between claude code [subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents) using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
32
32
 
33
33
  ## 🦆 What It Does
34
34
 
35
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
36
 
37
- ![Claude Hook Comms Example](screenshot.jpg)
37
+ ![Claude Hook Comms Example](https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/screenshot.jpg)
38
38
 
39
- ## 🦷 Key Features
39
+ ## 🦷 Features
40
40
 
41
- - **New Terminal Window** - Launch claude code subagents in new terminals
41
+ - **Multi-Terminal Launch** - Launch claude code subagents in new terminals
42
+ - **Live Dashboard** - Real-time monitoring of all instances
42
43
  - **Multi-Agent Communication** - Claude instances talk to each other across projects
43
44
  - **@Mention Targeting** - Send messages to specific subagents or teams
44
- - **Live Dashboard** - Real-time monitoring of all instances
45
45
  - **Zero Dependencies** - Pure Python stdlib, works everywhere
46
46
 
47
47
  ## 🎪 Quick Start
48
48
 
49
49
  ### Use Without Installing
50
50
  ```bash
51
- uvx hcom open 2
52
- ```
53
-
54
- *[ Installation Options](#-installation-options)*
55
-
56
- ### Usage
57
- ```bash
58
51
  # Launch 3 default Claude instances connected to group chat
59
52
  uvx hcom open 3
60
53
 
@@ -63,86 +56,64 @@ uvx hcom open researcher code-writer
63
56
 
64
57
  # View/send messages in dashboard
65
58
  uvx hcom watch
59
+ ```
60
+
61
+ ### Install
66
62
 
67
- # Clear messages
68
- uvx hcom clear
63
+ ```bash
64
+ # uv
65
+ uv tool install hcom
66
+ # or pip
67
+ pip install hcom
68
+ # then use with:
69
+ hcom open 3
69
70
  ```
70
71
 
72
+
71
73
  ## 🦐 Requirements
72
74
 
73
75
  - Python 3.6+
74
76
  - [Claude Code](https://claude.ai/code)
75
77
 
76
78
 
77
- ### More Launch Examples
78
-
79
- #### Launch Claude Code Agents
80
- ```bash
81
- # Launch researcher and code-writer from your .claude/agents
82
- hcom open researcher code-writer
83
-
84
- # Launch backend-coder frontend-coder orchestrator tester from your .claude/agents
85
- hcom open backend-coder frontend-coder orchestrator tester
86
- ```
87
-
88
- #### Launch Headless Mode
89
- ```bash
90
- # Launch researcher and code-writer from your .claude/agents and work in background
91
- hcom open researcher code-writer --claude-args "-p"
92
-
93
- # Launch reviewer in headless mode with a prompt
94
- hcom open --claude-args "-p 'review git code changes when you get notified'"
95
- ```
79
+ ## 🗿 More Examples
96
80
 
97
- #### Launch with Options
98
81
  ```bash
99
- # Launch researcher and code-writer from your .claude/agents and work in background
100
- hcom open researcher code-writer --prefix 'greenteam'
101
- hcom send '@greenteam get to work on green stuff'
102
-
103
- # Launch 2 claude code instances and 2 of your agents
82
+ # Launch 2 generic instances + 2 specific agents
104
83
  hcom open 2 backend-coder frontend-coder
105
- ```
106
84
 
85
+ # Launch multiple of the same agent
86
+ hcom open reviewer reviewer reviewer # 3 separate reviewers
107
87
 
108
- ## 🦐 Requirements
88
+ # Launch agents in background with specific prompts
89
+ hcom open test-writer --claude-args "-p 'write tests for any new code'"
109
90
 
110
- - Python 3.6+
111
- - [Claude Code](https://claude.ai/code)
91
+ # Launch watchers that respond to notifications
92
+ hcom open reviewer --claude-args "-p 'review when @mentioned'"
112
93
 
113
- ## 🦒 Installation Options
94
+ # Pass multiple Claude flags
95
+ hcom open orchestrator --claude-args "--model claude-3-opus
96
+ --resume session_id"
114
97
 
115
- **Option 1: Use without installing (uvx) - recommended**
116
- ```bash
117
- uvx hcom open 3 # Runs latest version, no installation needed
118
- ```
98
+ # Launch in specific directories
99
+ cd backend && hcom open api-specialist
100
+ cd ../frontend && hcom open ui-specialist
119
101
 
120
- **Option 2: Install with uv**
121
- ```bash
122
- uv tool install hcom
123
- hcom open 3
124
- ```
102
+ # Create named teams that can be @mentioned
103
+ cd ~/api && hcom open --prefix api debugger
104
+ cd ~/auth && hcom open --prefix auth debugger
125
105
 
126
- **Option 3: Install with pip**
127
- ```bash
128
- pip install hcom
129
- hcom open 3
106
+ # Message specific teams
107
+ hcom send "@api login works but API fails" # or in dashboard: hcom watch
130
108
  ```
131
109
 
132
- **Option 4: Download script directly**
133
- ```bash
134
- curl -sL https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/hcom.py > hcom
135
- chmod +x hcom
136
- ./hcom open 3
137
- ```
138
110
 
139
111
  ## 🥨 Commands
140
112
 
141
- ### Commands
142
113
  | Command | Description |
143
114
  |---------|-------------|
144
115
  | `hcom open [n]` | Launch n Claude instances (or named agents) |
145
- | `hcom watch` | View conversation/status dashboard |
116
+ | `hcom watch` | Conversation/status dashboard |
146
117
  | `hcom clear` | Clear and archive conversation |
147
118
  | `hcom cleanup` | Remove HCOM hooks from current directory |
148
119
 
@@ -152,7 +123,7 @@ chmod +x hcom
152
123
  | `hcom send 'message'` | Send message |
153
124
  | `hcom watch --logs` | View message history (non-interactive) |
154
125
  | `hcom watch --status` | Show instance status (non-interactive) |
155
- | `hcom watch --wait[=seconds]` | Wait for new messages (automation) |
126
+ | `hcom watch --wait [timeout]` | Wait and notify for new messages |
156
127
 
157
128
  ---
158
129
 
@@ -163,15 +134,14 @@ chmod +x hcom
163
134
 
164
135
  Settings can be changed two ways:
165
136
 
137
+ #### Method 1: Environment variable (temporary, per-command/instance)
138
+
139
+
166
140
  ```bash
167
- # Method 1: Environment variable (termporary per-command/instance)
168
141
  HCOM_INSTANCE_HINTS="always update chat with progress" hcom open nice-subagent-but-not-great-with-updates
169
-
170
- # Method 2: Config file (affects all instances)
171
- # Edit ~/.hcom/config.json
172
142
  ```
173
143
 
174
- ### All Settings
144
+ #### Method 2: Config file (persistent, affects all instances)
175
145
 
176
146
  ### Config File Location
177
147
 
@@ -185,12 +155,12 @@ HCOM_INSTANCE_HINTS="always update chat with progress" hcom open nice-subagent-b
185
155
  | `sender_name` | "bigboss" | `HCOM_SENDER_NAME` | Your name in chat |
186
156
  | `sender_emoji` | "🐳" | `HCOM_SENDER_EMOJI` | Your emoji icon |
187
157
  | `initial_prompt` | "Say hi" | `HCOM_INITIAL_PROMPT` | What new instances are told to do |
188
- | `first_use_text` | "Essential, concise messages only. Say hi in hcom chat" | `HCOM_FIRST_USE_TEXT` | Welcome message for instances |
158
+ | `first_use_text` | "Essential, concise messages only" | `HCOM_FIRST_USE_TEXT` | Welcome message for instances |
189
159
  | `terminal_mode` | "new_window" | `HCOM_TERMINAL_MODE` | How to launch terminals ("new_window", "same_terminal", "show_commands") |
190
- | `terminal_command` | null | `HCOM_TERMINAL_COMMAND` | Custom terminal command (see Terminal Integration) |
160
+ | `terminal_command` | null | `HCOM_TERMINAL_COMMAND` | Custom terminal command (see Terminal Options) |
191
161
  | `cli_hints` | "" | `HCOM_CLI_HINTS` | Extra text added to CLI outputs |
192
162
  | `instance_hints` | "" | `HCOM_INSTANCE_HINTS` | Extra text added to instance messages |
193
- | `env_overrides` | {} | - | Additional environment variables for Claude |
163
+ | `env_overrides` | {} | - | Additional environment variables for Claude Code |
194
164
 
195
165
  ### Examples
196
166
 
@@ -230,12 +200,13 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
230
200
  3. **Waiting**: Stop hook keeps Claude in a waiting state for new messages
231
201
 
232
202
  - **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
233
- - **Persistence**: Names persist across `claude --resume` maintaining conversation context
203
+ - **Persistence**: Names persist across `--resume` maintaining conversation context
234
204
  - **Status Detection**: Notification hook tracks permission requests and activity
205
+ - **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)
235
206
 
236
207
  ### Architecture
237
208
  - **Single conversation** - All instances share one global conversation
238
- - **Opt-in participation** - Only instances launched with `hcom open` join the chat
209
+ - **Opt-in participation** - Only claude code instances launched with `hcom open` join the chat
239
210
  - **@-mention filtering** - Target messages to specific instances or teams
240
211
 
241
212
  ### File Structure
@@ -254,20 +225,25 @@ your-project/
254
225
 
255
226
 
256
227
  <details>
257
- <summary><strong>🥔 Terminal Customization</strong></summary>
228
+ <summary><strong>🥔 Terminal Options</strong></summary>
258
229
 
259
230
  ### Terminal Mode
260
231
 
261
232
  Configure terminal behavior in `~/.hcom/config.json`:
262
233
  - `"terminal_mode": "new_window"` - Opens new terminal windows (default)
263
- - `"terminal_mode": "same_terminal"` - Runs in background
234
+ - `"terminal_mode": "same_terminal"` - Opens in current terminal
264
235
  - `"terminal_mode": "show_commands"` - Prints commands without executing
265
236
 
237
+ ### Default Terminals
238
+
239
+ - **macOS**: Terminal.app
240
+ - **Linux**: gnome-terminal, konsole, or xterm
241
+ - **Windows**: Windows Terminal / PowerShell
242
+
266
243
  ### Running in Current Terminal
267
244
  ```bash
268
- # For single instance work
245
+ # For single instances
269
246
  HCOM_TERMINAL_MODE=same_terminal hcom open
270
- # This runs Claude code directly in your current terminal
271
247
  ```
272
248
 
273
249
  ### Custom Terminal Examples
@@ -277,67 +253,51 @@ Configure `terminal_command` in `~/.hcom/config.json` to use your preferred term
277
253
  ### iTerm2
278
254
  ```json
279
255
  {
280
- "terminal_command": "osascript -e 'tell app \"iTerm\" to create window with default profile command \"{env} {cmd}\"'"
256
+ "terminal_command": "osascript -e 'tell app \"iTerm2\" to create window with default profile' -e 'tell current session of current window to write text \"{env} {cmd}\"'"
281
257
  }
282
258
  ```
283
259
 
284
260
  ### Alacritty
285
261
  ```json
286
262
  {
287
- "terminal_command": "alacritty -e bash -c '{env} {cmd}'"
263
+ "terminal_command": "alacritty -e sh -c '{env} {cmd}'"
288
264
  }
289
265
  ```
290
266
 
291
267
  ### Kitty
292
268
  ```json
293
269
  {
294
- "terminal_command": "kitty -e bash -c '{env} {cmd}'"
270
+ "terminal_command": "kitty sh -c '{env} {cmd}'"
295
271
  }
296
272
  ```
297
273
 
298
- ### tmux
274
+ ### WezTerm
299
275
  ```json
300
276
  {
301
- "terminal_command": "tmux new-window -n hcom '{env} {cmd}'"
277
+ "terminal_command": "wezterm cli spawn --new-window -- sh -c '{env} {cmd}'"
302
278
  }
303
279
  ```
304
280
 
305
- ### screen
281
+ ### tmux
306
282
  ```json
307
283
  {
308
- "terminal_command": "screen -dmS hcom-$$ bash -c '{env} {cmd}'"
284
+ "terminal_command": "tmux new-window -n hcom sh -c '{env} {cmd}'"
309
285
  }
310
286
  ```
311
287
 
312
288
  ### Available Placeholders
313
289
  - `{cmd}` - The claude command to execute
314
- - `{env}` - Environment variables (pre-formatted)
290
+ - `{env}` - Environment variables (pre-formatted as `VAR1='value1' VAR2='value2'`)
315
291
  - `{cwd}` - Current working directory
316
292
 
317
- </details>
318
-
319
- <details>
320
- <summary><strong>🥚 Troubleshooting</strong></summary>
321
-
322
- ### Common Issues
323
-
324
- - **Claude stops responding**: Default idle timeout is 10 minutes (configure via `wait_timeout`)
325
- - **Message truncated**: Message size limit is 4096 chars (configure via `max_message_size`)
326
-
327
- ### Debug Commands
328
- ```bash
329
- # Run Claude in debug mode to see hook execution
330
- hcom open --claude-args "--debug"
293
+ ### Notes
294
+ - Custom commands must exit with code 0 for success
295
+ - The `{env}` placeholder contains shell-quoted environment variables
296
+ - Most terminals require wrapping the command in `sh -c` to handle environment variables correctly
331
297
 
332
- # View conversation log
333
- tail -f ~/.hcom/hcom.log
334
-
335
- # Check instance status
336
- cat ~/.hcom/hcom.json
337
-
338
- ```
339
298
  </details>
340
299
 
300
+
341
301
  <details>
342
302
  <summary><strong>🦆 Remove</strong></summary>
343
303
 
@@ -347,9 +307,14 @@ cat ~/.hcom/hcom.json
347
307
  hcom clear
348
308
  ```
349
309
 
350
- ### Remove all HCOM hooks
310
+ ### Remove HCOM hooks from current directory
311
+ ```bash
312
+ hcom cleanup
313
+ ```
314
+
315
+ ### Remove HCOM hooks from all directories
351
316
  ```bash
352
- hcom clenup --all
317
+ hcom cleanup --all
353
318
  ```
354
319
 
355
320
  ### Remove hcom Completely