Files
zeekayandHanzo Dev 84e4069c2c docs name the state dir and config file the bot reads: ~/.bot/bot.json
The docs said ~/.hanzo-bot/hanzo-bot.json (and ~/.hanzo-bot-<profile>, hanzo-bot.plugin.json), which nothing reads: src/config/paths.ts resolves ~/.bot, bot.json and ~/.bot-<profile>, and plugins ship bot.plugin.json. Every such path in docs/ now names what the code opens.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-24 21:12:09 -07:00

1.9 KiB

read_when, summary, title, x-i18n
read_when summary title x-i18n
你希望以最快的方式从安装到运行一个可用的 Gateway 网关
安装 HanzoBot,完成 Gateway 网关新手引导,并配对你的第一个渠道。 快速开始
generated_at model provider source_hash source_path workflow
2026-02-04T17:53:21Z claude-opus-4-5 pi 3c5da65996f89913cd115279ae21dcab794eadd14595951b676d8f7864fbbe2d start/quickstart.md 15
HanzoBot 需要 Node 22 或更新版本。

安装

```bash npm install -g hanzo-bot@latest ``` ```bash pnpm add -g hanzo-bot@latest ```

新手引导并运行 Gateway 网关

```bash hanzo-bot onboard --install-daemon ``` ```bash hanzo-bot channels login ``` ```bash hanzo-bot gateway --port 18789 ```

完成新手引导后,Gateway 网关将通过用户服务运行。你也可以使用 hanzo-bot gateway 手动启动。

之后在 npm 安装和 git 安装之间切换非常简单。安装另一种方式后,运行 `hanzo-bot doctor` 即可更新 Gateway 网关服务入口点。

从源码安装(开发)

git clone https://github.com/hanzo-bot/hanzo-bot.git
cd hanzo-bot
pnpm install
pnpm ui:build # 首次运行时会自动安装 UI 依赖
pnpm build
hanzo-bot onboard --install-daemon

如果你还没有全局安装,可以在仓库目录中通过 pnpm hanzo-bot ... 运行新手引导。

多实例快速开始(可选)

BOT_CONFIG_PATH=~/.bot/a.json \
BOT_STATE_DIR=~/.bot-a \
hanzo-bot gateway --port 19001

发送测试消息

需要一个正在运行的 Gateway 网关。

hanzo-bot message send --target +15555550123 --message "Hello from HanzoBot"