fix: remove build-usb.sh, correct README positioning
The repo IS the USB content (minus large deps), not a builder tool. setup.sh fills in missing deps → folder is ready to copy to USB.
This commit is contained in:
179
README.md
179
README.md
@@ -1,142 +1,74 @@
|
||||
# 🦞 U-Claw
|
||||
|
||||
**AI 助手 U 盘制作工具 — 克隆代码,一键制作,双击就能用**
|
||||
**AI 助手 U 盘 — 克隆、补依赖、拷到 U 盘、双击运行**
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
U-Claw 是一个开源工具集,帮你把 [OpenClaw](https://github.com/openclaw/openclaw) AI 助手打包成 U 盘。插上 U 盘双击运行,或从 U 盘安装到电脑。全部依赖从国内镜像下载,不需要翻墙。
|
||||
U-Claw 把 [OpenClaw](https://github.com/openclaw/openclaw) 打包成 U 盘便携版。这个代码库就是 U 盘里的全部内容,只是不上传大依赖(Node.js、node_modules)。运行 `setup.sh` 补齐依赖后,直接拷贝到 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 盘
|
||||
bash setup.sh # 补齐大依赖(Node.js + OpenClaw,国内镜像,约 1 分钟)
|
||||
```
|
||||
|
||||
`build-usb.sh` 自动完成:
|
||||
1. 选择目标平台(Mac / Windows / 全部)
|
||||
2. 从国内镜像下载 Node.js v22
|
||||
3. 安装 OpenClaw + QQ 插件
|
||||
4. 打包成可直接拷贝的目录
|
||||
5. 可选打包成 tar.gz
|
||||
|
||||
### 在自己电脑上搭建(开发/测试)
|
||||
**完成后 `portable/` 就是完整的 U 盘内容。** 拷贝到 U 盘即可:
|
||||
|
||||
```bash
|
||||
cd u-claw/portable
|
||||
bash setup.sh # 搭建运行环境
|
||||
bash Mac-Start.command # Mac 启动
|
||||
# 或 Windows-Start.bat # Windows 启动
|
||||
# Mac
|
||||
cp -R portable/ /Volumes/你的U盘/U-Claw/
|
||||
|
||||
# 或直接在 Finder 拖过去
|
||||
```
|
||||
|
||||
---
|
||||
## U 盘上能做什么
|
||||
|
||||
## 项目结构
|
||||
| 功能 | Mac | Windows | 说明 |
|
||||
|------|-----|---------|------|
|
||||
| **免安装运行** | `Mac-Start.command` | `Windows-Start.bat` | 双击直接跑,不碰电脑 |
|
||||
| **功能菜单** | `Mac-Menu.command` | `Windows-Menu.bat` | 配置、QQ、备份等 8 项 |
|
||||
| **安装到电脑** | `Mac-Install.command` | `Windows-Install.bat` | 离线优先,缺啥走国内镜像 |
|
||||
| **首次配置** | `Config.html` | `Config.html` | 浏览器打开,选模型填 Key |
|
||||
|
||||
## U 盘文件结构
|
||||
|
||||
```
|
||||
U-Claw/
|
||||
├── 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)
|
||||
│ ├── setup.sh / setup.bat 一键搭建开发环境
|
||||
│ ├── src/main.js Electron 主进程
|
||||
│ └── package.json 依赖 & 构建配置
|
||||
│
|
||||
├── website/ ← 🌐 官网 + 教程(u-claw.org)
|
||||
│ ├── guide.html 使用指南(含国内镜像、搭建教程)
|
||||
│ ├── index.html 官网首页
|
||||
│ └── skills.html 技能市场页
|
||||
│
|
||||
└── README.md
|
||||
```
|
||||
|
||||
### U 盘上的文件(制作完成后)
|
||||
|
||||
```
|
||||
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 插件
|
||||
U-Claw/ ← 整个拷到 U 盘
|
||||
├── Mac-Start.command 双击 = Mac 免安装运行
|
||||
├── Mac-Menu.command 功能菜单(8 项)
|
||||
├── Mac-Install.command 安装到 Mac
|
||||
├── Windows-Start.bat 双击 = Windows 免安装运行
|
||||
├── Windows-Menu.bat 功能菜单
|
||||
├── Windows-Install.bat 安装到 Windows
|
||||
├── Config.html 首次配置页面
|
||||
├── setup.sh 补齐依赖用(开发者用)
|
||||
├── app/ ← 大依赖(setup.sh 下载,不进 git)
|
||||
│ ├── core/ OpenClaw + QQ 插件
|
||||
│ └── runtime/
|
||||
│ ├── node-mac-arm64/ Mac Apple Silicon
|
||||
│ └── node-win-x64/ Windows 64-bit
|
||||
└── data/ 用户数据
|
||||
├── .openclaw/ 配置文件
|
||||
├── memory/ AI 记忆
|
||||
└── backups/ 备份
|
||||
│ ├── node-mac-arm64/ Mac Apple Silicon
|
||||
│ └── node-win-x64/ Windows 64-bit
|
||||
└── data/ ← 用户数据(不进 git)
|
||||
├── .openclaw/ 配置文件
|
||||
├── memory/ AI 记忆
|
||||
└── backups/ 备份
|
||||
```
|
||||
|
||||
## U 盘上的两种用法
|
||||
**代码库 = U 盘内容 - 大依赖。** `app/` 和 `data/` 在 `.gitignore` 里。
|
||||
|
||||
### 免安装运行(推荐)
|
||||
## 桌面安装版(Electron App)
|
||||
|
||||
直接从 U 盘运行,不修改电脑任何文件。换电脑插上 U 盘,配置还在。
|
||||
|
||||
- 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)
|
||||
除了 U 盘便携版,还有桌面 App 版本:
|
||||
|
||||
```bash
|
||||
cd u-claw-app
|
||||
|
||||
# 一键安装开发环境(国内镜像)
|
||||
bash setup.sh # Mac/Linux
|
||||
setup.bat # Windows
|
||||
|
||||
# 打包
|
||||
npm run build:mac-arm64 # → release/*.dmg
|
||||
npm run build:win # → release/*.exe
|
||||
bash setup.sh # 一键安装开发环境(国内镜像)
|
||||
npm run dev # 开发模式运行
|
||||
npm run build:mac-arm64 # 打包 → release/*.dmg
|
||||
npm run build:win # 打包 → release/*.exe
|
||||
```
|
||||
|
||||
## 支持的 AI 模型
|
||||
@@ -169,7 +101,7 @@ Claude · GPT · Gemini(需翻墙或中转)
|
||||
|
||||
## 国内镜像
|
||||
|
||||
所有脚本默认使用国内镜像,无需翻墙:
|
||||
所有脚本默认走国内镜像,无需翻墙:
|
||||
|
||||
| 资源 | 镜像 |
|
||||
|------|------|
|
||||
@@ -177,13 +109,21 @@ Claude · GPT · Gemini(需翻墙或中转)
|
||||
| Node.js | `npmmirror.com/mirrors/node` |
|
||||
| Electron | `npmmirror.com/mirrors/electron` |
|
||||
|
||||
## 参与开发
|
||||
## 开发 & 测试
|
||||
|
||||
```bash
|
||||
# 克隆
|
||||
git clone https://github.com/dongsheng123132/u-claw.git
|
||||
cd u-claw/portable
|
||||
bash setup.sh # 搭建开发环境
|
||||
bash Mac-Start.command # 测试启动
|
||||
|
||||
# 补依赖
|
||||
cd u-claw/portable && bash setup.sh
|
||||
|
||||
# 测试启动
|
||||
bash Mac-Start.command # Mac
|
||||
# 或 Windows-Start.bat # Windows
|
||||
|
||||
# 测试没问题 → 拷到 U 盘
|
||||
# 有问题 → 修代码 → 重新测试
|
||||
```
|
||||
|
||||
### 提交代码
|
||||
@@ -209,18 +149,15 @@ git push -u origin feat/your-feature
|
||||
**Q: 需要翻墙吗?**
|
||||
安装不需要。运行需要联网调 API,国产模型无需翻墙。
|
||||
|
||||
**Q: U 盘需要多大?**
|
||||
建议 4GB 以上(完整版约 2.3GB)。
|
||||
|
||||
**Q: 能分发吗?**
|
||||
MIT 协议,随便复制。
|
||||
|
||||
**Q: Mac 提示"未验证的开发者"?**
|
||||
右键脚本 → 打开。
|
||||
|
||||
**Q: U 盘需要多大?**
|
||||
建议 4GB 以上(完整版约 2.3GB)。
|
||||
|
||||
**Q: Windows 需要 WSL?**
|
||||
不需要,自带 Windows 版 Node.js。
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
Reference in New Issue
Block a user