- 安装 nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
重新打开终端,确认:
nvm --version - 使用 nvm 安装 Node.js(≥ 22)
nvm install 22
nvm use 22
nvm alias default 22
验证:
node -v
v22.x.x
二、安装 Clawdbot CLI + Gateway
官方安装脚本(推荐)
curl -fsSL https://clawd.bot/install.sh | bash
验证:
clawdbot --version
三、启动并验证 Gateway
- 手动启动(验证用)
clawdbot gateway --verbose
另开一个终端:
clawdbot status
应看到:
Gateway │ local · ws://127.0.0.1:18789 · reachable
成功后,回到原终端按 Ctrl + C 停止。
###############
DS配置
vi ~/.zshrc
export DEEPSEEK_API_KEY="sk-b01e460d76724d13affabff830edb856"
或创建 .env 文件
echo "DEEPSEEK_API_KEY=sk-b01e460d76724d13affabff830edb856" >> ~/.clawdbot/.env
source ~/.zshrc
###############
卸载 daemon
ls ~/Library/LaunchAgents | grep -i claw
launchctl unload -w ~/Library/LaunchAgents/
rm ~/Library/LaunchAgents/
卸载 CLI
npm uninstall -g clawdbot
删除配置
rm -rf ~/.clawdbot
cd ~