workspace health

workspace health 请求 Workflow Server 的 /health 接口。该命令不需要 token,适合在登录、上传或运行前确认 server 是否可达。

命令格式

pnpm -C workspace workspace health [--server <url>]

参数

参数说明
--server <url>可选。未传时按配置优先级解析 server URL。

server URL 优先级

顺序来源
1--server <url>
2WORKFLOW_SERVER_URL
3CLI 登录态文件
4http://localhost:7125

输出

情况输出
server 可达server /health 返回的 JSON。
server 返回非零 errCode输出 JSON,退出码为 1
网络或解析失败输出错误信息,退出码为 1

示例

pnpm -C workspace workspace health
pnpm -C workspace workspace health --server http://localhost:7125

常见用途

场景说明
发布前检查确认 server 已启动且 URL 正确。
排查登录失败区分 server 不可达和 token 无效。