hub-runner

中文文档
0.2.3发布于 2026/11/04Apache-2.0ES Module零依赖

Runs a hub workspace's Mac bots on this Mac under launchd, with no app needed.

原始使用文档

hub-runner

Runs a hub workspace's Mac bots on this Mac. It runs under launchd, so no app has to be open.

npm i -g hub-runner --min-release-age=0
hub-runner login
hub-runner start

login signs in with Vercel, asks which workspace this Mac runs bots for, and stores a session of the runner's own in ~/.hub/local/credentials.json. The Vercel token is revoked once the hub has the session.

CommandWhat it does
hub-runner start [--take-over]Starts the runner under launchd (~/Library/LaunchAgents/dev.hub.runner.plist). It starts again at every login and is not restarted after a crash: run start again. --take-over claims the Mac slot from another Mac.
hub-runner stopStops it.
hub-runner restartLets the open turns finish, then starts it again.
hub-runner statusThe runner's state, pid, version, bots, and whether launchd has it loaded. Exits 1 when it isn't running.
hub-runner logs [-f]The log, ~/.hub/local/runner.log.
hub-runner logoutStops it and deletes the stored session.

Update

npm i -g hub-runner@latest --min-release-age=0 && hub-runner restart

restart lets the turns open now finish, so no bot is cut off.

--min-release-age=0 lets the newest release install when your npm config holds packages back for a few days (min-release-age). It applies to this one install, and hub-runner has no dependencies, so nothing else skips the wait.

Notes

  • Node 24 or later, and pnpm on your PATH when you run start: the runner uses both to set the bots up.
  • The hub is https://hosted-hub.playground-vercel.tools; set HUB_URL when you run login for another one.
  • The HubHosted app only shows the runner's state. Quitting, signing out of or replacing the app doesn't touch the runner.
  • If the runner doesn't start, hub-runner status and hub-runner logs say why.

版本与发布记录

hub-runner 共发布 8 个版本,首次发布于 2026/10/29;过去 12 个月发布了 8 个版本。

版本发布日期距今
0.2.3latest2026/11/041 天前
0.2.22026/11/032 天前
0.2.12026/11/023 天前
0.2.02026/10/315 天前
0.1.22026/10/315 天前
0.1.12026/10/315 天前

关于 hub-runner 的常见问题

hub-runner 是什么?

Runs a hub workspace's Mac bots on this Mac under launchd, with no app needed.

如何安装 hub-runner?

在项目目录运行 npm install hub-runner,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 hub-runner,可以用 npx hub-runner 直接运行。

hub-runner 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/hub-runner 是否存在。

hub-runner 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

hub-runner 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

hub-runner 可以商用吗?

hub-runner 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

hub-runner 还在维护吗?

最新版本 0.2.3 发布于 2026/11/04(1 天前);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2026/10/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。