Files
bot/docs/zh-CN/install/uninstall.md
zooqueenandHanzo Dev cbacae5efd chore: complete Hanzo Bot rebranding — purge all bot.molt legacy names
Replace all bot.molt.* identifiers with ai.hanzo.bot.* across:
- LaunchAgent labels (constants.ts + tests)
- iOS bundle IDs, dispatch queues, logger subsystems
- iOS fastlane Appfile (bot.molt.ios → ai.hanzo.bot.ios)
- iOS project.yml branding (display name → Hanzo Bot)
- macOS icon file rename (Bot.icns → HanzoBot.icns)
- appcast.xml title (Bot → Hanzo Bot)
- auto-response workflow (moltbook → off-topic)
- All English and Chinese documentation (32 doc files)
- scripts/restart-mac.sh launchd plist reference

Co-authored-by: Hanzo Dev <[email protected]>
2026-02-22 16:21:56 -08:00

3.6 KiB
Raw Permalink Blame History

read_when, summary, title, x-i18n
read_when summary title x-i18n
你想从机器上移除 Hanzo Bot
卸载后 Gateway 网关服务仍在运行
完全卸载 Hanzo Bot(CLI、服务、状态、工作区) 卸载
generated_at model provider source_hash source_path workflow
2026-02-03T07:50:10Z claude-opus-4-5 pi 6673a755c5e1f90a807dd8ac92a774cff6d1bc97d125c75e8bf72a40e952a777 install/uninstall.md 15

卸载

两种方式:

  • 如果 bot 仍已安装,使用简单方式。
  • 如果 CLI 已删除但服务仍在运行,使用手动服务移除。

简单方式(CLI 仍已安装)

推荐:使用内置卸载程序:

hanzo-bot uninstall

非交互式(自动化 / npx):

hanzo-bot uninstall --all --yes --non-interactive
npx -y hanzo-bot uninstall --all --yes --non-interactive

手动步骤(效果相同):

  1. 停止 Gateway 网关服务:
hanzo-bot gateway stop
  1. 卸载 Gateway 网关服务(launchd/systemd/schtasks):
hanzo-bot gateway uninstall
  1. 删除状态 + 配置:
rm -rf "${BOT_STATE_DIR:-$HOME/.bot}"

如果你将 BOT_CONFIG_PATH 设置为状态目录外的自定义位置,也请删除该文件。

  1. 删除你的工作区(可选,移除智能体文件):
rm -rf ~/.hanzo/bot/workspace
  1. 移除 CLI 安装(选择你使用的那个):
npm rm -g bot
pnpm remove -g bot
bun remove -g bot
  1. 如果你安装了 macOS 应用:
rm -rf /Applications/Hanzo Bot.app

注意事项:

  • 如果你使用了配置文件(--profile / BOT_PROFILE),对每个状态目录重复步骤 3(默认为 ~/.hanzo/bot-<profile>)。
  • 在远程模式下,状态目录位于 Gateway 网关主机上,因此也需要在那里运行步骤 1-4。

手动服务移除(CLI 未安装)

如果 Gateway 网关服务持续运行但 bot 缺失,请使用此方法。

macOS(launchd)

默认标签是 ai.hanzo.bot.gateway(或 ai.hanzo.bot.<profile>;旧版 com.bot.* 可能仍然存在):

launchctl bootout gui/$UID/ai.hanzo.bot.gateway
rm -f ~/Library/LaunchAgents/ai.hanzo.bot.gateway.plist

如果你使用了配置文件,请将标签和 plist 名称替换为 ai.hanzo.bot.<profile>。如果存在任何旧版 com.bot.* plist,请将其移除。

Linux(systemd 用户单元)

默认单元名称是 bot-gateway.service(或 bot-gateway-<profile>.service):

systemctl --user disable --now bot-gateway.service
rm -f ~/.config/systemd/user/bot-gateway.service
systemctl --user daemon-reload

Windows(计划任务)

默认任务名称是 Hanzo Bot Gateway(或 Hanzo Bot Gateway (<profile>))。 任务脚本位于你的状态目录下。

schtasks /Delete /F /TN "Hanzo Bot Gateway"
Remove-Item -Force "$env:USERPROFILE\.bot\gateway.cmd"

如果你使用了配置文件,请删除匹配的任务名称和 ~\.bot-<profile>\gateway.cmd。

普通安装 vs 源码检出

普通安装(install.sh / npm / pnpm / bun)

如果你使用了 https://hanzo.bot/install.sh 或 install.ps1,CLI 是通过 npm install -g bot@latest 安装的。 使用 npm rm -g bot 移除(或 pnpm remove -g / bun remove -g,如果你是用那种方式安装的)。

源码检出(git clone)

如果你从仓库检出运行(git clone + hanzo-bot ... / bun run hanzo-bot ...):

  1. 在删除仓库之前卸载 Gateway 网关服务(使用上面的简单方式或手动服务移除)。
  2. 删除仓库目录。
  3. 按上述方式移除状态 + 工作区。