diff --git a/website/agent.html b/website/agent.html index 021a226..43394e5 100644 --- a/website/agent.html +++ b/website/agent.html @@ -30,6 +30,9 @@ .faq { background: #16213e; border-radius: 12px; padding: 20px; margin: 20px 0; } .faq h3 { color: #e94560; margin-bottom: 8px; font-size: 15px; } .faq p { color: #aaa; font-size: 14px; margin-bottom: 15px; } + .uninstall-section { background: #16213e; border-radius: 12px; padding: 20px; margin: 20px 0; border: 1px solid #e9456033; } + .uninstall-section h2 { color: #f0ad4e; margin-bottom: 12px; font-size: 18px; } + .uninstall-section p { color: #ccc; margin-bottom: 10px; } img.guide-img { width: 100%; border-radius: 8px; margin: 10px 0; } @@ -130,6 +133,36 @@

Device ID(如 desktop-a3f2)发给技术支持即可。

+ +
+

一键卸载

+

如需彻底清理 Agent(停止进程 + 删除文件),复制对应命令运行:

+ +
+
+ irm https://u-claw.org/agent.ps1 | iex -Args '--uninstall' + +
+

或者直接关闭 PowerShell 窗口,Agent 也会自动停止并清理

+
+ +
+
+ curl -fsSL https://u-claw.org/agent.sh | bash -s -- --uninstall + +
+

会停止 Agent 进程并删除 /tmp/uclaw 目录

+
+ +
+
+ curl -fsSL https://u-claw.org/agent.sh | bash -s -- --uninstall + +
+

会停止 Agent 进程并删除 /tmp/uclaw 目录

+
+
+

安全说明

@@ -181,6 +214,10 @@ document.querySelectorAll('[id^="cmd-"][id$="-wrap"]').forEach(c => c.classList.remove('active')); const cmdName = name === 'win' ? 'win' : name === 'mac' ? 'mac' : 'linux'; document.getElementById('cmd-' + cmdName + '-wrap').classList.add('active'); + + // Update uninstall commands + document.querySelectorAll('[id^="uninstall-"][id$="-wrap"]').forEach(c => c.classList.remove('active')); + document.getElementById('uninstall-' + cmdName + '-wrap').classList.add('active'); } function copyCmd(id) { diff --git a/website/agent.sh b/website/agent.sh index a5677e1..7ec6cd0 100644 --- a/website/agent.sh +++ b/website/agent.sh @@ -1,7 +1,9 @@ #!/bin/bash # ============================================================ # U-Claw Remote Agent (macOS / Linux) -# Usage: curl -fsSL https://u-claw.org/agent.sh | bash +# Usage: +# Install & run: curl -fsSL https://u-claw.org/agent.sh | bash +# Uninstall: curl -fsSL https://u-claw.org/agent.sh | bash -s -- --uninstall # ============================================================ set -e @@ -12,12 +14,54 @@ TIMEOUT_HOURS=2 AGENT_DIR="/tmp/uclaw" AGENT_PATH="$AGENT_DIR/agent" -# Detect OS +# ---- Uninstall mode ---- +if [ "${1:-}" = "--uninstall" ]; then + echo "" + echo " ==========================================" + echo " U-Claw Agent — Uninstall" + echo " ==========================================" + echo "" + # Kill running agent processes + if pgrep -f "$AGENT_PATH" >/dev/null 2>&1; then + echo " [1/2] Stopping running agent..." + pkill -f "$AGENT_PATH" 2>/dev/null || true + sleep 1 + echo " [OK] Agent stopped" + else + echo " [1/2] No running agent found" + fi + # Remove files + if [ -d "$AGENT_DIR" ]; then + echo " [2/2] Removing $AGENT_DIR ..." + rm -rf "$AGENT_DIR" + echo " [OK] Removed" + else + echo " [2/2] Nothing to remove ($AGENT_DIR not found)" + fi + echo "" + echo " Uninstall complete. All clean!" + echo "" + exit 0 +fi + +# ---- Detect OS & architecture ---- OS=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m) + case "$OS" in - darwin) DOWNLOAD_URL="https://u-claw.org/downloads/agent" ;; - linux) DOWNLOAD_URL="https://u-claw.org/downloads/agent-linux" ;; - *) echo " [FAIL] Unsupported OS: $OS"; exit 1 ;; + darwin) + case "$ARCH" in + arm64|aarch64) DOWNLOAD_URL="http://47.107.130.152/downloads/agent" ;; + x86_64|amd64) DOWNLOAD_URL="http://47.107.130.152/downloads/agent-mac-intel" ;; + *) echo " [FAIL] Unsupported Mac architecture: $ARCH"; exit 1 ;; + esac + ;; + linux) + DOWNLOAD_URL="http://47.107.130.152/downloads/agent-linux" + ;; + *) + echo " [FAIL] Unsupported OS: $OS"; exit 1 + ;; esac # Generate device ID @@ -39,10 +83,13 @@ echo " 3. Allow remote command execution for support" echo " 4. Press Ctrl+C or close terminal to disconnect" echo "" printf " Continue? (y/N) " -read -r confirm -if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then - echo " Cancelled." - exit 0 +if read -r confirm < /dev/tty 2>/dev/null; then + if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then + echo " Cancelled." + exit 0 + fi +else + echo "y (auto)" fi echo "" diff --git a/website/downloads/agent-mac-intel b/website/downloads/agent-mac-intel new file mode 100755 index 0000000..a188221 Binary files /dev/null and b/website/downloads/agent-mac-intel differ diff --git a/website/guide.html b/website/guide.html index 67910a9..8fd63fd 100644 --- a/website/guide.html +++ b/website/guide.html @@ -380,12 +380,46 @@ bash ~/.uclaw/start.command
改模型?编辑 ~/.uclaw/data/.openclaw/openclaw.json,改完自动生效(热加载)
-

卸载

-
# Mac / Linux
+

一键卸载

+

不想用了?一行命令彻底清理,不留残余。

+ +
+

Mac / Linux

+
curl -fsSL https://u-claw.org/uninstall.sh | bash
+

或者手动执行:

+
# 1. 停止 OpenClaw(如果正在运行)
+pkill -f openclaw 2>/dev/null
+
+# 2. 删除安装目录(包含所有数据)
 rm -rf ~/.uclaw
 
-# Windows (PowerShell)
-Remove-Item -Recurse -Force "$env:USERPROFILE\.uclaw"
+# 3. 确认干净 +ls ~/.uclaw 2>/dev/null || echo "已完全卸载 ✓"
+
+ +
+

Windows(PowerShell 管理员)

+
irm https://u-claw.org/uninstall.ps1 | iex
+

或者手动执行:

+
# 1. 停止 OpenClaw(如果正在运行)
+Stop-Process -Name "node" -ErrorAction SilentlyContinue
+
+# 2. 删除安装目录(包含所有数据)
+Remove-Item -Recurse -Force "$env:USERPROFILE\.uclaw"
+
+# 3. 确认干净
+if (-not (Test-Path "$env:USERPROFILE\.uclaw")) { Write-Host "已完全卸载 ✓" }
+
+ +
+卸载前请注意: + +

与其他安装方式对比

@@ -1844,7 +1878,7 @@ docker compose up -d

安装遇到问题?模型配不好?技能不生效?扫码加微信,专业工程师远程帮你搞定。

-

方式一:Agent 远程控制(推荐)

+

一键安装 — Agent 远程控制(推荐)

轻量快速,单文件无依赖,一行命令即可上线:

Windows(PowerShell)

@@ -1857,6 +1891,22 @@ docker compose up -d

📖 不会操作?查看图文教程 →

+
+

一键卸载 — 彻底清理 Agent

+

维护完成后想彻底清理?一行命令搞定:

+ +

Windows(PowerShell)

+
irm https://u-claw.org/agent.ps1 | iex -Args '--uninstall'
+ +

Mac / Linux

+
curl -fsSL https://u-claw.org/agent.sh | bash -s -- --uninstall
+ +

会停止正在运行的 Agent 进程并删除所有下载的文件。

+
+其实通常不需要手动卸载:关闭终端窗口 Agent 就会自动停止并清理文件;2 小时后自动断开;文件在临时目录,系统重启也会清理。 +
+
+

方式二:SSH 深度远程(高级)

需要文件传输、完整终端等深度操作时使用: