hcom 0.1.0__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.0
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,94 +28,92 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  # Claude Code Hook Comms
30
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).
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 Window** - Claude subagents open 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
- ### Download
49
+ ### Use Without Installing
50
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>
51
+ # Launch 3 default Claude instances connected to group chat
52
+ uvx hcom open 3
56
53
 
57
- ```powershell
58
- # Download Python file
59
- Invoke-WebRequest -Uri "https://raw.githubusercontent.com/aannoo/claude-hook-comms/main/hcom.py" -OutFile "hcom.py"
54
+ # Launch researcher and code-writer from your .claude/agents
55
+ uvx hcom open researcher code-writer
60
56
 
61
- # Run python file directly
62
- python path/to/hcom.py open 2
57
+ # View/send messages in dashboard
58
+ uvx hcom watch
63
59
  ```
64
- </details>
65
60
 
66
- ### Usage
61
+ ### Install
62
+
67
63
  ```bash
68
- # 1. Launch 3 Claude instances connected to group chat
64
+ # uv
65
+ uv tool install hcom
66
+ # or pip
67
+ pip install hcom
68
+ # then use with:
69
69
  hcom open 3
70
-
71
- # 2. View/send messages in dashboard
72
- hcom watch
73
70
  ```
74
71
 
75
72
 
73
+ ## 🦐 Requirements
76
74
 
77
- ### Launch Claude Code Agents
78
- ```bash
79
- # Launch researcher and code-writer from your .claude/agents
80
- hcom open researcher code-writer
75
+ - Python 3.6+
76
+ - [Claude Code](https://claude.ai/code)
81
77
 
82
- # Launch backend-coder frontend-coder orchestrator tester from your .claude/agents
83
- hcom open backend-coder frontend-coder orchestrator tester
84
- ```
85
78
 
86
- ### Launch Headless Mode
79
+ ## 🗿 More Examples
80
+
87
81
  ```bash
88
- # Launch researcher and code-writer from your .claude/agents and work in background
89
- hcom open researcher code-writer --claude-args "-p"
82
+ # Launch 2 generic instances + 2 specific agents
83
+ hcom open 2 backend-coder frontend-coder
90
84
 
91
- # Launch reviewer in headless mode with a prompt
92
- hcom open --claude-args "-p 'review git code changes when you get notified'"
93
- ```
85
+ # Launch multiple of the same agent
86
+ hcom open reviewer reviewer reviewer # 3 separate reviewers
94
87
 
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'
88
+ # Launch agents in background with specific prompts
89
+ hcom open test-writer --claude-args "-p 'write tests for any new code'"
100
90
 
101
- # Launch 2 claude code instances and 2 of your agents
102
- hcom open 2 backend-coder frontend-coder
103
- ```
91
+ # Launch watchers that respond to notifications
92
+ hcom open reviewer --claude-args "-p 'review when @mentioned'"
104
93
 
94
+ # Pass multiple Claude flags
95
+ hcom open orchestrator --claude-args "--model claude-3-opus
96
+ --resume session_id"
105
97
 
106
- ## 🦐 Requirements
98
+ # Launch in specific directories
99
+ cd backend && hcom open api-specialist
100
+ cd ../frontend && hcom open ui-specialist
107
101
 
108
- - Python 3.6+
109
- - [Claude Code](https://claude.ai/code)
102
+ # Create named teams that can be @mentioned
103
+ cd ~/api && hcom open --prefix api debugger
104
+ cd ~/auth && hcom open --prefix auth debugger
105
+
106
+ # Message specific teams
107
+ hcom send "@api login works but API fails" # or in dashboard: hcom watch
108
+ ```
110
109
 
111
110
 
112
111
  ## 🥨 Commands
113
112
 
114
- ### Commands
115
113
  | Command | Description |
116
114
  |---------|-------------|
117
115
  | `hcom open [n]` | Launch n Claude instances (or named agents) |
118
- | `hcom watch` | View conversation/status dashboard |
116
+ | `hcom watch` | Conversation/status dashboard |
119
117
  | `hcom clear` | Clear and archive conversation |
120
118
  | `hcom cleanup` | Remove HCOM hooks from current directory |
121
119
 
@@ -125,7 +123,7 @@ hcom open 2 backend-coder frontend-coder
125
123
  | `hcom send 'message'` | Send message |
126
124
  | `hcom watch --logs` | View message history (non-interactive) |
127
125
  | `hcom watch --status` | Show instance status (non-interactive) |
128
- | `hcom watch --wait[=seconds]` | Wait for new messages (automation) |
126
+ | `hcom watch --wait [timeout]` | Wait and notify for new messages |
129
127
 
130
128
  ---
131
129
 
@@ -136,15 +134,14 @@ hcom open 2 backend-coder frontend-coder
136
134
 
137
135
  Settings can be changed two ways:
138
136
 
137
+ #### Method 1: Environment variable (temporary, per-command/instance)
138
+
139
+
139
140
  ```bash
140
- # Method 1: Environment variable (termporary per-command/instance)
141
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
142
  ```
146
143
 
147
- ### All Settings
144
+ #### Method 2: Config file (persistent, affects all instances)
148
145
 
149
146
  ### Config File Location
150
147
 
@@ -158,12 +155,12 @@ HCOM_INSTANCE_HINTS="always update chat with progress" hcom open nice-subagent-b
158
155
  | `sender_name` | "bigboss" | `HCOM_SENDER_NAME` | Your name in chat |
159
156
  | `sender_emoji` | "🐳" | `HCOM_SENDER_EMOJI` | Your emoji icon |
160
157
  | `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 |
158
+ | `first_use_text` | "Essential, concise messages only" | `HCOM_FIRST_USE_TEXT` | Welcome message for instances |
162
159
  | `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) |
160
+ | `terminal_command` | null | `HCOM_TERMINAL_COMMAND` | Custom terminal command (see Terminal Options) |
164
161
  | `cli_hints` | "" | `HCOM_CLI_HINTS` | Extra text added to CLI outputs |
165
162
  | `instance_hints` | "" | `HCOM_INSTANCE_HINTS` | Extra text added to instance messages |
166
- | `env_overrides` | {} | - | Additional environment variables for Claude |
163
+ | `env_overrides` | {} | - | Additional environment variables for Claude Code |
167
164
 
168
165
  ### Examples
169
166
 
@@ -203,12 +200,13 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
203
200
  3. **Waiting**: Stop hook keeps Claude in a waiting state for new messages
204
201
 
205
202
  - **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
206
- - **Persistence**: Names persist across `claude --resume` maintaining conversation context
203
+ - **Persistence**: Names persist across `--resume` maintaining conversation context
207
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)
208
206
 
209
207
  ### Architecture
210
208
  - **Single conversation** - All instances share one global conversation
211
- - **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
212
210
  - **@-mention filtering** - Target messages to specific instances or teams
213
211
 
214
212
  ### File Structure
@@ -227,115 +225,79 @@ your-project/
227
225
 
228
226
 
229
227
  <details>
230
- <summary><strong>🧈 Launching Claude Code</strong></summary>
231
-
232
- ### Launching Claude Code
228
+ <summary><strong>🥔 Terminal Options</strong></summary>
233
229
 
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
- ```
230
+ ### Terminal Mode
246
231
 
247
232
  Configure terminal behavior in `~/.hcom/config.json`:
248
233
  - `"terminal_mode": "new_window"` - Opens new terminal windows (default)
249
- - `"terminal_mode": "same_terminal"` - Runs in background
234
+ - `"terminal_mode": "same_terminal"` - Opens in current terminal
250
235
  - `"terminal_mode": "show_commands"` - Prints commands without executing
251
236
 
237
+ ### Default Terminals
238
+
239
+ - **macOS**: Terminal.app
240
+ - **Linux**: gnome-terminal, konsole, or xterm
241
+ - **Windows**: Windows Terminal / PowerShell
242
+
252
243
  ### Running in Current Terminal
253
244
  ```bash
254
- # For single instance work
245
+ # For single instances
255
246
  HCOM_TERMINAL_MODE=same_terminal hcom open
256
- # This runs Claude directly in your current terminal
257
247
  ```
258
248
 
259
- </details>
260
-
261
- <details>
262
- <summary><strong>🥔 Integrations</strong></summary>
263
-
264
- ### Custom Terminal Integration
249
+ ### Custom Terminal Examples
265
250
 
266
251
  Configure `terminal_command` in `~/.hcom/config.json` to use your preferred terminal:
267
252
 
268
253
  ### iTerm2
269
254
  ```json
270
255
  {
271
- "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}\"'"
272
257
  }
273
258
  ```
274
259
 
275
260
  ### Alacritty
276
261
  ```json
277
262
  {
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}\""
263
+ "terminal_command": "alacritty -e sh -c '{env} {cmd}'"
286
264
  }
287
265
  ```
288
266
 
289
267
  ### Kitty
290
268
  ```json
291
269
  {
292
- "terminal_command": "kitty -e bash -c '{env} {cmd}'"
270
+ "terminal_command": "kitty sh -c '{env} {cmd}'"
293
271
  }
294
272
  ```
295
273
 
296
- ### tmux
274
+ ### WezTerm
297
275
  ```json
298
276
  {
299
- "terminal_command": "tmux new-window -n hcom '{env} {cmd}'"
277
+ "terminal_command": "wezterm cli spawn --new-window -- sh -c '{env} {cmd}'"
300
278
  }
301
279
  ```
302
280
 
303
- ### screen
281
+ ### tmux
304
282
  ```json
305
283
  {
306
- "terminal_command": "screen -dmS hcom-$$ bash -c '{env} {cmd}'"
284
+ "terminal_command": "tmux new-window -n hcom sh -c '{env} {cmd}'"
307
285
  }
308
286
  ```
309
287
 
310
288
  ### Available Placeholders
311
289
  - `{cmd}` - The claude command to execute
312
- - `{env}` - Environment variables (pre-formatted)
290
+ - `{env}` - Environment variables (pre-formatted as `VAR1='value1' VAR2='value2'`)
313
291
  - `{cwd}` - Current working directory
314
292
 
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"
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
329
297
 
330
- # View conversation log
331
- tail -f ~/.hcom/hcom.log
332
-
333
- # Check instance status
334
- cat ~/.hcom/hcom.json
335
-
336
- ```
337
298
  </details>
338
299
 
300
+
339
301
  <details>
340
302
  <summary><strong>🦆 Remove</strong></summary>
341
303
 
@@ -345,9 +307,14 @@ cat ~/.hcom/hcom.json
345
307
  hcom clear
346
308
  ```
347
309
 
348
- ### 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
349
316
  ```bash
350
- hcom clenup --all
317
+ hcom cleanup --all
351
318
  ```
352
319
 
353
320
  ### Remove hcom Completely