hc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesehc
hc
You run in an hc terminal ( is your address). The person watches every hc
terminal in the Herdr app and can take any of them over. Full manual: ; read
it before anything not covered here.
$HC_TERMINAL_IDhc --skill你运行在一个 hc 终端中( 是你的地址)。用户可以在 Herdr app 中查看每个 hc 终端,并接管其中任意一个。完整手册:;执行本文未涵盖的操作前,请先阅读手册。
$HC_TERMINAL_IDhc --skillWhat goes where
工作类型与使用方式
| Work | Use |
|---|---|
| A sub-task inside your turn: research, a review pass | your own subagents, if your harness has them |
| Several agents, a pipeline or panel of them, or agents on another harness or machine | the |
| A server, build, test suite, CI watch, anything slow | |
| Another agent or model as a peer you or the person can steer | |
| A command or file on another machine | |
| Talking to another agent's session | |
Never , , , , or a foreground to wait: hc keeps the
process visible, outlives your turn, and returns the moment it's done.
&nohupsetsiddisownsleephc wait| 工作 | 使用方式 |
|---|---|
| 当前轮次内的子任务:调研、审查 | 如果你的 harness 支持子 Agent,则使用自己的子 Agent |
| 多个 Agent、Agent 流水线或面板,或运行在其他 harness 或机器上的 Agent | |
| 服务器、构建、测试套件、CI 监控以及所有耗时任务 | |
| 将另一个 Agent 或模型作为可由你或用户引导的同伴 | |
| 在另一台机器上执行命令或处理文件 | |
| 与另一个 Agent 的会话通信 | |
切勿使用 、、、,也不要使用前台 等待:hc 会让进程保持可见,即使当前轮次结束也能继续运行,并且 会在任务完成后立即返回。
&nohupsetsiddisownsleephc waitRecipes
使用示例
sh
undefinedsh
undefinedslow command: you stay free while it runs
slow command: you stay free while it runs
hc run --bg --rm --no-notify --name build cargo build --release
hc wait build # exit code; --rm removes it after
hc run --bg --rm --no-notify --name build cargo build --release
hc wait build # exit code; --rm removes it after
server: start, wait until ready, use it, stop it
server: start, wait until ready, use it, stop it
hc run --bg --name web --cwd app bun dev
hc wait web --output "ready" # matches output printed after the wait starts
hc read web --lines 50
hc kill web; hc rm web
hc run --bg --name web --cwd app bun dev
hc wait web --output "ready" # matches output printed after the wait starts
hc read web --lines 50
hc kill web; hc rm web
several at once
several at once
hc run --bg --name unit cargo test
hc run --bg --name lint cargo clippy --all-targets
hc wait --children any # next one to finish; repeat or use --children all
- `hc wait` times out after 180 s by default: that's a check-in, not a failure; wait again.
- `hc run` without `--bg` streams output and returns after 180 s with `[hc] still running
as tN`: wait on that address, don't start it twice.
- Clean up what you started (`hc kill`, `hc rm`). `hc ls` shows the person's other work
too: never touch terminals you didn't start.hc run --bg --name unit cargo test
hc run --bg --name lint cargo clippy --all-targets
hc wait --children any # next one to finish; repeat or use --children all
- `hc wait` 默认在 180 秒后超时:这只是一次阶段性检查,并不表示失败;请再次等待。
- 不带 `--bg` 的 `hc run` 会流式输出,并在 180 秒后返回 `[hc] still running as tN`:请等待该地址,不要重复启动任务。
- 清理你启动的内容(`hc kill`、`hc rm`)。`hc ls` 还会显示用户的其他任务:绝不要操作并非由你启动的终端。Gotchas
注意事项
- Never , and never restart the core: every terminal on it dies.
hc server stop - Starting when no core is running starts one with your shell's environment, and every later terminal inherits it. On the person's own machine, check
hcworks before running anything else.hc ls - From inside an hc terminal, children end when you end; add
hc runfor something that must keep running.--outlive-parent - wraps the text as a message, so
hc sendor any slash command arrives as chat. Type it as keys:/compact, thenhc keys <t> / c o m p a c t.hc keys <t> enter - Codex under hc needs .
--no-daemon
- 绝不要执行 ,也不要重启 core:其上的每个终端都会终止。
hc server stop - 没有 core 运行时启动 ,会使用你 shell 的环境启动一个 core,之后创建的所有终端都会继承该环境。在用户自己的机器上,先确认
hc可用,再运行其他命令。hc ls - 在 hc 终端内运行时,创建的子进程会随当前终端结束而终止;对于必须持续运行的任务,请添加
hc run。--outlive-parent - 会将文本包装成消息,因此
hc send或任何斜杠命令都会以聊天消息的形式到达。需要将其作为按键输入时,请使用/compact,然后执行hc keys <t> / c o m p a c t。hc keys <t> enter - 在 hc 下运行 Codex 时需要使用 。
--no-daemon