@logicseek/hello-cc 0.1.0 → 0.1.2

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,81 @@
1
+ # Changelog
2
+
3
+ This project keeps one changelog file. Add one section per release, with the
4
+ newest version first. Do not create a new changelog file for every release.
5
+
6
+ Before publishing, run:
7
+
8
+ ```bash
9
+ npm run release:check
10
+ npm run release:notes
11
+ ```
12
+
13
+ Use the output of `npm run release:notes` as the GitHub Release description for
14
+ the current `package.json` version.
15
+
16
+ ## 0.1.2
17
+
18
+ ### Summary
19
+
20
+ hello-cc 0.1.2 tightens the public release surface after the first scoped npm
21
+ publish. It adds a first-class update command, makes uninstall discoverable in
22
+ top-level help, and reorganizes the documentation so the npm package page and
23
+ GitHub release notes have a clear, detailed description of what changed.
24
+
25
+ ### Highlights
26
+
27
+ - Added `hcc update`, which updates the global npm install by running
28
+ `npm install -g @logicseek/hello-cc@latest`.
29
+ - Added `hcc update --tag`, `hcc update --registry`, and `hcc update --dry-run`
30
+ for controlled upgrades and release verification.
31
+ - Made `hcc uninstall` visible in top-level `hcc --help`, matching the README
32
+ and command reference.
33
+ - Kept uninstall behavior conservative: `hcc uninstall` removes hooks and
34
+ shims, while `hcc uninstall --purge --yes` is required to remove project data.
35
+ - Split documentation into a short README, a user guide, command reference, and
36
+ documentation index in both English and Chinese.
37
+ - Restored the Star History chart at the bottom of both README files.
38
+ - Included README-linked package assets in the npm tarball so the package page
39
+ renders the project logo correctly.
40
+
41
+ ### Documentation
42
+
43
+ - `README.md` and `README.zh-CN.md` now focus on product positioning, install
44
+ and maintenance commands, quick start, a basic workflow, and links to docs.
45
+ - `docs/guide.md` and `docs/guide.zh-CN.md` describe practical usage and avoid
46
+ embedding the full command list.
47
+ - `docs/commands.md` and `docs/commands.zh-CN.md` provide the compact command
48
+ reference.
49
+ - `docs/README.md` and `docs/README.zh-CN.md` provide the documentation index.
50
+ - English documentation links now point to English user docs, and Chinese
51
+ documentation links point to Chinese user docs.
52
+
53
+ ### Validation
54
+
55
+ The 0.1.2 release should be validated with:
56
+
57
+ ```bash
58
+ git diff --check
59
+ node --check bin/hcc.mjs
60
+ node --check scripts/regression.mjs
61
+ node --check lib/setup.mjs
62
+ node --check lib/discover.mjs
63
+ npm pack --dry-run --json
64
+ npm publish --dry-run --registry=https://registry.npmjs.org/ --access public
65
+ npm test
66
+ ```
67
+
68
+ The package dry run should include `CHANGELOG.md`, `assets/logo.svg`, and the
69
+ English and Chinese command reference files.
70
+
71
+ The expected full regression marker is:
72
+
73
+ ```text
74
+ FULL_REGRESSION_OK
75
+ ```
76
+
77
+ ### Release Notes Source
78
+
79
+ Use this changelog section as the source for the GitHub Release notes for
80
+ `v0.1.2`. The npm package metadata keeps a short description, while the package
81
+ README and this changelog provide the detailed release description.
package/README.md CHANGED
@@ -6,100 +6,89 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://github.com/Dullne/hello-cc"><img src="https://img.shields.io/github/stars/Dullne/hello-cc?style=flat-square&color=40c4aa" alt="GitHub stars"></a>
9
+ <a href="https://www.npmjs.com/package/@logicseek/hello-cc"><img src="https://img.shields.io/npm/v/@logicseek/hello-cc?style=flat-square&color=40c4aa" alt="npm version"></a>
9
10
  <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D24.0.0-brightgreen?style=flat-square" alt="node >=24"></a>
10
11
  <a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square" alt="license Apache 2.0"></a>
11
12
  </p>
12
13
 
13
14
  <p align="center"><b>English</b> | <a href="README.zh-CN.md">中文</a></p>
14
15
 
15
- `hello-cc` connects Claude Code, Codex, and other coding CLI sessions into a
16
- project-local peer mesh. The command is `hcc`.
16
+ `hello-cc` is a local control plane for Claude Code, Codex, and other coding
17
+ CLI sessions. It gives every terminal in one project a shared task board,
18
+ mailbox, lock table, and browser console while keeping the real local terminal
19
+ as the source of interaction.
17
20
 
18
- The default model is a flat peer mesh, not a fixed main/worker topology. Every
19
- terminal session is a named peer that can see open tasks, receive directed
20
- messages, hold locks, hand off progress, and be observed or operated from the
21
- web console.
21
+ It is built for developers who run multiple AI coding agents in the same repo
22
+ and need them to coordinate instead of guessing what the other sessions are
23
+ doing.
22
24
 
23
- ```text
24
- <project>/.hello-cc/mesh.db
25
- ```
25
+ ## Highlights
26
26
 
27
- ## Install
27
+ - **Shared project memory**: peers, tasks, messages, locks, handoffs, and
28
+ events are stored in `<project>/.hello-cc/mesh.db`.
29
+ - **Real terminal control**: Web attaches to the same local tmux pane as your
30
+ terminal, not a separate browser-only shell.
31
+ - **Claude/Codex awareness**: hooks inject live `hcc` state before model turns,
32
+ so agents can answer from current project state.
33
+ - **Conflict avoidance**: advisory locks and handoffs make multi-agent editing
34
+ explicit.
35
+ - **Resume-friendly identity**: resumed Claude/Codex sessions map back to
36
+ stable peers when provider session ids are available.
37
+ - **One console, many projects**: one local Web runtime can switch between
38
+ registered project roots.
28
39
 
29
- **Node 24+ is required** because hello-cc uses built-in `node:sqlite`.
40
+ ## Install And Manage
30
41
 
31
- Install the CLI globally from npm:
42
+ Node.js 24 or newer is required.
32
43
 
33
44
  ```bash
34
45
  npm install -g @logicseek/hello-cc
35
46
  ```
36
47
 
37
- Or run it without a global install:
48
+ Update an existing global install:
38
49
 
39
50
  ```bash
40
- npx @logicseek/hello-cc web
51
+ hcc update
41
52
  ```
42
53
 
43
- For local development, run the CLI directly from the checkout:
54
+ Or run it without a global install:
44
55
 
45
56
  ```bash
46
- node ./bin/hcc.mjs web
57
+ npx @logicseek/hello-cc web
47
58
  ```
48
59
 
49
- After a global install, both `hcc` and `hello-cc` are available. The examples
50
- below use `hcc`.
60
+ Remove hooks and shims from this machine:
51
61
 
52
- ## Default Entry
62
+ ```bash
63
+ hcc uninstall
64
+ ```
53
65
 
54
- Run one command in the project directory:
66
+ Remove the global npm package:
55
67
 
56
68
  ```bash
57
- cd /path/to/project
58
- hcc web
69
+ npm uninstall -g @logicseek/hello-cc
59
70
  ```
60
71
 
61
- `hcc web` is the default entrypoint. It automatically:
62
-
63
- 1. Initializes `.hello-cc/mesh.db` in the current directory
64
- 2. Writes bounded guidance blocks: `.hello-cc/HCC.md`, `CLAUDE.md`, `AGENTS.md`
65
- 3. Installs or refreshes Claude Code hooks: `~/.claude/settings.json`
66
- 4. Installs or refreshes Codex hooks: `~/.codex/hooks.json`
67
- 5. Installs `~/.hcc-shims/claude` and `~/.hcc-shims/codex`
68
- 6. Adds `~/.hcc-shims` to the shell PATH
69
- 7. Ensures `tmux` is available, with best-effort automatic install and a clear
70
- install command if that fails
71
- 8. Starts or reuses the global web console, registers the current project,
72
- prints URL/PID/runtime/log, then returns the terminal to you
72
+ ## Quick Start
73
73
 
74
- Example output:
74
+ Run this inside the project you want agents to share:
75
75
 
76
- ```text
77
- hello-cc web started in background
78
- pid: 12345
79
- project: /path/to/project
80
- database: /path/to/project/.hello-cc/mesh.db
81
- runtime: /path/to/project/.hello-cc/runtime.json
82
- log: /path/to/project/.hello-cc/web.log
83
- open: http://<machine-ip>:8787/?project=%2Fpath%2Fto%2Fproject
84
- local: http://127.0.0.1:8787/?project=%2Fpath%2Fto%2Fproject
85
- shims: installed claude, codex
86
- PATH updated in ~/.bashrc; open a new terminal or source it
87
- stop: hcc down
76
+ ```bash
77
+ cd /path/to/project
78
+ hcc web
88
79
  ```
89
80
 
90
- `hcc web` uses a single global web runtime. Running `hcc web` again from
91
- another project directory does not open another port; it registers that project
92
- with the same web console. The frontend Project selector switches between
93
- registered roots. Each project still keeps its own `.hello-cc/mesh.db`, so
94
- tasks, messages, locks, and peers stay isolated.
81
+ Then open the printed local URL. `hcc web` initializes the project bus, installs
82
+ Claude/Codex hooks and shims, starts or reuses the Web console, and returns the
83
+ terminal to you.
95
84
 
96
- After the first shim install, open a new terminal or run:
85
+ After the first shim install, open a new terminal or reload your shell:
97
86
 
98
87
  ```bash
99
88
  source ~/.bashrc
100
89
  ```
101
90
 
102
- Then direct project-local commands are wrapped automatically:
91
+ Start normal agent sessions from the project:
103
92
 
104
93
  ```bash
105
94
  claude
@@ -108,285 +97,39 @@ claude --resume <session-id>
108
97
  codex resume <session-id>
109
98
  ```
110
99
 
111
- The wrappers create or reuse **local persistent tmux terminals**:
112
-
113
- - The local terminal attaches to the same tmux session and remains usable.
114
- - The web console controls the same tmux pane, not a temporary browser-only
115
- terminal.
116
- - `hcc down` stops only the web runtime. It does not kill tmux sessions.
117
- - Running `hcc web` again reattaches live recorded tmux panes.
118
-
119
- For local coordination without Web or shims, use the lower-level command:
120
-
121
- ```bash
122
- hcc up
123
- ```
124
-
125
- Most users should start with `hcc web`.
126
-
127
- ## Project Boundary
128
-
129
- By default, the project boundary is the **current working directory**. If the
130
- current directory has no `.hello-cc/mesh.db`, hello-cc creates one on first use:
131
-
132
- ```text
133
- /repo-a/.hello-cc/mesh.db
134
- /repo-a/subdir/.hello-cc/mesh.db
135
- ```
136
-
137
- Those are two different projects by default. Sessions communicate naturally
138
- when they start from the same project path.
139
-
140
- To share one bus across paths or worktrees, opt in explicitly:
141
-
142
- ```bash
143
- hcc --root /path/to/project web
144
- export HCC_ROOT=/path/to/project
145
- export HCC_DB=/path/to/project/.hello-cc/mesh.db
146
- ```
147
-
148
- hello-cc does not automatically inherit a parent directory's bus. That avoids
149
- subdirectory sessions joining a broader project by accident.
150
-
151
- ## Communication Model
152
-
153
- hello-cc is not point-to-point CLI messaging and does not require MCP. The core
154
- is a project-local SQLite WAL bus:
155
-
156
- ```text
157
- Claude/Codex/plain shell
158
- -> hooks / hcc commands / web runtime
159
- -> .hello-cc/mesh.db
160
- -> peers / tasks / messages / locks / handoffs / events
161
- -> tmux-backed terminal control
162
- ```
163
-
164
- Tasks and messages have different read semantics:
165
-
166
- - **Tasks** are project facts. Every peer sees tasks until they become `done`
167
- or `abandoned`. A task does not disappear because one terminal read it.
168
- - **Messages** are addressed mailbox items. `hcc msg inbox` defaults to unread
169
- messages for the current peer, and `hcc msg ack` records per-peer read state.
170
- - `ask` and `broadcast` write durable messages. With `--inject`, they also send
171
- live input to runtime-attached terminals.
172
- - Locks use SQLite transactions and TTLs. They are coordination locks, not a
173
- filesystem sandbox.
174
-
175
- ## How Claude/Codex Knows Other Sessions
176
-
177
- The primary path is hook injection, not `CLAUDE.md`.
178
-
179
- `hcc web` installs Claude Code and Codex hooks. On session start, user prompt
180
- submit, tool events, and idle events, hooks inject the current hello-cc snapshot
181
- into the model context:
100
+ Those sessions become tmux-backed peers that can be seen and controlled from
101
+ Web while remaining usable from the local terminal.
182
102
 
183
- - current peer identity
184
- - active peer list
185
- - open tasks
186
- - unread messages for the current peer
187
- - active locks
188
- - suggested commands such as `hcc status`, `hcc peers`, `hcc task list`,
189
- `hcc msg inbox`, and `hcc lock list`
190
-
191
- So when an attached Claude/Codex session is asked what other sessions are doing,
192
- it should answer from the latest hello-cc state instead of generic isolation
193
- knowledge.
194
-
195
- If a session still says it cannot know, likely causes are:
196
-
197
- - `hcc web` has not been run in the project directory
198
- - the terminal has not loaded `~/.hcc-shims` into PATH
199
- - Codex hooks are not enabled or the installed hook has not been trusted in
200
- Codex's hook review flow
201
- - the CLI was started in a different project directory
202
- - the session was an already-open raw terminal before hello-cc was installed
203
- - the provider CLI version did not fire the expected hook
204
-
205
- To verify Claude Code hook injection directly, run a one-shot debug call from
206
- the same project:
207
-
208
- ```bash
209
- claude -p 'Do you see hello-cc open tasks?' --debug hooks --debug-file /tmp/hcc-claude-hooks.log
210
- ```
211
-
212
- The debug log should contain `Hook UserPromptSubmit ... provided
213
- additionalContext` and the `hello-cc coordination` block. If that is present but
214
- the model still answers from generic isolation knowledge, restart/resume the
215
- session through the shim and ask again; hello-cc injects a stronger instruction
216
- on every new user prompt.
217
-
218
- ## Web Console
219
-
220
- Start local and LAN-visible control:
221
-
222
- ```bash
223
- hcc web
224
- ```
225
-
226
- Use a token only when you want one:
227
-
228
- ```bash
229
- HCC_WEB_TOKEN='choose-a-long-token' hcc web --host 0.0.0.0 --port 8787
230
- ```
231
-
232
- Open from another machine on the same network:
233
-
234
- ```text
235
- http://<machine-ip>:8787/
236
- ```
237
-
238
- The web console can:
239
-
240
- - switch between multiple registered project roots on one port
241
- - register another project path from the browser and switch to it without
242
- starting another web server
243
- - show project state: peers, tasks, messages, locks, handoffs, events
244
- - operate local terminals: start Claude/Codex/shell, send keyboard input, view
245
- output, detach runtime control
246
- - start a new session by choosing only its kind; the browser form generates the
247
- next project-local alias, uses the selected Project root as the working
248
- directory, and runs the default command for that kind
249
-
250
- Browser-controlled sessions are local tmux terminals:
251
-
252
- - sessions started by the web form: tmux-backed
253
- - sessions started by `hcc peer start`: tmux-backed
254
- - direct `claude` / `codex` sessions started through shims: tmux-backed
255
- - existing tmux panes attached with `hcc peer attach`: tmux-backed
256
-
257
- Already-open raw terminals cannot be captured or controlled unconditionally
258
- unless they started under tmux, screen, or a hello-cc shim. They can still
259
- participate in tasks, messages, and locks through hooks and `hcc` commands.
260
-
261
- ## Common Commands
262
-
263
- ```text
264
- # Default entry
265
- hcc web [--host HOST] [--port N] [--token TEXT] [--local] [--no-discover] [--no-guidance]
266
- hcc down
267
-
268
- # Local coordination without Web
269
- hcc up [--no-discover] [--no-guidance]
270
-
271
- # Peers and status
272
- hcc peers
273
- hcc status [--peer ID]
274
- hcc scan [--register]
275
- hcc prompt --peer ID [--kind codex|claude|shell|other] [--role ROLE]
276
- hcc join --peer ID [--kind codex|claude|shell|other] [--role ROLE]
277
- hcc env --peer ID
278
- hcc heartbeat [--peer ID] [--renew-locks --ttl 900]
279
- hcc run --peer ID --kind codex|claude|shell --role ROLE -- COMMAND [ARGS...]
280
-
281
- # Browser-controllable terminals
282
- hcc peer list
283
- hcc peer start PEER [--kind K] [--role R] [--cwd DIR] [--restart-env] -- COMMAND [ARGS...]
284
- hcc peer start PEER --kind codex --resume SESSION_ID [--restart-env]
285
- hcc peer start PEER --kind codex --last
286
- hcc peer start PEER --kind claude --resume SESSION_ID [--restart-env]
287
- hcc peer start PEER --kind claude --continue
288
- hcc peer attach PEER [--pane PANE] [--kind K] [--role R] [--cwd DIR]
289
- hcc peer stop PEER
290
- hcc inject PEER TEXT [--no-enter]
291
-
292
- # Messages
293
- hcc msg send [--from ID] [--to ID|all] --body TEXT [--task N] [--kind note|task|handoff]
294
- hcc msg inbox [--peer ID] [--wait SEC] [--all] [--limit N]
295
- hcc msg ack [--peer ID] --id N
296
- hcc ask PEER MESSAGE [--from ID] [--task N] [--inject]
297
- hcc broadcast MESSAGE [--from ID] [--task N] [--inject]
298
-
299
- # Tasks
300
- hcc task create --title TEXT [--body TEXT] [--from ID] [--to ID] [--priority N]
301
- hcc task list [--status S] [--peer ID] [--all]
302
- hcc task claim [--peer ID] --id N
303
- hcc task next [--peer ID]
304
- hcc task update [--peer ID] --id N --status running|review|blocked|done|abandoned [--summary TEXT] [--body TEXT] [--to ID]
305
- hcc task done [--peer ID] --id N --summary TEXT
306
-
307
- # Locks and handoffs
308
- hcc lock acquire [--peer ID] --resource PATH [--task N] [--ttl SEC] [--reason TEXT]
309
- hcc lock renew [--peer ID] --resource PATH [--ttl SEC]
310
- hcc lock release [--peer ID] --resource PATH [--force]
311
- hcc lock list [--all]
312
- hcc handoff create [--from ID] --summary TEXT [--task N] [--to ID] [--changed-files JSON_OR_CSV] [--tests TEXT] [--risks TEXT]
313
- hcc handoff list [--task N] [--limit N]
314
- hcc event tail [--limit N]
315
- hcc gc [--older-than DAYS] [--yes]
316
- ```
317
-
318
- ## Stable Peer Identity
319
-
320
- hello-cc tries to keep peer IDs stable across resumed sessions:
321
-
322
- | Launch pattern | Peer ID |
323
- |---|---|
324
- | `claude --resume abc12345...` | `claude-abc12345` |
325
- | `claude --session-id abc12345...` | `claude-abc12345` |
326
- | `claude --continue` | terminal-derived ID first, then hooks record real session metadata |
327
- | `claude --fork-session --resume abc12345...` | terminal-derived ID first, then hooks record new session metadata |
328
- | `codex resume abc12345...` | `codex-abc12345` |
329
- | `codex resume --last` | terminal-derived ID first, then discovery records real session metadata |
330
- | plain shell | `shell-<terminal>` |
331
- | manual `HCC_PEER=xxx` | uses `xxx` |
332
-
333
- Known resume IDs keep the same peer ID after restart. Launch modes that do not
334
- expose the real provider session ID before startup use a terminal-derived ID
335
- first, then record provider metadata after hooks or discovery run.
336
-
337
- ## Typical Workflow
338
-
339
- Create a task:
340
-
341
- ```bash
342
- hcc task create --title "Refactor router diagnostics" \
343
- --body "Keep changes scoped." --priority 20
344
- ```
345
-
346
- Claim and lock:
103
+ ## Basic Workflow
347
104
 
348
105
  ```bash
106
+ hcc task create --title "Review router changes" --priority 20
349
107
  hcc task next
350
- hcc lock acquire --resource vllm/router --ttl 900 --reason "implement diagnostics"
108
+ hcc lock acquire --resource src/router --ttl 900 --reason "edit router"
109
+ hcc status
110
+ hcc handoff create --summary "Router change ready for review" --tests "npm test"
111
+ hcc task done --id 1 --summary "Done"
351
112
  ```
352
113
 
353
- Message or inject:
114
+ Ask an agent what is happening in the project:
354
115
 
355
- ```bash
356
- hcc msg send --to claude-a --body "Implementation is ready for review."
357
- hcc ask claude-a "Please review the current implementation." --inject
358
- hcc broadcast "Pause edits under vllm/router until this task finishes." --inject
116
+ ```text
117
+ What are the other hello-cc sessions doing?
359
118
  ```
360
119
 
361
- Finish with a handoff:
362
-
363
- ```bash
364
- hcc handoff create --to claude-a \
365
- --summary "Implemented router diagnostics changes." \
366
- --tests "pytest tests/router" \
367
- --risks "Full benchmark not run"
120
+ Attached Claude/Codex sessions should answer from live `hcc` state rather than
121
+ generic session-isolation assumptions.
368
122
 
369
- hcc task done --id 1 --summary "Done and handed off."
370
- hcc lock release --resource vllm/router
371
- ```
123
+ ## Documentation
372
124
 
373
- ## Stack
374
-
375
- ```text
376
- Node.js >= 24
377
- node:sqlite + SQLite WAL
378
- Node HTTP server
379
- ws WebSocket
380
- xterm.js
381
- tmux create/capture/send
382
- Claude Code hooks
383
- Codex hooks
384
- shell shim wrappers
385
- ```
386
-
387
- A2A and MCP are not required for the core. A2A is better suited to remote agent
388
- interoperability, and MCP can be added later as a tool layer. Local multi-CLI
389
- coordination uses hooks + SQLite + tmux.
125
+ - [Documentation Index](docs/README.md): all user and implementation docs.
126
+ - [User Guide](docs/guide.md): setup, Web console, workflows, coordination
127
+ semantics, and environment behavior.
128
+ - [Command Reference](docs/commands.md): compact public command list.
129
+ - [Changelog](CHANGELOG.md): release notes for published versions.
130
+ - [Design Notes](docs/design.md): product boundaries and coordination model.
131
+ - [Implementation Notes](docs/implementation.md): architecture and internal
132
+ protocol.
390
133
 
391
134
  ## Testing
392
135
 
@@ -394,64 +137,12 @@ coordination uses hooks + SQLite + tmux.
394
137
  npm test
395
138
  ```
396
139
 
397
- The regression creates a temporary project, temporary `HOME`, fake
398
- `claude`/`codex` binaries, a temporary runtime port, and temporary tmux
399
- sessions. It covers `hcc web` bootstrap, single-port multi-project
400
- registration, hooks/shims, SQLite coordination, tmux-backed `peer start`
401
- creation and restore, shim-launched tmux peers, tmux attach, WebSocket terminal
402
- streaming, terminal injection, runtime shutdown, package dry-run, and old-name
403
- scanning.
404
-
405
- ## Architecture
140
+ The regression suite uses temporary projects, fake Claude/Codex binaries,
141
+ temporary tmux sessions, and a temporary Web runtime to test the main flows.
406
142
 
407
- ```text
408
- hcc CLI
409
- ├── lib/discover.mjs Claude/Codex session discovery
410
- ├── lib/setup.mjs hooks, shims, PATH installation
411
- ├── bin/hcc.mjs CLI, SQLite, web runtime, tmux control
412
- └── .hello-cc/
413
- ├── mesh.db coordination state
414
- ├── HCC.md project guidance rules
415
- ├── runtime.json web runtime discovery file
416
- └── web.log web runtime log
417
- ```
143
+ ## License
418
144
 
419
- ## Environment Variables
420
-
421
- | Variable | Purpose |
422
- |---|---|
423
- | `HCC_PEER` | default peer identity |
424
- | `HCC_ROOT` | override project root |
425
- | `HCC_DB` | override database path |
426
- | `HCC_WEB_TOKEN` | optional token for web access |
427
- | `HCC_RUNTIME_URL` | direct runtime URL |
428
- | `HCC_NO_AUTO_INSTALL_TMUX=1` | disable tmux auto-install, mainly for tests |
429
-
430
- The `claude` / `codex` shims and `hcc peer start` create tmux-backed sessions
431
- from the environment of the **local terminal that launched them**, not from the
432
- older environment of the background web runtime. This lets you open a new
433
- terminal, export provider variables such as `ANTHROPIC_*` or
434
- `CLAUDE_CODE_*`, then run `claude` / `codex`.
435
-
436
- An already-running CLI process cannot have its environment changed in place by
437
- the operating system. The `claude` / `codex` shims call `hcc peer start` with
438
- `--restart-env`, so hello-cc records a launch environment fingerprint for the
439
- same resume/session peer. If you start that peer again from a new terminal and
440
- the environment changed, hello-cc automatically restarts the tmux session with
441
- the new environment when there are no attached tmux clients or Web clients. If
442
- the session is actively attached, hello-cc asks you to detach/close Web clients
443
- or run `hcc peer stop <peer>` before starting it again.
444
-
445
- When you call `hcc peer start` directly, add `--restart-env` if you want the
446
- same restart-on-environment-change behavior.
447
-
448
- The shims only manage interactive terminal sessions. Metadata and maintenance
449
- commands pass through to the real provider CLI, including `claude --help`,
450
- `claude --version`, `claude --print`, `claude --bare`, `claude --safe-mode`,
451
- `codex --help`, `codex --version`, and non-interactive Codex subcommands such as
452
- `codex exec`, `codex review`, `codex doctor`, and `codex mcp`. Interactive
453
- `claude`, `claude --resume ...`, `codex`, `codex resume ...`, and `codex fork
454
- ...` are tmux-backed and visible in the Web console.
145
+ [Apache-2.0](LICENSE)
455
146
 
456
147
  ---
457
148