# 🚀 OpenClaw Windows 安装教程｜保姆级图文指南

> 适合零基础小白，手把手教你安装 OpenClaw！

---

## 📌 什么是 OpenClaw？

OpenClaw 是一款**AI Agent 运行平台**，让你的 AI 助手真正帮你做事：
- ✅ 写代码、改 Bug
- ✅ 生成文档、PPT、网页
- ✅ 数据分析、可视化
- ✅ 自动化工作流
- ✅ 多渠道沟通（飞书、微信、Discord等）

**简单说：不是聊天机器人，是真正的工作伙伴！**

---

## 📋 安装前准备

### 1️⃣ 系统要求
- Windows 10/11（64位）
- 至少 4GB 内存
- 网络连接

### 2️⃣ 必备软件

| 软件 | 版本要求 | 下载地址 |
|------|---------|---------|
| Node.js | ≥ 22.0.0 | https://nodejs.org |
| npm | 随 Node.js 安装 | - |
| Git | 最新版 | https://git-scm.com |

---

## 🔧 详细安装步骤

### 步骤1：安装 Node.js（5分钟）

**[图1：Node.js 官网下载页面]**
- 访问：https://nodejs.org
- 选择 **LTS 版本**（长期支持版）
- 点击下载，双击安装
- **全部默认下一步**即可

**验证安装**：
```powershell
# 打开 PowerShell，输入：
node --version

# 输出示例：v22.12.0
npm --version

# 输出示例：10.9.0
```

---

### 步骤2：安装 Git（3分钟）

**[图2：Git 下载页面]**
- 访问：https://git-scm.com/download/win
- 点击下载，双击安装
- **全部默认下一步**即可

**验证安装**：
```powershell
git --version
# 输出示例：git version 2.43.0
```

---

### 步骤3：配置 Git（重要！）

**⚠️ 这一步很关键，避免安装失败！**

```powershell
# 配置 Git 使用 HTTPS（解决 SSH 权限问题）
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
git config --global url."https://github.com/".insteadOf git@github.com:

# 配置 GitHub 镜像加速（解决网络问题）
git config --global url."https://ghproxy.com/https://github.com/".insteadOf https://github.com/
```

---

### 步骤4：安装 OpenClaw（3分钟）

**[图3：PowerShell 安装界面]**

```powershell
# 清理缓存
npm cache clean --force

# 安装 OpenClaw
npm install -g openclaw@latest

# 等待安装完成...
```

**验证安装**：
```powershell
openclaw --version
# 输出示例：2026.2.25
```

---

### 步骤5：初始化配置（2分钟）

**[图4：OpenClaw 配置界面]**

```powershell
# 运行配置向导
openclaw onboard

# 按提示操作：
# 1. 选择 AI 模型提供商
# 2. 输入 API Key
# 3. 选择默认模型
# 4. 配置完成！
```

---

### 步骤6：启动服务（1分钟）

```powershell
# 启动 Gateway 服务
openclaw gateway

# 看到 "Gateway running" 就成功了！
```

**[图5：浏览器打开控制台]**

```powershell
# 打开控制台
# 浏览器访问：http://localhost:18789
```

---

## 🎉 安装完成！

### 快速测试

```powershell
# 发送消息测试
openclaw agent --message "你好"

# 或者直接在浏览器控制台对话
```

---

## ❓ 常见问题

### Q1：安装失败，提示 Git 错误？
**A：** 执行步骤3的 Git 配置命令，然后重试。

### Q2：安装很慢/卡住？
**A：** 
- 方法1：使用 VPN/代理
- 方法2：配置淘宝镜像
```powershell
npm config set registry https://registry.npmmirror.com
```

### Q3：提示权限不足？
**A：** 以管理员身份运行 PowerShell

### Q4：找不到命令？
**A：** 
- 重启 PowerShell
- 检查 npm 全局路径是否在 PATH 中

---

## 🔗 官方资源

- 📖 官方文档：https://docs.openclaw.ai
- 🐙 GitHub：https://github.com/openclaw/openclaw
- 💬 Discord：https://discord.gg/clawd
- 🛒 Skills 市场：https://clawhub.com

---

## 💡 使用技巧

1. **定时任务**：每天自动提醒、检查工作
2. **多渠道**：配置飞书、微信，随时随地使用
3. **记忆系统**：AI 记住你的偏好和习惯
4. **Skills 扩展**：安装更多技能包

---

## 📸 配图说明

**封面图**：
- 大标题：OpenClaw Windows 安装教程
- 副标题：保姆级图文指南
- 配图：OpenClaw Logo + Windows Logo

**步骤图**：
- 每个步骤配一张截图
- 关键位置用红框标注
- 添加步骤编号

**完成图**：
- 显示成功界面
- 添加"安装成功"标签

---

#OpenClaw #AI助手 #Windows教程 #效率工具 #程序员必备 #Nodejs #开发工具 #人工智能

---

_作者：二蛋 | 发布时间：2026年3月11日_