# OpenClaw 一键安装脚本(macOS / Windows) 这个仓库提供一组简化脚本,用于快速安装并初始化 OpenClaw。 - `install-macos.sh`:macOS 一键安装 - `install-windows.ps1`:Windows 中文版一键安装 - `install-windows-en.ps1`:Windows 英文版一键安装 - `configure-aws-bedrock.sh/.ps1`:可选的 AWS Bedrock 配置脚本 - `uninstall-macos.sh` / `uninstall-windows.ps1`:卸载脚本 --- ## 与官方仓库对齐说明 本仓库已按 `openclaw/openclaw` 最新安装建议做了对齐: 1. 安装后统一进入 `openclaw onboard` 2. 向导阶段启用 `--install-daemon`,安装网关后台服务 3. 安装步骤改为“安装/更新”模式,避免机器上已有旧版本时不升级 4. 删除了与安装无关的营销内容,保留纯技术流程 官方参考: - GitHub: https://github.com/openclaw/openclaw - Docs: https://docs.openclaw.ai/start/getting-started --- ## 快速安装 ### macOS ```bash curl -fsSL https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/install-macos.sh | bash ``` ### Windows(PowerShell) ```powershell iwr -useb https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/install-windows.ps1 | iex ``` > 官方文档对 Windows 的推荐路径是 **WSL2**。如果你准备长期稳定使用,建议参考: > https://docs.openclaw.ai/platforms/windows --- ## 安装脚本做了什么 | 步骤 | macOS | Windows | |------|-------|---------| | 1 | 检查/安装 Node.js 22+(Homebrew) | 检查/安装 Node.js 22+(winget/choco) | | 2 | 安装或更新 OpenClaw | 安装或更新 OpenClaw | | 3 | 运行 onboarding 向导 | 运行 onboarding 向导 | | 4 | 安装 Gateway 后台服务 | 安装 Gateway 后台服务 | 向导命令(脚本内部): ```bash openclaw onboard --accept-risk --flow quickstart --install-daemon --node-manager npm --skip-skills ``` --- ## 安装完成后 ```bash openclaw gateway status openclaw dashboard ``` 如果服务未启动,可执行: ```bash openclaw gateway start ``` --- ## 可选:配置 AWS Bedrock ### macOS / Linux ```bash curl -fsSL https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/configure-aws-bedrock.sh | bash ``` ### Windows ```powershell iwr -useb https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/configure-aws-bedrock.ps1 | iex ``` 脚本会提示输入: - AWS Access Key ID - AWS Secret Access Key - Region(默认 `us-east-1`) --- ## 卸载 ### macOS ```bash curl -fsSL https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/uninstall-macos.sh | bash ``` ### Windows ```powershell iwr -useb https://raw.githubusercontent.com/736773174/openclaw-setup-cn/main/uninstall-windows.ps1 | iex ``` --- ## 常见问题 ### 1) `openclaw: command not found` 重新打开终端后再试,或手动加载 PATH。 ### 2) Node 版本过低 确保 Node.js 主版本为 22 或更高: ```bash node -v ``` ### 3) 网关异常 执行: ```bash openclaw doctor openclaw gateway status ``` --- ## 许可证 MIT