Agent Hub

Hub 是本机(或 VM)上的多项目监督器:为每个仓库拉起 shepaw-acp-proxy,并提供 Web 仪表盘、Peer 扫码、可选 Channel 隧道路由。

默认端口

组件 作用 端口
Web 仪表盘 实例、引擎、配对、Channel 4000
Peer shepaw://peer 18793
隧道路由器 Channel 入站分发到本机 Agent / Peer 18789 (本机)
Agent 实例 shepaw-acp-proxy 8090+

配置目录:~/.config/shepaw-hub/SHEPAW_HUB_HOME 可覆盖)。

日常命令

shepaw-hub
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 全局安装才支持自动升级

仪表盘鉴权

token
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 里。

外网

channel
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