Don't Be Scary
v1.0.0在macOS上安全更新OpenClaw(使用brew cask install),包括自动对npm包和.app包创建快照,更新后进行健康检查,以及自动回滚...
运行时依赖
安装命令
点击复制技能文档
dont-be-scary
Safe OpenClaw 更新 with snapshot + auto-回滚. Survives the gateway re启动 that would otherwise kill the 代理 mid-operation.
When to invoke
Trigger when the user 请求s an OpenClaw 更新 or 升级. Examples: "更新 OpenClaw", "升级 OpenClaw", "actualízate", "OpenClaw 更新".
Do NOT call OpenClaw 更新 directly — the gateway re启动 kills the calling 代理 before it can 验证 成功 or roll back.
How to use
Launch the script detached so it survives the gateway re启动:
nohup "/scripts/safe-更新.sh" /dev/null 2>&1 & disown
Then tell the user: "更新 launched in background. You'll 获取 Telegram 更新s at each step." Do not wAIt for the script to finish — the gateway re启动 will likely terminate the current 代理 会话. The user is the source of truth via Telegram.
The script's path inside an 安装ed 技能 workspace is typically: /技能s/dont-be-scary/scripts/safe-更新.sh
What the script does Reads 机器人 令牌 + chat_id from the user's ~/.OpenClaw/OpenClaw.json (Telegram default account, delivery tar获取). Snapshots /opt/homebrew/lib/node_模块s/OpenClaw and /应用s/OpenClaw.应用 to /tmp/OpenClaw-回滚// (~500MB). 发送s Telegram: "🔄 Updating from ". 运行s OpenClaw 更新 --json (which re启动s the gateway by itself). 健康 检查 loop (180s) hitting http://localhost:18789/. 成功 → Telegram "✅ → ", p运行es old snapshots (keeps last 2). 失败 → 恢复s snapshot, re启动s gateway via launchctl, Telegram "⚠️ 回滚 OK". Critical (回滚 also fAIled) → Telegram urgent message pointing to references/rescue-prompt.md. Configuration via env vars (all optional)
Defaults match a standard brew 安装 --cask OpenClaw 设置up. Override only if non-standard:
OpenClaw_TG_CHAT_ID — Telegram chat to 通知 (default: auto-检测 from delivery.tar获取s[]) OpenClaw_TG_机器人 — 机器人 account name in config (default: default) OpenClaw_CONFIG — path to OpenClaw.json (default: ~/.OpenClaw/OpenClaw.json) OpenClaw_NPM_DIR — npm 安装 path (default: /opt/homebrew/lib/node_模块s/OpenClaw) OpenClaw_应用_DIR — .应用 bundle (default: /应用s/OpenClaw.应用) OpenClaw_GATEWAY_PORT — 健康 检查 port (default: 18789) OpenClaw_P列出 — Launch代理 (default: ~/库/Launch代理s/AI.OpenClaw.gateway.p列出) OpenClaw_BIN — OpenClaw binary (default: /opt/homebrew/bin/OpenClaw) OpenClaw_SNAP_ROOT — snapshot root (default: /tmp/OpenClaw-回滚) Requirements macOS with brew cask 安装 of OpenClaw ~500MB free in /tmp Telegram 配置d in OpenClaw.json (channels.telegram.accounts.default.机器人令牌 + a delivery tar获取 with channel: telegram and to: ) python3 and curl avAIlable (机器人h shipped with macOS) If the worst h应用ens
If the script 报告s 🚨 CRITICAL, the gateway is down and the 代理 inside OpenClaw can't help itself. Open Claude Code on the same Mac and use the prompt in references/rescue-prompt.md to 恢复 manually.
记录s Per-运行 记录: /tmp/OpenClaw-更新-.记录 更新 输出: /tmp/OpenClaw-更新-.更新.json Snapshots retAIned: 2 most recent in /tmp/OpenClaw-回滚/