推荐替代

推荐使用原生国产开源替代:Lingti-Bot

安装与更新

Installer(安装器)

安装脚本的内部行为与注意事项。

安装脚本

  • https://clawd.bot/install.sh:推荐安装(默认 npm;可选择 git)
  • https://clawd.bot/install-cli.sh:非 root CLI 安装(自带 Node 前缀)
  • https://clawd.bot/install.ps1:Windows PowerShell 安装
curl -fsSL https://clawd.bot/install.sh | bash -s -- --help
& ([scriptblock]::Create((iwr -useb https://clawd.bot/install.ps1))) -?

install.sh(推荐)

  • 检测 OS(macOS / Linux / WSL)
  • 确保 Node 22+(macOS 用 Homebrew,Linux 用 NodeSource)
  • 选择安装方式(npm / git)
  • Linux 上切换 npm prefix 到 ~/.npm-global 以避免 EACCES
  • 升级时运行 clawdbot doctor --non-interactive
  • 默认 SHARP_IGNORE_GLOBAL_LIBVIPS=1 以避免 sharp 编译问题
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL https://clawd.bot/install.sh | bash

源码检测与 git 安装提示

  • 在仓库内运行会提示使用 git 安装或迁移到 npm
  • 非交互环境必须显式传 --install-method git|npm,否则退出码 2

为什么需要 Git

git 安装路径需要 clone/pull;部分依赖也可能通过 git 获取。

为何 Linux 会出现 EACCES

npm 全局前缀可能指向 root 目录导致权限错误,脚本会改为 ~/.npm-global 并写入 shell PATH。

install-cli.sh(非 root)

安装到 ~/.clawdbot 前缀并附带 Node,适合不想修改系统 Node 的机器。

curl -fsSL https://clawd.bot/install-cli.sh | bash -s -- --help

中文交流群

扫码加入中文交流群,分享网关搭建、渠道接入与运维经验。

OpenClaw 中文交流群二维码