Files
Obsidian/博客/OpenClaw安装教程.md
T
Serendipity 7d332d3b8c feat(halo): 添加图片自动上传功能
- 新增图片处理工具模块 `src/utils/image.ts`,包含图片引用提取、绝对路径解析和路径替换功能
- 新增图片上传服务 `src/service/image-uploader.ts`,支持调用 Halo 媒体 API 上传图片并实现缓存机制
- 在设置界面添加图片上传开关和上传路径配置项
- 更新发布流程,在提交到 Halo 前自动检测并上传本地图片,替换为远程 URL
- 添加英文、简体中文和繁体中文的国际化文案
- 更新插件版本至 1.1.1 并完善相关配置文件
2026-04-26 16:11:11 +08:00

118 lines
2.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenClaw Windows 安装教程
## 教学链接
[OpenClaw安装教程文字版 - 飞书云文档](https://ncnlkzxypt73.feishu.cn/wiki/Qch4wpBA6iNaSikkYSGcpfn7nRh?renamingWikiNode=false)
[视频版](https://www.bilibili.com/video/BV1UsP1zqEWc)
## 系统要求
- **Node.js 24**(推荐)或 Node.js 22.16+
- **Windows 10/11**(原生 Windows 或 WSL2 均支持)
- 建议使用 WSL2,体验更稳定
## 安装方法
### 方法一:官方安装脚本(推荐)
**PowerShell** 中运行:
```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```
如果不需要运行初始配置:
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
```
### 方法二:使用 npm
如果你已经安装了 Node.js
```bash
npm install -g openclaw@latest
openclaw onboard --install-daemon
```
### 方法三:使用 pnpm
```bash
pnpm add -g openclaw@latest
pnpm approve-builds -g
openclaw onboard --install-daemon
```
> ⚠️ pnpm 需要对带构建脚本的包进行明确授权,首次安装后记得运行 `pnpm approve-builds -g`
## 安装后验证
安装完成后,在终端中运行以下命令验证:
```bash
openclaw --version # 确认 CLI 可用
openclaw doctor # 检查配置问题
openclaw gateway status # 验证 Gateway 是否运行
```
## 常见问题
### "openclaw" 命令找不到
如果安装成功但终端找不到命令:
1. 检查 Node.js 是否安装:
```bash
node -v
```
2. 检查全局包安装路径:
```bash
npm prefix -g
```
3. 检查 PATH 环境变量是否包含全局 bin 目录
4. 如果没有,添加以下到 PowerShell 配置文件:
```powershell
$env:PATH = "$env:PATH;$(npm prefix -g)\bin"
```
### sharp 构建错误
如果 `sharp` 因全局安装的 libvips 失败:
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
```
## 启动使用
首次启动会进入配置向导:
```bash
openclaw onboard
```
按照屏幕提示完成:
1. 选择 AI 模型
2. 配置消息通道(QQ、微信、飞书等)
3. 设置管理员
## 卸载
如果需要卸载:
```bash
openclaw uninstall
```
或者手动删除:
- `%APPDATA%\openclaw` 目录
- 全局 npm 包:`npm uninstall -g openclaw`