推荐替代

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

安装

推荐使用安装脚本,它会安装 CLI 并自动运行向导。

快速安装(推荐)

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

Windows(PowerShell):

iwr -useb https://clawd.bot/install.ps1 | iex

如果跳过向导,请运行:

clawdbot onboard --install-daemon

系统要求

  • Node >= 22
  • macOS / Linux / Windows(WSL2)
  • 仅从源码构建时需要 pnpm

选择安装路径

推荐优先使用安装脚本;也支持全局安装或从源码构建。

1)安装脚本(推荐)

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

查看脚本参数:

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

非交互(跳过向导):

curl -fsSL https://clawd.bot/install.sh | bash -s -- --no-onboard

2)全局安装(手动)

npm install -g clawdbot@latest

sharp 安装失败(libvips 冲突):

SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g clawdbot@latest

或使用 pnpm:

pnpm add -g clawdbot@latest

安装后运行向导:

clawdbot onboard --install-daemon

3)从源码安装(开发者)

git clone https://github.com/clawdbot/clawdbot.git
cd clawdbot
pnpm install
pnpm ui:build
pnpm build
clawdbot onboard --install-daemon
如果未全局安装,可用 pnpm clawdbot ...

4)其他安装方式

安装完成后

  • clawdbot onboard --install-daemon
  • clawdbot doctor
  • clawdbot status + clawdbot health
  • clawdbot dashboard

安装方式:npm vs git

  • npm(默认):npm install -g clawdbot@latest
  • git:从 GitHub clone + build

CLI 参数

curl -fsSL https://clawd.bot/install.sh | bash -s -- --install-method npm
curl -fsSL https://clawd.bot/install.sh | bash -s -- --install-method git
  • --install-method npm|git
  • --git-dir <path>(默认 ~/clawdbot
  • --no-git-update
  • --no-prompt(CI)
  • --dry-run
  • --no-onboard

环境变量

  • CLAWDBOT_INSTALL_METHOD=git|npm
  • CLAWDBOT_GIT_DIR=...
  • CLAWDBOT_GIT_UPDATE=0|1
  • CLAWDBOT_NO_PROMPT=1
  • CLAWDBOT_DRY_RUN=1
  • CLAWDBOT_NO_ONBOARD=1
  • SHARP_IGNORE_GLOBAL_LIBVIPS=0|1

排错:找不到 clawdbot(PATH)

node -v
npm -v
npm prefix -g
echo "$PATH"

确保 $(npm prefix -g)/bin 出现在 PATH。

更新与卸载

中文交流群

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

OpenClaw 中文交流群二维码