名称: claw-sync
描述: OpenClaw 记忆与工作区的安全同步工具。使用 /sync 推送,/restore 拉取,/sync-status 检查状态。支持版本化备份与灾难恢复。
commands:
- name: sync
description: 将记忆与技能推送至远程仓库
usage: /sync [--dry-run]
run: node skills/claw-sync/index.js sync
- name: restore
description: 从远程仓库恢复记忆与技能
usage: /restore [latest|<版本号>] [--force]
run: node skills/claw-sync/index.js restore
- name: sync-status
description: 显示同步配置与本地备份信息
usage: /sync-status
run: node skills/claw-sync/index.js status
- name: sync-list
description: 列出所有可用的备份版本
usage: /sync-list
run: node skills/claw-sync/index.js list
为 OpenClaw 记忆与工作区提供安全、版本化的同步功能。
将您的记忆与技能推送至远程仓库。
/sync → 推送并创建版本化备份
/sync --dry-run → 预览将要同步的内容
从远程仓库恢复记忆与技能。
/restore → 恢复最新版本
/restore latest → 同上
/restore backup-20260202-1430 → 恢复指定版本
/restore latest --force → 跳过确认提示
显示同步配置与本地备份信息。
/sync-status
列出所有可用的备份版本。
/sync-list
| 文件 | 说明 |
|---|---|
MEMORY.md |
长期记忆 |
USER.md |
用户档案 |
SOUL.md |
智能体角色设定 |
IDENTITY.md |
智能体身份信息 |
TOOLS.md |
工具配置 |
AGENTS.md |
工作区规则 |
memory/*.md |
日常日志 |
skills/* |
自定义技能 |
openclaw.json - 包含 API 密钥.env - 包含敏感信息创建配置文件 ~/.openclaw/.backup.env:
BACKUP_REPO=https://github.com/用户名/仓库名
BACKUP_TOKEN=ghp_你的令牌