# 安装环境
nvm install 22
nvm use 22
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
# 下载代码
git clone https://github.com/openclaw/openclaw.git
# 开启代理
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
cd openclaw
pnpm install
pnpm ui:build
pnpm build
unset http_proxy https_proxy all_proxy
# 安装
pnpm install
pnpm ui:build
pnpm build
# 交互式配置(随便配置下,执行完了可以直接去改openclaw.json)
pnpm openclaw onboard --install-daemon
# 全部配完
pnpm openclaw gateway restart
# 升级
git fetch origin
git merge origin/main
再执行安装步骤+交互式配置
pnpm openclaw --version
# 卸载
openclaw uninstall --all --yes
pnpm uninstall openclaw # 不对就加个-g
pnpm uninstall clawhub # 不对就加个-g