feat: add uninstall.sh for one-click uninstall

This commit is contained in:
dongsheng123132
2026-04-13 18:17:14 +08:00
parent c6e87b8183
commit 49b875b081
8 changed files with 133 additions and 447 deletions

222
README.md
View File

@@ -6,7 +6,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[中文](#中文) | [English](#english) | [日本語](#日本語) | [📖 完整教程](https://u-claw.org/tutorial.html) [中文](#中文) | [English](#english) | [📖 完整教程](https://u-claw.org/tutorial.html)
--- ---
@@ -22,14 +22,6 @@ U-Claw虾盘是一个**制作教程 + 全套源代码**,教你把 [OpenC
> 📖 **[完整教程](https://u-claw.org/tutorial.html)** — 从零开始的手工安装指南、模型配置、聊天平台接入,小白也能看懂。 > 📖 **[完整教程](https://u-claw.org/tutorial.html)** — 从零开始的手工安装指南、模型配置、聊天平台接入,小白也能看懂。
---
> ⚠️ **新手提示:** 本仓库为开源 1.0 版本构建需要一定的技术基础Node.js / 命令行 / 脚本),不建议零基础用户贸然折腾。**想省事的话推荐直接购买商业版2.0**,开箱即用。
>
> 🚀 **2.0 商业版** 包含 U 盘内运行的**本地模型**(离线可用,无需 API现已正式销售附赠 AI 陪跑服务。淘宝 👉 [虾盘 U 盘(作者出品)](https://e.tb.cn/h.ij8LYYB0cZPkNHw?tk=FMo05XEJYk0)(口令 `HU293`)· 拼多多 👉 [点此购买](https://mobile.yangkeduo.com/goods1.html?ps=WaQeS00tDn)。📩 微信:**hecare888**
---
### 一键安装(推荐) ### 一键安装(推荐)
不需要 U 盘,一行命令直接装到电脑: 不需要 U 盘,一行命令直接装到电脑:
@@ -53,8 +45,7 @@ irm https://u-claw.org/install.ps1 | iex
git clone https://github.com/dongsheng123132/u-claw.git git clone https://github.com/dongsheng123132/u-claw.git
# 2. 补齐大依赖Node.js + OpenClaw国内镜像约 1 分钟) # 2. 补齐大依赖Node.js + OpenClaw国内镜像约 1 分钟)
cd u-claw/portable && bash setup.sh # Mac / Linux cd u-claw/portable && bash setup.sh
# Windows 用户:双击 setup.bat或 PowerShell 中运行 setup.ps1
# 3. 拷贝到 U 盘 # 3. 拷贝到 U 盘
cp -R portable/ /Volumes/你的U盘/U-Claw/ # Mac cp -R portable/ /Volumes/你的U盘/U-Claw/ # Mac
@@ -130,7 +121,6 @@ npm run build:win # 打包 → release/*.exe
| MiniMax | 语音多模态 | | MiniMax | 语音多模态 |
| 豆包 Doubao | 火山引擎 | | 豆包 Doubao | 火山引擎 |
**国际模型:** Claude · GPT · Gemini需翻墙或中转 **国际模型:** Claude · GPT · Gemini需翻墙或中转
### 支持的聊天平台 ### 支持的聊天平台
@@ -175,15 +165,18 @@ bash Mac-Start.command # Mac 测试
### 🦞 寻找技术伙伴 ### 🦞 寻找技术伙伴
**U-Claw 虾盘** 是一个快速成长的开源项目,目前已有不少商业合作机会。但作为产品经理的我,还无力独自承接更多的可能性。 U-Claw 是一个快速成长的开源项目,目前已有不少商业合作机会。
正在寻找: 我们正在寻找:
- **技术伙伴** — 全栈 / Node.js / Electron / 脚本自动化 - **技术伙伴** — 全栈 / Node.js / Electron / 脚本自动化
- **资源合作** — 渠道、内容、社区运营 - **资源合作** — 渠道、内容、社区运营
如果你对 AI 工具的落地和商业化感兴趣,欢迎联系: 如果你对 AI 工具的落地和商业化感兴趣,欢迎联系:
- 微信: **hecare888** - 微信: hecare888
- Telegram: [@dsds8848](https://t.me/dsds8848)
- Twitter/X: [@Bitplus888](https://x.com/Bitplus888)
- Email: [hefangsheng@gmail.com](mailto:hefangsheng@gmail.com)
- GitHub: [@dongsheng123132](https://github.com/dongsheng123132) - GitHub: [@dongsheng123132](https://github.com/dongsheng123132)
- 官网: [u-claw.org](https://u-claw.org) - 官网: [u-claw.org](https://u-claw.org)
@@ -204,6 +197,9 @@ MIT 协议,随便复制分发。
### 联系 ### 联系
- 微信: hecare888 - 微信: hecare888
- Telegram: [@dsds8848](https://t.me/dsds8848)
- Twitter/X: [@Bitplus888](https://x.com/Bitplus888)
- Email: [hefangsheng@gmail.com](mailto:hefangsheng@gmail.com)
- GitHub: [@dongsheng123132](https://github.com/dongsheng123132) - GitHub: [@dongsheng123132](https://github.com/dongsheng123132)
- 官网: [u-claw.org](https://u-claw.org) - 官网: [u-claw.org](https://u-claw.org)
@@ -221,14 +217,6 @@ The codebase itself is the USB file skeleton. Run `setup.sh` to download large d
> 📖 **[Full Tutorial](https://u-claw.org/tutorial.html)** — Step-by-step manual installation, model setup, chat platform integration. > 📖 **[Full Tutorial](https://u-claw.org/tutorial.html)** — Step-by-step manual installation, model setup, chat platform integration.
---
> ⚠️ **Heads up for beginners:** This repo is the open-source 1.0 version. Building it requires technical knowledge (Node.js / CLI / scripting). If you just want something that works, **we recommend the commercial 2.0 edition** — no setup needed.
>
> 🚀 **Version 2.0** features **on-device local models** (offline, no API key needed), now available — includes AI onboarding support. Taobao 👉 [U-Claw USB Drive (by author)](https://e.tb.cn/h.ij8LYYB0cZPkNHw?tk=FMo05XEJYk0) (code `HU293`) · Pinduoduo 👉 [Buy here](https://mobile.yangkeduo.com/goods1.html?ps=WaQeS00tDn). 📩 WeChat: **hecare888**
---
### One-Line Install (Recommended) ### One-Line Install (Recommended)
No USB needed — install directly to your computer: No USB needed — install directly to your computer:
@@ -252,8 +240,7 @@ See [`install/README.md`](install/README.md) for details.
git clone https://github.com/dongsheng123132/u-claw.git git clone https://github.com/dongsheng123132/u-claw.git
# 2. Download dependencies (Node.js + OpenClaw, ~1 min) # 2. Download dependencies (Node.js + OpenClaw, ~1 min)
cd u-claw/portable && bash setup.sh # Mac / Linux cd u-claw/portable && bash setup.sh
# Windows: double-click setup.bat, or run setup.ps1 in PowerShell
# 3. Copy to USB drive # 3. Copy to USB drive
cp -R portable/ /Volumes/YOUR_USB/U-Claw/ # Mac cp -R portable/ /Volumes/YOUR_USB/U-Claw/ # Mac
@@ -397,16 +384,19 @@ WeChat: **hecare888** (备注「U-Claw 远程」优先处理)
### 🦞 Looking for Partners ### 🦞 Looking for Partners
**U-Claw** is a fast-growing open-source project with real commercial opportunities already on the table. But as a solo product manager, I can't capture them alone. U-Claw is a fast-growing open-source project with real commercial opportunities.
Looking for: We're looking for:
- **Technical partners** — Full-stack / Node.js / Electron / scripting & automation - **Technical partners** — Full-stack / Node.js / Electron / scripting
- **Resource partners** — Distribution channels, content creation, community ops - **Resource partners** — Distribution, content, community
If you're excited about bringing AI tools to market, let's talk: If you're interested in AI tooling and commercialization, let's talk:
- WeChat: **hecare888** - Telegram: [@dsds8848](https://t.me/dsds8848)
- Twitter/X: [@Bitplus888](https://x.com/Bitplus888)
- Email: [hefangsheng@gmail.com](mailto:hefangsheng@gmail.com)
- GitHub: [@dongsheng123132](https://github.com/dongsheng123132) - GitHub: [@dongsheng123132](https://github.com/dongsheng123132)
- WeChat: hecare888
- Website: [u-claw.org](https://u-claw.org) - Website: [u-claw.org](https://u-claw.org)
### FAQ ### FAQ
@@ -425,175 +415,13 @@ Right-click the script → Open.
### Contact ### Contact
- WeChat: hecare888 - Telegram: [@dsds8848](https://t.me/dsds8848)
- Twitter/X: [@Bitplus888](https://x.com/Bitplus888)
- Email: [hefangsheng@gmail.com](mailto:hefangsheng@gmail.com)
- GitHub: [@dongsheng123132](https://github.com/dongsheng123132) - GitHub: [@dongsheng123132](https://github.com/dongsheng123132)
- WeChat: hecare888
- Website: [u-claw.org](https://u-claw.org) - Website: [u-claw.org](https://u-claw.org)
--- ---
---
<a id="日本語"></a>
## 日本語
### これは何?
U-Claw虾盘 / シャーパン)は、[OpenClaw](https://github.com/openclaw/openclaw)(オープンソース AI アシスタントフレームワーク)を USB メモリに入れて持ち運べるようにする**チュートリアル + ソースコード一式**です。任意の PC に差し込み、ダブルクリックするだけで AI が使えます。
コードベースがそのまま USB のファイル構造になっています。`setup.sh` で大きな依存ファイルをダウンロードした後、`portable/` ディレクトリを USB にコピーすれば完成です。
> 📖 **[完全チュートリアル](https://u-claw.org/tutorial.html)** — ゼロからの手動インストール、モデル設定、チャットプラットフォーム連携。
### ワンラインインストール(推奨)
USB 不要。コマンド一行で PC に直接インストール:
```bash
# Mac / Linux
curl -fsSL https://u-claw.org/install.sh | bash
# Windows (PowerShell を管理者として実行)
irm https://u-claw.org/install.ps1 | iex
```
自動で Node.js ダウンロード → OpenClaw インストール → スキル設定 → AI モデル設定 → 起動スクリプト生成まで完了します。中国ミラーを使用。
詳細は [`install/README.md`](install/README.md) を参照。
### クイックスタート:ポータブル USB の作成
```bash
# 1. クローン
git clone https://github.com/dongsheng123132/u-claw.git
# 2. 依存ファイルをダウンロードNode.js + OpenClaw、約1分
cd u-claw/portable && bash setup.sh
# 3. USB にコピー
cp -R portable/ /Volumes/YOUR_USB/U-Claw/ # Mac
# Windows はエクスプローラーでドラッグ&ドロップ
```
**完了!** USB を差し込み、起動スクリプトをダブルクリックするだけ。
### USB の機能一覧
| 機能 | Mac | Windows |
|------|-----|---------|
| **インストール不要で実行** | `Mac-Start.command` | `Windows-Start.bat` |
| **メニュー** | `Mac-Menu.command` | `Windows-Menu.bat` |
| **PC にインストール** | `Mac-Install.command` | `Windows-Install.bat` |
| **初回設定** | `Config.html` | `Config.html` |
### ファイル構造
```
U-Claw/ ← フォルダごと USB にコピー
├── Mac-Start.command Mac 起動スクリプト
├── Mac-Menu.command Mac メニュー
├── Mac-Install.command Mac にインストール
├── Windows-Start.bat Windows 起動スクリプト
├── Windows-Menu.bat Windows メニュー
├── Windows-Install.bat Windows にインストール
├── Config.html 初回設定ページ
├── setup.sh 依存ダウンロード(開発者向け)
├── app/ ← 大きな依存ファイルsetup.sh でDL、git 管理外)
│ ├── core/ OpenClaw + QQ プラグイン
│ └── runtime/
│ ├── node-mac-arm64/ Mac Apple Silicon
│ ├── node-mac-x64/ Mac Intel
│ └── node-win-x64/ Windows 64-bit
└── data/ ← ユーザーデータgit 管理外)
├── .openclaw/ 設定ファイル
├── memory/ AI メモリ
└── backups/ バックアップ
```
### Linux ブータブル USB
OS がなくても大丈夫。任意の PC を USB から Ubuntu + AI で起動できます:
- 本リポジトリ内:[`bootable/`](bootable/) ディレクトリ(他のモジュールと完全に独立)
- 独立リポジトリ:[u-claw-linux](https://github.com/dongsheng123132/u-claw-linux)(同じ内容、単独クローン向け)
Ventoy + Ubuntu 24.04 LTS + 永続化ストレージ対応。Windows 上で 4 ステップの PowerShell スクリプトを実行して作成。詳細は [`bootable/README.md`](bootable/README.md) を参照。
### デスクトップアプリElectron
```bash
cd u-claw-app
bash setup.sh # ワンクリックで開発環境セットアップ
npm run dev # 開発モードで実行
npm run build:mac-arm64 # ビルド → release/*.dmg
npm run build:win # ビルド → release/*.exe
```
### 対応 AI モデル
**中国国産モデルVPN 不要):**
| モデル | 推奨用途 |
|--------|----------|
| DeepSeek | プログラミング最適、超低価格 |
| Kimi K2.5 | 長文ドキュメント、256K コンテキスト |
| Qwen (通義千問) | 無料枠が大きい |
| GLM (智谱) | 学術向け |
| MiniMax | 音声・マルチモーダル |
| Doubao (豆包) | 火山エンジン |
**国際モデル:** Claude・GPT・Gemini中国からは VPN またはリレーが必要)
### 対応チャットプラットフォーム
| プラットフォーム | 状態 | 備考 |
|------------------|------|------|
| QQ | ✅ プリインストール | AppID + Secret を入力 |
| 飛書 (Lark) | ✅ 内蔵 | 企業向け |
| Telegram | ✅ 内蔵 | 海外向け |
| WhatsApp | ✅ 内蔵 | Baileys プロトコル |
| Discord | ✅ 内蔵 | — |
| WeChat | ✅ コミュニティプラグイン | iPad プロトコル |
### 開発 & コントリビュート
```bash
git clone https://github.com/dongsheng123132/u-claw.git
cd u-claw/portable && bash setup.sh
bash Mac-Start.command # Mac でテスト
```
**対応プラットフォーム:**
| プラットフォーム | 状態 | 備考 |
|------------------|------|------|
| Mac Apple Silicon (M1-M4) | ✅ | ポータブル + デスクトップ |
| Mac Intel (x64) | ✅ | ポータブル + デスクトップ |
| Windows x64 | 🚧 開発中 | ポータブル + デスクトップ |
| Linux x64ブータブル USB | ✅ | [`bootable/`](bootable/) ディレクトリ |
PR 歓迎特にWindows スクリプトの改善、ドキュメント翻訳。
### FAQ
**Q: VPN は必要ですか?**
不要です。インストール・実行ともに中国ミラーを使用。中国国産モデルの API は直接接続できます。
**Q: USB メモリの容量はどのくらい必要ですか?**
4GB 以上(フルで約 2.3GB)。
**Q: 再配布できますか?**
MIT ライセンスです。自由にコピー・配布できます。
**Q: Mac で「未確認の開発元」と表示されますか?**
スクリプトを右クリック → 「開く」を選択してください。
### お問い合わせ
- WeChat: hecare888
- GitHub: [@dongsheng123132](https://github.com/dongsheng123132)
- ウェブサイト: [u-claw.org](https://u-claw.org)
---
**Made with 🦞 by [dongsheng](https://github.com/dongsheng123132)** **Made with 🦞 by [dongsheng](https://github.com/dongsheng123132)**

View File

@@ -132,7 +132,7 @@ if "!USE_OPENCLAW!"=="usb" (
) else ( ) else (
echo 从国内镜像下载 OpenClaw... echo 从国内镜像下载 OpenClaw...
mkdir "%INSTALL_TARGET%\core" 2>nul mkdir "%INSTALL_TARGET%\core" 2>nul
echo {"name":"u-claw-core","version":"1.0.0","private":true,"dependencies":{"openclaw":"latest"}} > "%INSTALL_TARGET%\core\package.json" (echo {"name":"u-claw-core","version":"1.0.0","private":true,"dependencies":{"openclaw":"latest"}})>"%INSTALL_TARGET%\core\package.json"
cd /d "%INSTALL_TARGET%\core" cd /d "%INSTALL_TARGET%\core"
call "!INSTALL_NPM!" install --registry=%MIRROR% call "!INSTALL_NPM!" install --registry=%MIRROR%
call "!INSTALL_NPM!" install @sliverp/qqbot@latest --registry=%MIRROR% call "!INSTALL_NPM!" install @sliverp/qqbot@latest --registry=%MIRROR%
@@ -151,7 +151,7 @@ if exist "%APP_DIR%\extensions\openclaw-weixin\openclaw.plugin.json" (
REM ---- Default config ---- REM ---- Default config ----
if not exist "%INSTALL_TARGET%\data\.openclaw\openclaw.json" ( if not exist "%INSTALL_TARGET%\data\.openclaw\openclaw.json" (
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%INSTALL_TARGET%\data\.openclaw\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%INSTALL_TARGET%\data\.openclaw\openclaw.json"
) )
REM ---- Copy HTML pages ---- REM ---- Copy HTML pages ----

View File

@@ -120,7 +120,7 @@ if !errorlevel!==0 (
) )
cd /d "%CORE_DIR%" cd /d "%CORE_DIR%"
if not exist "%STATE_DIR%\openclaw.json" ( if not exist "%STATE_DIR%\openclaw.json" (
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
) )
REM Read token from config REM Read token from config
@@ -424,7 +424,7 @@ echo [4/4] Restoring default config...
if exist "%UCLAW_DIR%default-config.json" ( if exist "%UCLAW_DIR%default-config.json" (
copy "%UCLAW_DIR%default-config.json" "%STATE_DIR%\openclaw.json" >nul copy "%UCLAW_DIR%default-config.json" "%STATE_DIR%\openclaw.json" >nul
) else ( ) else (
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
) )
echo. echo.
echo Factory reset complete! Run Setup wizard [1] to reconfigure. echo Factory reset complete! Run Setup wizard [1] to reconfigure.

View File

@@ -49,7 +49,7 @@ if not exist "%DATA_DIR%\logs" mkdir "%DATA_DIR%\logs"
REM Default config REM Default config
if not exist "%STATE_DIR%\openclaw.json" ( if not exist "%STATE_DIR%\openclaw.json" (
echo First run - creating default config... echo First run - creating default config...
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
echo Config created echo Config created
echo. echo.
) )

View File

@@ -115,7 +115,7 @@ if !errorlevel!==0 (
) )
cd /d "%CORE_DIR%" cd /d "%CORE_DIR%"
if not exist "%STATE_DIR%\openclaw.json" ( if not exist "%STATE_DIR%\openclaw.json" (
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
) )
REM Read token from config REM Read token from config
@@ -416,7 +416,7 @@ echo [3/4] Clearing memory...
rmdir /s /q "%DATA_DIR%\memory" 2>nul rmdir /s /q "%DATA_DIR%\memory" 2>nul
mkdir "%DATA_DIR%\memory" 2>nul mkdir "%DATA_DIR%\memory" 2>nul
echo [4/4] Restoring default config... echo [4/4] Restoring default config...
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
echo. echo.
echo Factory reset complete! Run Setup wizard [1] to reconfigure. echo Factory reset complete! Run Setup wizard [1] to reconfigure.
pause pause

View File

@@ -1,4 +1,4 @@
@echo off @echo off
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
chcp 65001 >nul 2>&1 chcp 65001 >nul 2>&1
title U-Claw - Portable AI Agent title U-Claw - Portable AI Agent
@@ -45,7 +45,7 @@ if not exist "%DATA_DIR%\logs" mkdir "%DATA_DIR%\logs"
REM Default config REM Default config
if not exist "%STATE_DIR%\openclaw.json" ( if not exist "%STATE_DIR%\openclaw.json" (
echo First run - creating default config... echo First run - creating default config...
echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}} > "%STATE_DIR%\openclaw.json" (echo {"gateway":{"mode":"local","auth":{"token":"uclaw"}}})>"%STATE_DIR%\openclaw.json"
echo Config created echo Config created
echo. echo.
) )
@@ -57,6 +57,12 @@ if not exist "%CORE_DIR%\node_modules" (
echo. echo.
cd /d "%CORE_DIR%" cd /d "%CORE_DIR%"
call "%NPM_BIN%" install --registry=https://registry.npmmirror.com call "%NPM_BIN%" install --registry=https://registry.npmmirror.com
if !errorlevel! neq 0 (
echo.
echo [FAIL] npm install failed
pause
exit /b 1
)
echo. echo.
echo Dependencies installed! echo Dependencies installed!
echo. echo.
@@ -102,8 +108,24 @@ if "!HAS_MODEL!"=="yes" (
echo Opening dashboard in 3 seconds... echo Opening dashboard in 3 seconds...
start /B "" cmd /c "timeout /t 3 /nobreak >nul && start http://127.0.0.1:!PORT!/#token=!TOKEN!" start /B "" cmd /c "timeout /t 3 /nobreak >nul && start http://127.0.0.1:!PORT!/#token=!TOKEN!"
) else ( ) else (
echo First time setup - opening Config page in 3 seconds... echo First time setup - opening Config page...
start /B "" cmd /c "timeout /t 3 /nobreak >nul && start file:///%UCLAW_DIR%Config.html?port=!PORT!" set "CONFIG_PORT=18780"
:find_config_port
netstat -an | findstr ":!CONFIG_PORT! " | findstr "LISTENING" >nul 2>&1
if !errorlevel!==0 (
set /a CONFIG_PORT+=1
if !CONFIG_PORT! gtr 18785 (
echo No available config port
pause
exit /b 1
)
goto :find_config_port
)
start /B "" "%NODE_BIN%" -e "const http=require('http'),fs=require('fs'),path=require('path');const configPath='%STATE_DIR:\=/%/openclaw.json',htmlPath=path.join('%UCLAW_DIR:\=/%','Config.html');const server=http.createServer((req,res)=>{if(req.method==='GET'&&(req.url==='/'||req.url==='/index.html')){res.writeHead(200,{'Content-Type':'text/html; charset=utf-8'});res.end(fs.readFileSync(htmlPath,'utf-8'))}else if(req.method==='GET'&&req.url==='/api/config'){try{const cfg=fs.existsSync(configPath)?JSON.parse(fs.readFileSync(configPath,'utf-8')):{};res.writeHead(200,{'Content-Type':'application/json'});res.end(JSON.stringify(cfg))}catch(e){res.writeHead(200,{'Content-Type':'application/json'});res.end('{}')}}else if(req.method==='POST'&&req.url==='/api/config'){let body='';req.on('data',c=>body+=c);req.on('end',()=>{try{const cfg=JSON.parse(body);fs.mkdirSync(path.dirname(configPath),{recursive:true});fs.writeFileSync(configPath,JSON.stringify(cfg,null,2));res.writeHead(200,{'Content-Type':'application/json'});res.end('{\"ok\":true}')}catch(e){res.writeHead(400,{'Content-Type':'application/json'});res.end('{\"error\":\"'+e.message+'\"}')}});}else if(req.method==='POST'&&req.url==='/api/done'){res.writeHead(200,{'Content-Type':'application/json'});res.end('{\"ok\":true}');setTimeout(()=>{server.close();process.exit(0)},300)}else{res.writeHead(404);res.end('Not Found')}});server.listen(!CONFIG_PORT!,'127.0.0.1',()=>{console.log('Config server: http://127.0.0.1:!CONFIG_PORT!')});"
timeout /t 2 /nobreak >nul
start http://127.0.0.1:!CONFIG_PORT!/
echo Config page opened at http://127.0.0.1:!CONFIG_PORT!/
echo Configure your model and API key in the browser, then close to continue.
) )
REM Start gateway (foreground, blocks until stopped) REM Start gateway (foreground, blocks until stopped)

View File

@@ -309,61 +309,6 @@
.hidden { display: none !important; } .hidden { display: none !important; }
/* Daily section */
.daily-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.daily-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 28px;
transition: border-color 0.2s;
}
.daily-card:hover { border-color: var(--accent); }
.daily-card-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 14px;
}
.daily-date {
text-align: center;
color: var(--text-dim);
font-size: 14px;
margin-bottom: 32px;
}
.daily-history {
margin-top: 32px;
}
.daily-history-toggle {
display: block;
width: 100%;
background: transparent;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 10px;
border-radius: 10px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
}
.daily-history-toggle:hover { border-color: var(--accent); color: var(--text); }
.daily-history-list { display: none; margin-top: 20px; }
.daily-history-list.open { display: block; }
.daily-history-item {
border-top: 1px solid var(--border);
padding: 20px 0;
}
.daily-history-item-date {
font-size: 13px;
color: var(--text-dim);
margin-bottom: 12px;
}
@media (max-width: 640px) { @media (max-width: 640px) {
.stats { gap: 24px; } .stats { gap: 24px; }
.hero-cta { flex-direction: column; align-items: center; } .hero-cta { flex-direction: column; align-items: center; }
@@ -403,18 +348,6 @@
<span class="zh">🖥️ 远程控制</span> <span class="zh">🖥️ 远程控制</span>
<span class="en hidden">🖥️ Remote Control</span> <span class="en hidden">🖥️ Remote Control</span>
</a> </a>
<a href="#contact" class="btn btn-outline" style="border-color:var(--green);color:var(--green);">
<span class="zh">🛒 购买虾盘 U-Claw</span>
<span class="en hidden">🛒 Buy U-Claw USB</span>
</a>
<a href="#" class="btn btn-outline" style="opacity:0.5;cursor:not-allowed;" onclick="return false;">
<span class="zh">🖥 虾盘 MiniPC即将推出</span>
<span class="en hidden">🖥 MiniPC (Coming Soon)</span>
</a>
<a href="https://cloud.u-claw.org/" target="_blank" class="btn btn-outline">
<span class="zh">☁️ 虾盘云 API</span>
<span class="en hidden">☁️ Cloud API</span>
</a>
</div> </div>
<div class="stats"> <div class="stats">
@@ -697,63 +630,6 @@
</div> </div>
</section> </section>
<!-- Daily Tip & Case -->
<section id="daily" style="border-top: 1px solid var(--border); padding-top: 80px;">
<h2>
<span class="zh">每日精选</span>
<span class="en hidden">Daily Picks</span>
</h2>
<p class="section-sub">
<span class="zh">每天更新 · OpenClaw / U-Claw 使用技巧与最佳案例</span>
<span class="en hidden">Updated daily · Tips &amp; best-practice cases for OpenClaw / U-Claw</span>
</p>
<div id="daily-date" class="daily-date"></div>
<div id="daily-loading" style="text-align:center;color:var(--text-dim);padding:40px 0;">
<span class="zh">加载中…</span><span class="en hidden">Loading…</span>
</div>
<div id="daily-content" style="display:none;">
<div class="daily-grid">
<!-- Tip card -->
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-blue" style="margin-bottom:0;">
<span class="zh">技巧</span><span class="en hidden">Tip</span>
</span>
</div>
<h3 id="tip-title" style="font-size:18px;margin-bottom:10px;"></h3>
<p id="tip-content" style="color:var(--text-dim);font-size:14px;line-height:1.8;"></p>
</div>
<!-- Case card -->
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-green" style="margin-bottom:0;">
<span class="zh">案例</span><span class="en hidden">Case</span>
</span>
</div>
<h3 id="case-title" style="font-size:18px;margin-bottom:10px;"></h3>
<p id="case-content" style="color:var(--text-dim);font-size:14px;line-height:1.8;"></p>
</div>
</div>
<!-- History -->
<div class="daily-history">
<button class="daily-history-toggle" onclick="toggleDailyHistory(this)">
<span class="zh">查看最近 7 天历史 ▼</span>
<span class="en hidden">Recent 7 days history ▼</span>
</button>
<div class="daily-history-list" id="daily-history-list"></div>
</div>
</div>
<div id="daily-error" style="display:none;text-align:center;color:var(--text-dim);padding:40px 0;">
<span class="zh">内容暂时无法加载,请稍后刷新</span>
<span class="en hidden">Content unavailable, please refresh later</span>
</div>
</section>
<!-- CTA --> <!-- CTA -->
<div class="cta-section"> <div class="cta-section">
<h2> <h2>
@@ -773,23 +649,11 @@
<span class="zh">📖 查看文档</span> <span class="zh">📖 查看文档</span>
<span class="en hidden">📖 Documentation</span> <span class="en hidden">📖 Documentation</span>
</a> </a>
<a href="#contact" class="btn btn-outline" style="border-color:var(--green);color:var(--green);">
<span class="zh">🛒 购买虾盘 U-Claw</span>
<span class="en hidden">🛒 Buy U-Claw USB</span>
</a>
<a href="#" class="btn btn-outline" style="opacity:0.5;cursor:not-allowed;" onclick="return false;">
<span class="zh">🖥 虾盘 MiniPC即将推出</span>
<span class="en hidden">🖥 MiniPC (Coming Soon)</span>
</a>
<a href="https://cloud.u-claw.org/" target="_blank" class="btn btn-outline">
<span class="zh">☁️ 虾盘云 API</span>
<span class="en hidden">☁️ Cloud API</span>
</a>
</div> </div>
</div> </div>
<!-- Contact --> <!-- Contact -->
<section id="contact"> <section>
<h2> <h2>
<span class="zh">联系我们</span> <span class="zh">联系我们</span>
<span class="en hidden">Contact</span> <span class="en hidden">Contact</span>
@@ -798,32 +662,6 @@
<span class="zh">问题反馈、合作交流、技术咨询</span> <span class="zh">问题反馈、合作交流、技术咨询</span>
<span class="en hidden">Feedback, collaboration, technical support</span> <span class="en hidden">Feedback, collaboration, technical support</span>
</p> </p>
<div style="max-width:560px;margin:0 auto 32px;padding:20px 24px;border:1px solid #f5a623;border-radius:12px;background:rgba(245,166,35,0.07);text-align:center;">
<p style="font-size:17px;font-weight:700;margin-bottom:8px;">
<span class="zh">🚀 购买 2.0 商业版虾盘</span>
<span class="en hidden">🚀 Buy U-Claw 2.0 (Commercial)</span>
</p>
<p style="font-size:14px;color:var(--text-dim);margin-bottom:14px;">
<span class="zh">本地模型离线运行 · 无需 API · 附赠 AI 陪跑服务</span>
<span class="en hidden">On-device local model · Offline · AI onboarding included</span>
</p>
<div style="display:flex;gap:12px;justify-content:center;flex-wrap:wrap;">
<a href="https://e.tb.cn/h.ij8LYYB0cZPkNHw?tk=FMo05XEJYk0" target="_blank"
style="display:inline-block;padding:10px 28px;background:#f5a623;color:#000;font-weight:700;border-radius:8px;text-decoration:none;font-size:15px;">
<span class="zh">🛒 淘宝购买</span>
<span class="en hidden">🛒 Taobao</span>
</a>
<a href="https://mobile.yangkeduo.com/goods1.html?ps=WaQeS00tDn" target="_blank"
style="display:inline-block;padding:10px 28px;background:#e02e2e;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:15px;">
<span class="zh">🛒 拼多多购买</span>
<span class="en hidden">🛒 Pinduoduo</span>
</a>
</div>
<p style="margin-top:10px;font-size:13px;color:var(--text-dim);">
<span class="zh">淘宝口令 <code>HU293</code> · 微信下单:<strong>hecare888</strong></span>
<span class="en hidden">Taobao code <code>HU293</code> · WeChat: <strong>hecare888</strong></span>
</p>
</div>
<div style="display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: center;"> <div style="display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: center;">
<div style="text-align: center;"> <div style="text-align: center;">
<img src="wechat-qr.jpg" alt="WeChat QR" style="width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--border);"> <img src="wechat-qr.jpg" alt="WeChat QR" style="width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--border);">
@@ -854,10 +692,18 @@
<span style="color: var(--text-dim);">GitHub:</span> <span style="color: var(--text-dim);">GitHub:</span>
<a href="https://github.com/dongsheng123132" style="color: var(--accent); text-decoration: none;">dongsheng123132</a> <a href="https://github.com/dongsheng123132" style="color: var(--accent); text-decoration: none;">dongsheng123132</a>
</p> </p>
<p style="font-size: 16px;"> <p style="margin-bottom: 16px; font-size: 16px;">
<span style="color: var(--text-dim);">Website:</span> <span style="color: var(--text-dim);">Website:</span>
<a href="https://u-claw.org" style="color: var(--accent); text-decoration: none;">u-claw.org</a> <a href="https://u-claw.org" style="color: var(--accent); text-decoration: none;">u-claw.org</a>
</p> </p>
<p style="margin-bottom: 16px; font-size: 16px;">
<span style="color: var(--text-dim);">Telegram:</span>
<a href="https://t.me/dsds8848" style="color: var(--accent); text-decoration: none;">@dsds8848</a>
</p>
<p style="font-size: 16px;">
<span style="color: var(--text-dim);">Twitter/X:</span>
<a href="https://x.com/Bitplus888" style="color: var(--accent); text-decoration: none;">@Bitplus888</a>
</p>
</div> </div>
</div> </div>
</section> </section>
@@ -875,7 +721,8 @@
<a href="agent.html">远程控制</a> · <a href="agent.html">远程控制</a> ·
<a href="https://github.com/openclaw/openclaw">OpenClaw</a> · <a href="https://github.com/openclaw/openclaw">OpenClaw</a> ·
<a href="mailto:hefangsheng@gmail.com">hefangsheng@gmail.com</a> · <a href="mailto:hefangsheng@gmail.com">hefangsheng@gmail.com</a> ·
<a href="https://cloud.u-claw.org/" target="_blank" style="color:inherit;">虾盘云 API</a> <a href="https://t.me/dsds8848">Telegram</a> ·
<a href="https://x.com/Bitplus888">Twitter/X</a>
</p> </p>
</footer> </footer>
@@ -886,81 +733,7 @@ function switchLang(lang) {
document.getElementById('btn-zh').classList.toggle('active', lang === 'zh'); document.getElementById('btn-zh').classList.toggle('active', lang === 'zh');
document.getElementById('btn-en').classList.toggle('active', lang === 'en'); document.getElementById('btn-en').classList.toggle('active', lang === 'en');
document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en'; document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en';
// Re-render daily content text after lang switch
if (window._dailyData) renderDaily(window._dailyData);
} }
function getCurrentLang() {
return document.getElementById('btn-zh').classList.contains('active') ? 'zh' : 'en';
}
function t(obj) {
const lang = getCurrentLang();
return obj ? (obj[lang] || obj.zh || '') : '';
}
function renderDaily(data) {
const lang = getCurrentLang();
const latest = data.latest;
if (!latest) return;
document.getElementById('daily-date').textContent =
lang === 'zh' ? `更新日期:${latest.date}` : `Updated: ${latest.date}`;
document.getElementById('tip-title').textContent = t(latest.tip.title);
document.getElementById('tip-content').textContent = t(latest.tip.content);
document.getElementById('case-title').textContent = t(latest.case.title);
document.getElementById('case-content').textContent = t(latest.case.content);
// History (up to 7 entries)
const histList = document.getElementById('daily-history-list');
const recent = (data.history || []).slice(0, 7);
histList.innerHTML = recent.map(entry => `
<div class="daily-history-item">
<div class="daily-history-item-date">${entry.date}</div>
<div class="daily-grid" style="margin-bottom:0;">
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-blue" style="margin-bottom:0;">${t(entry.tip.tag)}</span>
</div>
<h3 style="font-size:16px;margin-bottom:8px;">${t(entry.tip.title)}</h3>
<p style="color:var(--text-dim);font-size:13px;line-height:1.8;">${t(entry.tip.content)}</p>
</div>
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-green" style="margin-bottom:0;">${t(entry.case.tag)}</span>
</div>
<h3 style="font-size:16px;margin-bottom:8px;">${t(entry.case.title)}</h3>
<p style="color:var(--text-dim);font-size:13px;line-height:1.8;">${t(entry.case.content)}</p>
</div>
</div>
</div>`).join('');
}
function toggleDailyHistory(btn) {
const list = document.getElementById('daily-history-list');
const open = list.classList.toggle('open');
const lang = getCurrentLang();
if (lang === 'zh') {
btn.querySelector('.zh').textContent = open ? '收起历史 ▲' : '查看最近 7 天历史 ▼';
} else {
btn.querySelector('.en').textContent = open ? 'Collapse history ▲' : 'Recent 7 days history ▼';
}
}
// Load daily data
fetch('daily/data.json?v=' + Date.now())
.then(r => r.json())
.then(data => {
window._dailyData = data;
document.getElementById('daily-loading').style.display = 'none';
document.getElementById('daily-content').style.display = 'block';
renderDaily(data);
})
.catch(() => {
document.getElementById('daily-loading').style.display = 'none';
document.getElementById('daily-error').style.display = 'block';
});
</script> </script>
</body> </body>
</html> </html>

63
website/uninstall.sh Normal file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
# ============================================================
# U-Claw 一键卸载 (macOS / Linux)
# Usage: curl -fsSL https://u-claw.org/uninstall.sh | bash
# ============================================================
UCLAW_DIR="$HOME/.uclaw"
AGENT_DIR="/tmp/uclaw"
echo ""
echo " =========================================="
echo " U-Claw 一键卸载"
echo " =========================================="
echo ""
# 1. Stop OpenClaw
if pgrep -f openclaw >/dev/null 2>&1; then
echo " [1/3] 停止 OpenClaw 进程..."
pkill -f openclaw 2>/dev/null || true
sleep 1
echo " [OK] 已停止"
else
echo " [1/3] OpenClaw 未在运行"
fi
# 2. Stop Agent (if running)
if pgrep -f "$AGENT_DIR/agent" >/dev/null 2>&1; then
echo " [2/3] 停止 Agent 进程..."
pkill -f "$AGENT_DIR/agent" 2>/dev/null || true
sleep 1
echo " [OK] 已停止"
else
echo " [2/3] Agent 未在运行"
fi
# 3. Remove files
echo " [3/3] 清理文件..."
REMOVED=""
if [ -d "$UCLAW_DIR" ]; then
rm -rf "$UCLAW_DIR"
REMOVED="$REMOVED ~/.uclaw"
echo " [OK] 已删除 ~/.uclaw"
fi
if [ -d "$AGENT_DIR" ]; then
rm -rf "$AGENT_DIR"
REMOVED="$REMOVED /tmp/uclaw"
echo " [OK] 已删除 /tmp/uclaw"
fi
if [ -z "$REMOVED" ]; then
echo " [OK] 没有找到需要清理的文件"
fi
echo ""
echo " =========================================="
echo " 卸载完成!已彻底清理。"
echo " =========================================="
echo ""
echo " 想重装?运行:"
echo " curl -fsSL https://u-claw.org/install.sh | bash"
echo ""