feat: add USB builder tool and install-to-computer scripts
- build-usb.sh: one-click USB drive builder (downloads Node.js + OpenClaw from China mirrors, packages into USB-ready directory) - Mac-Install.command: install from USB to Mac (~/.uclaw/), offline-first with China mirror fallback - Windows-Install.bat: same for Windows - README.md rewritten to position project as "USB drive builder toolkit"
This commit is contained in:
224
README.md
224
README.md
@@ -1,10 +1,52 @@
|
||||
# 🦞 U-Claw
|
||||
|
||||
**把 AI 助手简化到"双击运行" — Portable AI Agent, double-click to run**
|
||||
**AI 助手 U 盘制作工具 — 克隆代码,一键制作,双击就能用**
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
U-Claw 把 [OpenClaw](https://github.com/openclaw/openclaw) 打包成开箱即用的形态。Node.js + OpenClaw + 全部依赖 + QQ 插件,不需要翻墙,不需要命令行基础。
|
||||
U-Claw 是一个开源工具集,帮你把 [OpenClaw](https://github.com/openclaw/openclaw) AI 助手打包成 U 盘。插上 U 盘双击运行,或从 U 盘安装到电脑。全部依赖从国内镜像下载,不需要翻墙。
|
||||
|
||||
---
|
||||
|
||||
## 这个项目能做什么
|
||||
|
||||
| # | 功能 | 说明 |
|
||||
|---|------|------|
|
||||
| 1 | **制作 U 盘** | `build-usb.sh` 一键下载所有资源,打包成可拷贝到 U 盘的完整目录 |
|
||||
| 2 | **免安装运行** | U 盘插上电脑,双击 `Mac-Start.command` 或 `Windows-Start.bat` 直接用 |
|
||||
| 3 | **从 U 盘安装** | 双击 `Mac-Install.command` 或 `Windows-Install.bat`,离线安装到电脑 |
|
||||
| 4 | **桌面 App** | Electron 桌面版,打包成 DMG/EXE 分发 |
|
||||
| 5 | **文档 + 官网** | 使用指南、国内镜像说明、AI 模型配置教程 |
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 制作一个 U 盘(最常用)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dongsheng123132/u-claw.git
|
||||
cd u-claw/portable
|
||||
|
||||
# 一键制作 U 盘(自动下载 Node.js + OpenClaw + QQ 插件,全部国内镜像)
|
||||
bash build-usb.sh
|
||||
|
||||
# 完成后把 usb-build/U-Claw/ 文件夹拷贝到 U 盘
|
||||
```
|
||||
|
||||
`build-usb.sh` 自动完成:
|
||||
1. 选择目标平台(Mac / Windows / 全部)
|
||||
2. 从国内镜像下载 Node.js v22
|
||||
3. 安装 OpenClaw + QQ 插件
|
||||
4. 打包成可直接拷贝的目录
|
||||
5. 可选打包成 tar.gz
|
||||
|
||||
### 在自己电脑上搭建(开发/测试)
|
||||
|
||||
```bash
|
||||
cd u-claw/portable
|
||||
bash setup.sh # 搭建运行环境
|
||||
bash Mac-Start.command # Mac 启动
|
||||
# 或 Windows-Start.bat # Windows 启动
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -12,79 +54,91 @@ U-Claw 把 [OpenClaw](https://github.com/openclaw/openclaw) 打包成开箱即
|
||||
|
||||
```
|
||||
U-Claw/
|
||||
├── portable/ ← 🔥 U盘便携版(核心)
|
||||
│ ├── Mac-Start.command Mac 启动脚本
|
||||
│ ├── Windows-Start.bat Windows 启动脚本
|
||||
│ ├── Mac-Menu.command Mac 菜单(8 个功能)
|
||||
│ ├── Windows-Menu.bat Windows 菜单
|
||||
│ ├── Config.html 首次配置页面
|
||||
│ ├── U-Claw.html 导航首页
|
||||
│ ├── SkillHub.html 技能市场
|
||||
│ ├── default-config.json 默认配置模板
|
||||
│ └── migrate.js 配置迁移工具
|
||||
├── portable/ ← 🔥 U 盘核心
|
||||
│ ├── build-usb.sh ⭐ 一键制作 U 盘
|
||||
│ ├── setup.sh 开发者搭建脚本
|
||||
│ ├── Mac-Start.command Mac 免安装启动
|
||||
│ ├── Mac-Menu.command Mac 功能菜单(8 项)
|
||||
│ ├── Mac-Install.command Mac 从 U 盘安装到电脑
|
||||
│ ├── Windows-Start.bat Windows 免安装启动
|
||||
│ ├── Windows-Menu.bat Windows 功能菜单
|
||||
│ ├── Windows-Install.bat Windows 从 U 盘安装到电脑
|
||||
│ ├── Config.html 首次配置页面
|
||||
│ ├── U-Claw.html 导航首页
|
||||
│ └── migrate.js 配置迁移工具
|
||||
│
|
||||
├── u-claw-app/ ← 🖥 桌面安装版(Electron)
|
||||
│ ├── src/main.js 主进程(11K 行)
|
||||
│ ├── package.json 依赖 & 构建配置
|
||||
│ ├── assets/ 图标资源
|
||||
│ ├── resources/ Config.html + Node.js 运行时
|
||||
│ └── scripts/ 构建脚本
|
||||
│
|
||||
├── usb-scripts/ ← 💾 U盘安装脚本
|
||||
│ ├── Mac-Install.command Mac: 解压 + 启动
|
||||
│ └── Windows-Install.bat Windows: 解压 + 启动
|
||||
│ ├── setup.sh / setup.bat 一键搭建开发环境
|
||||
│ ├── src/main.js Electron 主进程
|
||||
│ └── package.json 依赖 & 构建配置
|
||||
│
|
||||
├── website/ ← 🌐 官网 + 教程(u-claw.org)
|
||||
│ ├── index.html 官网首页
|
||||
│ ├── guide.html 帮助指南
|
||||
│ ├── skills.html 技能市场页
|
||||
│ └── 教程-OpenClaw中国区完全指南.md
|
||||
│ ├── guide.html 使用指南(含国内镜像、搭建教程)
|
||||
│ ├── index.html 官网首页
|
||||
│ └── skills.html 技能市场页
|
||||
│
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## 两个产品线
|
||||
|
||||
### 1. U盘便携版 (`portable/`)
|
||||
|
||||
**用户体验:** 插 U 盘 → 双击启动 → 浏览器打开配置页 → 开始用
|
||||
### U 盘上的文件(制作完成后)
|
||||
|
||||
```
|
||||
portable/
|
||||
├── app/ ← 运行时(不进 git,~2.3GB)
|
||||
│ ├── core/ OpenClaw + 依赖 + QQ 插件
|
||||
U-Claw/ ← 拷贝到 U 盘
|
||||
├── Mac-Start.command 双击 = Mac 免安装运行
|
||||
├── Mac-Install.command 双击 = 安装到 Mac
|
||||
├── Windows-Start.bat 双击 = Windows 免安装运行
|
||||
├── Windows-Install.bat 双击 = 安装到 Windows
|
||||
├── Mac-Menu.command Mac 功能菜单
|
||||
├── Windows-Menu.bat Windows 功能菜单
|
||||
├── Config.html 配置页面
|
||||
├── app/ 运行时(~2.3GB)
|
||||
│ ├── core/ OpenClaw + QQ 插件
|
||||
│ └── runtime/
|
||||
│ ├── node-mac-arm64/ Mac Apple Silicon
|
||||
│ └── node-win-x64/ Windows 64-bit
|
||||
├── data/ ← 用户数据(不进 git)
|
||||
│ ├── .openclaw/ 配置文件
|
||||
│ ├── memory/ AI 记忆
|
||||
│ └── backups/ 备份
|
||||
└── [脚本和HTML] ← 这些进 git
|
||||
│ ├── node-mac-arm64/ Mac Apple Silicon
|
||||
│ └── node-win-x64/ Windows 64-bit
|
||||
└── data/ 用户数据
|
||||
├── .openclaw/ 配置文件
|
||||
├── memory/ AI 记忆
|
||||
└── backups/ 备份
|
||||
```
|
||||
|
||||
**分发方式:** 把整个 `portable/` + `app/` 打包成 `U-Claw.tar.gz`(约 743MB),用 `usb-scripts/` 的脚本解压启动。
|
||||
## U 盘上的两种用法
|
||||
|
||||
**状态:** ✅ Mac Apple Silicon 可用 · 🚧 Windows 开发中 · ❌ Mac Intel / Linux 暂不支持
|
||||
### 免安装运行(推荐)
|
||||
|
||||
### 2. 桌面安装版 (`u-claw-app/`)
|
||||
直接从 U 盘运行,不修改电脑任何文件。换电脑插上 U 盘,配置还在。
|
||||
|
||||
**用户体验:** 下载 DMG/EXE → 安装 → 打开 App → 自动配置
|
||||
- Mac: 双击 `Mac-Start.command`
|
||||
- Windows: 双击 `Windows-Start.bat`
|
||||
|
||||
**适合:** 临时电脑、公司电脑、网吧、不想装东西
|
||||
|
||||
### 安装到电脑
|
||||
|
||||
从 U 盘安装到 `~/.uclaw/`,之后不需要 U 盘也能用。
|
||||
|
||||
- Mac: 双击 `Mac-Install.command`
|
||||
- Windows: 双击 `Windows-Install.bat`
|
||||
|
||||
安装逻辑:
|
||||
1. 检查环境 → 缺什么先从 U 盘离线安装
|
||||
2. U 盘没有的 → 从国内镜像在线下载
|
||||
3. 创建启动脚本 → 以后双击 `~/.uclaw/start.command` 启动
|
||||
|
||||
## 桌面版(Electron App)
|
||||
|
||||
```bash
|
||||
# 开发
|
||||
cd u-claw-app
|
||||
npm install
|
||||
npm start # 本地运行
|
||||
|
||||
# 构建
|
||||
npm run build:mac # → release/U-Claw-x.x.x.dmg
|
||||
npm run build:mac-arm64 # → ARM64 版
|
||||
npm run build:win # → release/U-Claw-x.x.x.exe
|
||||
# 一键安装开发环境(国内镜像)
|
||||
bash setup.sh # Mac/Linux
|
||||
setup.bat # Windows
|
||||
|
||||
# 打包
|
||||
npm run build:mac-arm64 # → release/*.dmg
|
||||
npm run build:win # → release/*.exe
|
||||
```
|
||||
|
||||
**状态:** 🚧 Mac ARM64 基本可用 · 🚧 Windows 开发中 · ❌ Linux 暂不支持
|
||||
|
||||
## 支持的 AI 模型
|
||||
|
||||
### 国产模型(无需翻墙)
|
||||
@@ -113,67 +167,32 @@ Claude · GPT · Gemini(需翻墙或中转)
|
||||
| Discord | ✅ 内置 | — |
|
||||
| 微信 | ✅ 社区插件 | iPad 协议 |
|
||||
|
||||
## 国内镜像
|
||||
|
||||
所有脚本默认使用国内镜像,无需翻墙:
|
||||
|
||||
| 资源 | 镜像 |
|
||||
|------|------|
|
||||
| npm 包 | `registry.npmmirror.com` |
|
||||
| Node.js | `npmmirror.com/mirrors/node` |
|
||||
| Electron | `npmmirror.com/mirrors/electron` |
|
||||
|
||||
## 参与开发
|
||||
|
||||
### 环境要求
|
||||
|
||||
- Node.js 22+
|
||||
- macOS 12+ 或 Windows 10+
|
||||
|
||||
### 开发 portable 版
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dongsheng123132/u-claw.git
|
||||
cd u-claw/portable
|
||||
|
||||
# 一键搭建运行环境(自动下载 Node.js + OpenClaw + QQ 插件)
|
||||
bash setup.sh
|
||||
|
||||
# 启动测试
|
||||
bash Mac-Start.command # Mac
|
||||
# 或双击 Windows-Start.bat # Windows
|
||||
```
|
||||
|
||||
`setup.sh` 会自动:
|
||||
1. 检测你的系统(Mac ARM/Intel/Linux)
|
||||
2. 从国内镜像下载 Node.js v22
|
||||
3. 安装 OpenClaw + QQ 插件到 `app/` 目录
|
||||
|
||||
### 开发桌面版
|
||||
|
||||
```bash
|
||||
cd u-claw-app
|
||||
|
||||
# Mac / Linux 一键安装(自动下载 Node.js runtime + 依赖,全部国内镜像)
|
||||
bash setup.sh
|
||||
|
||||
# Windows 一键安装
|
||||
setup.bat
|
||||
```
|
||||
|
||||
`setup.sh` / `setup.bat` 会自动:
|
||||
1. 检查或下载 Node.js v22(国内镜像 npmmirror.com)
|
||||
2. 安装 npm 依赖 + Electron(国内镜像)
|
||||
3. 下载打包用 Node.js runtime
|
||||
4. 询问是否立即启动
|
||||
|
||||
安装完成后:
|
||||
```bash
|
||||
npm run dev # 开发模式运行
|
||||
npm run build:mac-arm64 # 打包 Mac ARM64 DMG
|
||||
npm run build:mac-x64 # 打包 Mac Intel DMG
|
||||
npm run build:win # 打包 Windows EXE(需在 Windows 上)
|
||||
bash setup.sh # 搭建开发环境
|
||||
bash Mac-Start.command # 测试启动
|
||||
```
|
||||
|
||||
### 提交代码
|
||||
|
||||
```bash
|
||||
git checkout -b feat/your-feature
|
||||
# 改代码...
|
||||
git add -A
|
||||
git commit -m "feat: your change"
|
||||
git push -u origin feat/your-feature
|
||||
# 在 GitHub 上创建 PR
|
||||
```
|
||||
|
||||
## 待开发 / 欢迎贡献
|
||||
@@ -182,8 +201,6 @@ git push -u origin feat/your-feature
|
||||
- [ ] Mac Intel 支持
|
||||
- [ ] Linux 支持(AppImage)
|
||||
- [ ] 桌面版自动更新
|
||||
- [ ] 一键安装到电脑(永久模式)
|
||||
- [ ] 在线安装脚本(curl 一行安装)
|
||||
- [ ] SkillHub 技能市场功能完善
|
||||
- [ ] 多语言支持(English UI)
|
||||
|
||||
@@ -198,6 +215,9 @@ MIT 协议,随便复制。
|
||||
**Q: Mac 提示"未验证的开发者"?**
|
||||
右键脚本 → 打开。
|
||||
|
||||
**Q: U 盘需要多大?**
|
||||
建议 4GB 以上(完整版约 2.3GB)。
|
||||
|
||||
**Q: Windows 需要 WSL?**
|
||||
不需要,自带 Windows 版 Node.js。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user