hcom 0.4.0__tar.gz → 0.4.2.post3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hcom
3
- Version: 0.4.0
3
+ Version: 0.4.2.post3
4
4
  Summary: CLI tool for launching multiple Claude Code terminals with interactive subagents, headless persistence, and real-time communication via hooks
5
5
  Author: aannoo
6
6
  License-Expression: MIT
@@ -38,44 +38,47 @@ CLI tool for launching multiple Claude Code terminals with interactive [subagent
38
38
 
39
39
  **Run without installing** ([uv](https://docs.astral.sh/uv/#installation))
40
40
  ```bash
41
- uvx hcom open 2
41
+ uvx hcom 2
42
42
  ```
43
43
 
44
44
  **Install**
45
45
  ```bash
46
- pip install hcom
47
- hcom open 2
46
+ pip install hcom # or: uv tool install hcom
47
+ # then:
48
+ hcom 2 # or tell claude to run hcom start
48
49
  ```
49
50
 
50
51
  | Commands | |
51
52
  |---------|-------------|
52
- | `hcom open [n]` | Launch `n` instances or named agents |
53
+ | `hcom <n>` | Launch `n` instances (default 1) |
53
54
  | `hcom watch` | View live dashboard and messaging |
54
55
  | `hcom stop` | Disable hcom chat for instance |
55
56
  | `hcom start` | Enable hcom chat for instance |
57
+ | `hcom reset` | Stop all + archive logs + remove hooks + clear config |
58
+
56
59
 
57
60
 
58
61
  ## 🦆 What It Does
59
62
 
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`.
63
+ `hcom` adds hooks to `~/.claude/settings.json` 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
64
 
62
65
 
63
66
  ### Interactive subagents in their own terminal
64
67
  ```bash
65
68
  # Launch subagents from your .claude/agents
66
- hcom open -a planner -a code-writer -a reviewer
69
+ HCOM_AGENT=planner,code-writer,reviewer hcom 1
67
70
  ```
68
71
 
69
72
  ### Persistent headless instances
70
73
  ```bash
71
- # Launch one headless instance (default 30min timeout)
72
- hcom open -p
73
- hcom stop # Stop it earlier than timeout
74
+ hcom 1 claude -p # Launch one headless instance (default 30min timeout)
75
+ hcom watch # See what it's doing
76
+ hcom stop # Let it die earlier than timeout
74
77
  ```
75
78
 
76
79
  ### Groups and direct messages
77
80
  ```bash
78
- hcom open 2 -t cool # Creates cool-hovoa7 & cool-homab8
81
+ HCOM_TAG=cool hcom 2 # Creates cool-hovoa7 & cool-homab8
79
82
  hcom send '@cool hi, you are cool'
80
83
  hcom send '@homab8 hi, you are cooler'
81
84
  ```
@@ -83,8 +86,8 @@ hcom send '@homab8 hi, you are cooler'
83
86
  ### Toggle HCOM in Claude Code
84
87
  ```bash
85
88
  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
89
+ 'run hcom start' # Start HCOM for this instance to receive messages
90
+ 'run hcom stop' # Stop HCOM for this instance, continue as normal claude code
88
91
  ```
89
92
 
90
93
  ---
@@ -109,46 +112,46 @@ claude # Start normal Claude Code
109
112
  <summary><strong>🥨 All Commands</strong></summary>
110
113
 
111
114
  ```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"
115
+ Usage: [ENV_VARS] hcom <COUNT> [claude <ARGS>...]
116
+ hcom watch [--logs|--status|--wait [SEC]]
117
+ hcom send "message"
118
+ hcom stop [alias|all] [--force]
119
+ hcom start [alias]
120
+
121
+ Launch Examples:
122
+ hcom 3 Open 3 terminals with claude connected to hcom
123
+ hcom 3 claude -p + Background/headless
124
+ HCOM_TAG=api hcom 3 claude -p + @-mention group tag
125
+ claude 'run hcom start' claude code with prompt will also work
118
126
 
119
127
  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)
128
+ watch Interactive messaging/status dashboard
129
+ --logs Print all messages
130
+ --status Print instance status JSON
131
+ --wait [SEC] Wait and notify for new message
132
+
133
+ send "msg" Send message to all instances
134
+ send "@alias msg" Send to specific instance/group
135
+
136
+ stop Stop current instance (from inside Claude)
137
+ stop <alias> Stop specific instance
138
+ stop all Stop all instances
139
+ --force Emergency stop (denies Bash tool)
140
+
141
+ start Start current instance (from inside Claude)
142
+ start <alias> Start specific instance
143
+
144
+ reset Stop all + archive logs + remove hooks + clear config
145
+ reset logs Clear + archive conversation log
146
+ reset hooks Safely remove hcom hooks from claude settings.json
147
+ reset config Clear + backup config.env
148
+
149
+ Environment Variables:
150
+ HCOM_TAG=name Group tag (creates name-* instances)
151
+ HCOM_AGENT=type Agent type (comma-separated for multiple)
152
+ HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
153
+ HCOM_PROMPT=text Initial prompt
154
+ HCOM_TIMEOUT=secs Timeout in seconds (default: 1800)
152
155
  ```
153
156
 
154
157
  </details>
@@ -160,27 +163,29 @@ Stop flags:
160
163
 
161
164
  ```bash
162
165
  # Launch 3 headless instances that time out after 60 seconds of inactivity
163
- HCOM_WAIT_TIMEOUT="60" hcom open 3 -p
166
+ HCOM_TIMEOUT=60 hcom 3 claude -p
164
167
  # Stop all instances
165
168
  hcom stop all
166
169
 
167
170
  # Launch multiple of the same subagent
168
- hcom open 3 -a reviewer
171
+ HCOM_AGENT=reviewer hcom 3
169
172
 
170
- # Launch mixed agents with team prefix
171
- hcom open -t api -a backend -a frontend
173
+ # Launch mixed agents with team tag
174
+ HCOM_TAG=api HCOM_AGENT=backend,frontend hcom 1
172
175
 
173
- # Launch agent with specific prompt
174
- HCOM_INITIAL_PROMPT='write tests' hcom open -a test-writer
176
+ # Launch instance with specific prompt
177
+ HCOM_PROMPT='write tests' HCOM_AGENT=test-writer hcom 1
175
178
 
176
- # Resume instance (hcom chat will continue)
177
- hcom open -- --resume session_id
179
+ # Pass claude args
180
+ hcom 1 claude --resume session_id # Resume instance (hcom chat continues)
178
181
 
179
- # Text appended to all messages recieved by instance
180
- HCOM_INSTANCE_HINTS="remember where you came from" hcom open
182
+ # Text appended to all messages received by instance
183
+ HCOM_HINTS="remember where you came from" hcom 1
181
184
 
182
- # Pass multiple Claude flags
183
- hcom open -a orchestrator -- --model sonnet --resume session_id
185
+ # Start hcom communication with shared context forked from a checkpoint
186
+ HCOM_TAG=clone hcom 3 claude --resume session_id --fork-session
187
+ # Creates: clone-skal7, clone-hova3, clone-koe2. Mention all: @clone
188
+ ```
184
189
 
185
190
  </details>
186
191
 
@@ -189,59 +194,40 @@ hcom open -a orchestrator -- --model sonnet --resume session_id
189
194
 
190
195
  ### Configuration
191
196
 
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)
197
+ Config file: `~/.hcom/config.env`
202
198
 
203
- ### Config File Location
199
+ All HCOM_* settings work from config file (persistent) or environment variable (temporary). Environment variables override config file.
204
200
 
205
- `~/.hcom/config.json`
201
+ | Setting | Description | Default |
202
+ |---------|-------------|---------|
203
+ | `HCOM_TIMEOUT` | Instance wait timeout (1-86400 seconds) | 1800 |
204
+ | `HCOM_TERMINAL` | Terminal mode: `new`, `here`, `print`, or custom `{script}` | `new` |
205
+ | `HCOM_PROMPT` | Initial prompt for new instances | `say hi in hcom chat` |
206
+ | `HCOM_HINTS` | Text appended to all messages | (empty) |
207
+ | `HCOM_TAG` | Group tag (creates tag-* instances) | (empty) |
208
+ | `HCOM_AGENT` | Agent type, comma-separated | `generic` |
206
209
 
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 |
210
+ Any other environment variables in config.env are passed to Claude Code instances (e.g., ANTHROPIC_MODEL).
222
211
 
223
212
  ### Examples
224
213
 
225
214
  ```bash
226
- # Change your name for one command
227
- HCOM_SENDER_NAME="coolguy" hcom send "LGTM!"
215
+ # Temporary override for one command
216
+ HCOM_TIMEOUT=60 hcom 3
228
217
 
229
- # Make instances timeout after 60 seconds instead of 30 minutes
230
- HCOM_WAIT_TIMEOUT=60 hcom open 3
218
+ # Set persistent config
219
+ echo "HCOM_TIMEOUT=60" >> ~/.hcom/config.env
220
+ echo "HCOM_TERMINAL=here" >> ~/.hcom/config.env
231
221
 
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
222
+ # Pass Claude Code env vars
223
+ ANTHROPIC_MODEL=opus hcom 3
237
224
  ```
238
225
 
239
226
  **Windows PowerShell**:
240
227
  ```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
228
+ # Temporary environment variable
229
+ $env:HCOM_TERMINAL="here"; hcom 1
230
+ $env:HCOM_TIMEOUT="60"; hcom 3
245
231
  ```
246
232
 
247
233
  ### Status Indicators
@@ -263,7 +249,7 @@ When running `hcom watch`, each instance shows its current state:
263
249
 
264
250
  ### Hooks!
265
251
 
266
- hcom adds hooks to your project directory's `.claude/settings.local.json`:
252
+ hcom adds hooks to `~/.claude/settings.json`:
267
253
 
268
254
  1. **Sending**: Claude uses `hcom send "message"` to communicate
269
255
  2. **Receiving**: Other Claudes get notified via Stop hook or immediate delivery after sending
@@ -272,25 +258,24 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
272
258
  - **Identity**: Each instance gets a unique name based on session ID (e.g., "hovoa7")
273
259
  - **Persistence**: Names persist across `--resume` maintaining conversation context
274
260
  - **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
261
+ - **Agents**: When you run `HCOM_AGENT=researcher hcom 1`, 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
262
 
277
263
  ### Architecture
278
264
  - **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`
265
+ - **Opt-in participation** - Only Claude Code instances launched with `hcom` join automatically, normal instances can use `hcom start`/`stop`
280
266
  - **@-mention filtering** - Target messages to specific instances or teams
281
267
 
282
268
  ### File Structure
283
269
  ```plaintext
284
- ~/.hcom/
270
+ ~/.hcom/
285
271
  ├── hcom.log # Conversation log
286
272
  ├── instances/ # Instance tracking
287
273
  ├── logs/ # Background process logs
288
- ├── config.json # Configuration
274
+ ├── config.env # Configuration
289
275
  └── archive/ # Archived sessions
290
276
 
291
- your-project/
292
- └── .claude/
293
- └── settings.local.json # hcom hooks
277
+ ~/.claude/
278
+ └── settings.json # hcom hooks (global)
294
279
  ```
295
280
 
296
281
  </details>
@@ -301,14 +286,15 @@ your-project/
301
286
 
302
287
  ### Terminal Mode
303
288
 
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
289
+ Configure terminal behavior in `~/.hcom/config.env`:
290
+ - `HCOM_TERMINAL=new` - Opens new terminal window(s) (default)
291
+ - `HCOM_TERMINAL=here` - Opens in current terminal
292
+ - `HCOM_TERMINAL=print` - Prints commands instead of launching
307
293
 
308
294
  #### Running in current terminal temporarily
309
295
  ```bash
310
296
  # For single instances
311
- HCOM_TERMINAL_MODE=same_terminal hcom open
297
+ HCOM_TERMINAL=here hcom 1
312
298
  ```
313
299
 
314
300
  ### Default Terminals
@@ -321,7 +307,7 @@ HCOM_TERMINAL_MODE=same_terminal hcom open
321
307
 
322
308
  ### Custom Terminals
323
309
 
324
- Configure `terminal_command` in `~/.hcom/config.json` (permanent) or environment variables (temporary).
310
+ Configure in `~/.hcom/config.env` (permanent) or environment variables (temporary).
325
311
 
326
312
  #### How to use this
327
313
 
@@ -336,61 +322,61 @@ Example template: `your_terminal_command --execute "bash {script}"`
336
322
  ### Custom Terminal Examples
337
323
 
338
324
  #### iTerm2
339
- ```json
340
- "terminal_command": "open -a iTerm {script}"
325
+ ```bash
326
+ HCOM_TERMINAL="open -a iTerm {script}"
341
327
  ```
342
328
 
343
329
  #### [ttab](https://github.com/mklement0/ttab) (new tab instead of new window in Terminal.app)
344
- ```json
345
- "terminal_command": "ttab {script}"
330
+ ```bash
331
+ HCOM_TERMINAL="ttab {script}"
346
332
  ```
347
333
 
348
334
  #### [wttab](https://github.com/lalilaloe/wttab) (new tab in Windows Terminal)
349
- ```json
350
- "terminal_command": "wttab {script}"
335
+ ```bash
336
+ HCOM_TERMINAL="wttab {script}"
351
337
  ```
352
338
 
353
339
  #### More
354
- ```json
340
+ ```bash
355
341
  # WezTerm Linux/Windows
356
- "terminal_command": "wezterm start -- bash {script}"
342
+ HCOM_TERMINAL="wezterm start -- bash {script}"
357
343
 
358
344
  # Tabs from within WezTerm
359
- "terminal_command": "wezterm cli spawn -- bash {script}"
345
+ HCOM_TERMINAL="wezterm cli spawn -- bash {script}"
360
346
 
361
347
  # WezTerm macOS:
362
- "terminal_command": "open -n -a WezTerm.app --args start -- bash {script}"
348
+ HCOM_TERMINAL="open -n -a WezTerm.app --args start -- bash {script}"
363
349
 
364
350
  # Tabs from within WezTerm macOS
365
- "terminal_command": "/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn -- bash {script}"
351
+ HCOM_TERMINAL="/Applications/WezTerm.app/Contents/MacOS/wezterm cli spawn -- bash {script}"
366
352
 
367
353
  # Wave Terminal Mac/Linux/Windows. From within Wave Terminal:
368
- "terminal_command": "wsh run -- bash {script}"
354
+ HCOM_TERMINAL="wsh run -- bash {script}"
369
355
 
370
356
  # Alacritty macOS:
371
- "terminal_command": "open -n -a Alacritty.app --args -e bash {script}"
357
+ HCOM_TERMINAL="open -n -a Alacritty.app --args -e bash {script}"
372
358
 
373
359
  # Alacritty Linux:
374
- "terminal_command": "alacritty -e bash {script}"
360
+ HCOM_TERMINAL="alacritty -e bash {script}"
375
361
 
376
362
  # Kitty macOS:
377
- "terminal_command": "open -n -a kitty.app --args {script}"
363
+ HCOM_TERMINAL="open -n -a kitty.app --args {script}"
378
364
 
379
365
  # Kitty Linux
380
- "terminal_command": "kitty {script}"
366
+ HCOM_TERMINAL="kitty {script}"
381
367
  ```
382
368
 
383
369
  #### tmux
384
- ```json
385
- "terminal_command": "tmux new-window -n hcom {script}"
370
+ ```bash
371
+ HCOM_TERMINAL="tmux new-window -n hcom {script}"
386
372
  ```
387
373
  ```bash
388
374
  # tmux commands work inside tmux, start a session with:
389
- tmux new-session 'hcom open 3' # each instance opens in new tmux window
375
+ tmux new-session 'hcom 3' # each instance opens in new tmux window
390
376
 
391
377
  # Or one time split-panes:
392
378
  # Start tmux with split panes and 3 claude instances in hcom chat
393
- HCOM_TERMINAL_COMMAND="tmux split-window -h {script}" hcom open 3
379
+ HCOM_TERMINAL="tmux split-window -h {script}" hcom 3
394
380
  ```
395
381
 
396
382
  ### Android (Termux)
@@ -409,7 +395,7 @@ HCOM_TERMINAL_COMMAND="tmux split-window -h {script}" hcom open 3
409
395
  ```
410
396
  4. Enable: "Display over other apps" permission for visible terminals
411
397
 
412
- 5. Run: `hcom open`
398
+ 5. Run: `hcom 1`
413
399
 
414
400
  ---
415
401
 
@@ -442,11 +428,8 @@ hcom start hovoa7
442
428
 
443
429
  ### Remove HCOM hooks
444
430
  ```bash
445
- # Current directory
446
- hcom stop hooking
447
-
448
- # All directories
449
- hcom stop hooking --all
431
+ # Stop all, archive conversation, remove hooks, clear config
432
+ hcom reset
450
433
  ```
451
434
 
452
435
  ### Remove hcom Completely