Agent Hub
Hub 是本机(或 VM)上的多项目监督器:为每个仓库拉起 shepaw-acp-proxy,并提供 Web 仪表盘、Peer 扫码、可选 Channel 隧道路由。
Agent Hub
Hub is a multi-project supervisor on your machine or VM. It spawns shepaw-acp-proxy per repo, plus a web dashboard, Peer pairing, and an optional Channel tunnel router.
默认端口
Default ports
| 组件Component | 作用Role | 端口Port |
|---|---|---|
| Web 仪表盘Web dashboard | 实例、引擎、配对、ChannelInstances, engines, pairing, Channel | 4000 |
| Peer | shepaw://peer |
18793 |
| 隧道路由器Tunnel router | Channel 入站分发到本机 Agent / PeerFan-in Channel traffic to local agents / Peer | 18789 (本机)(loopback) |
| Agent 实例Agent instances | shepaw-acp-proxy | 8090+ |
配置目录:~/.config/shepaw-hub/(SHEPAW_HUB_HOME 可覆盖)。
日常命令
Everyday commands
shepaw-hub init shepaw-hub doctor shepaw-hub web # 仪表盘 + Peer(Channel 已配则拉起路由器) shepaw-hub instance add --engine claude-code --cwd ~/code/work-api --host 0.0.0.0 shepaw-hub start <id> shepaw-hub pair <id> --label "My iPhone" shepaw-hub logs <id> -f shepaw-hub update # npm 全局安装才支持自动升级
仪表盘鉴权
Dashboard auth
export SHEPAW_HUB_TOKEN="$(openssl rand -hex 24)" shepaw-hub web --host 0.0.0.0 --port 4000 --no-open
未设置 token 时,非 loopback 绑定会被拒绝。Token 存在浏览器 localStorage,不会出现在 URL 里。
Without a token, non-loopback binds are rejected. The token is stored in localStorage, never in the URL.
外网
Off-site
shepaw-hub gateway-set-channel \ --server https://channel.shepaw.com \ --channel-id ch_xxx \ --secret <hmac-secret> # shepaw-hub web 会在已配置 Channel 时自动 gateway-start shepaw-hub peer-pair # 二维码同时带 local= 与 channel=
高级 tunnel 三项必须同时填写或全部留空。详见 Channel。
The three advanced tunnel fields must all be set or all empty. See Channel.