安装
除非有特殊原因,否则请使用安装器。它会设置 CLI 并运行新手引导。
⚡ 快速安装(推荐)
curl -fsSL https://openclaw.ai/install.sh | bash
系统要求
Node.js
版本 ≥ 22
操作系统
macOS、Linux 或 Windows(WSL2)
pnpm
仅从源代码构建时需要
安装器脚本(推荐)
通过 npm 全局安装 openclaw 并运行新手引导。
shell
curl -fsSL https://openclaw.ai/install.sh | bashWindows(PowerShell):
powershell
iwr -useb https://openclaw.ai/install.ps1 | iex下一步(如果你跳过了新手引导):
shell
openclaw onboard --install-daemon安装器标志:
shell
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --help非交互式(跳过新手引导):
shell
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard安装后
运行新手引导
openclaw onboard --install-daemon快速检查
openclaw doctor检查 Gateway 网关健康状态
openclaw status打开仪表板
openclaw dashboard故障排除:找不到 openclaw(PATH)
快速诊断:
shell
node -v
npm -v
npm prefix -g
echo "$PATH"如果
$(npm prefix -g)/bin(macOS/Linux)不在 echo "$PATH" 的输出中,你的 shell 无法找到全局 npm 二进制文件(包括 openclaw)。修复:将其添加到你的 shell 启动文件(zsh:~/.zshrc,bash:~/.bashrc):
shell
# macOS / Linux
export PATH="$(npm prefix -g)/bin:$PATH"在 Windows 上,将 npm prefix -g 的输出添加到你的 PATH。然后打开新终端(或在 zsh 中执行 rehash / 在 bash 中执行 hash -r)。