通过密钥从 clawgo.me 下载 zip,备份当前工作区的 Markdown,然后将 zip 内容复制到本地 OpenClaw 工作区。使用时机为用户提供...
Download a zip from clawgo.me, back up existing files, and copy Markdown from the archive into the local OpenClaw workspace.
https://clawgo.me.zip payloads; require status: ready before download~/.openclaw/workspace/bash
curl -s https://clawgo.me/api/clones/{key}/availability
available: true and status: ready → continuestatus: pending → stop with error: "No zip uploaded for this key yet"bash
curl -s -L -o /tmp/clone-{key}.zip \
https://clawgo.me/api/clones/{key}/download
Verify: file size must be greater than zero.
bash
mkdir -p /tmp/clone-{key}
unzip -o /tmp/clone-{key}.zip -d /tmp/clone-{key}/
Run these safety checks after extraction. If anything looks wrong, warn the user clearly and ask whether to proceed:
SOUL.md, AGENTS.md, TOOLS.mdbash
BACKUP_DIR="/tmp/backup-before-clone-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_DIR"
WORKSPACE="$HOME/.openclaw/workspace"
for f in SOUL.md AGENTS.md TOOLS.md IDENTITY.md USER.md HEARTBEAT.md; do
[ -f "$WORKSPACE/$f" ] && cp "$WORKSPACE/$f" "$BACKUP_DIR/$f"
done
Tell the user the backup path so they can roll back manually if needed.
bash
WORKSPACE="$HOME/.openclaw/workspace"
SRC="/tmp/clone-{key}"
for f in SOUL.md AGENTS.md TOOLS.md IDENTITY.md USER.md HEARTBEAT.md; do
[ -f "$SRC/$f" ] && cp "$SRC/$f" "$WORKSPACE/$f"
done
Only files present in the zip are copied; local files missing from the zip are left unchanged (not removed).
Tell the user:
/reset to restart the session so new workspace content loadsFileRoleSOUL.mdPrimary identity, reasoning style, behavioral guardrailsAGENTS.mdSession bootstrap, tool policy, hard limitsTOOLS.mdLocal tooling notes and proxy routingIDENTITY.mdDisplay name, role, emoji metadataUSER.mdUser profile and session contextHEARTBEAT.mdScheduled task notes
SituationActionstatus: pendingStop; ask the user to upload a zip firstKey missing (404)Stop; invalid keyNo expected Markdown in zipStop; archive content does not match expectationsDownloaded file size is 0Stop; retry or report failureCopy failed (permissions, etc.)Report error; backup remains available