Git优先的备份、迁移、恢复及令牌保护的归档服务,完整 Git 原生工作流(git init/push/pull/…)
爪音 Skill. clawsync 为 OpenClaw 提供备份/迁移工作流程, 并带有 Git- 内存同步和更安全的恢复行为. .是一项面向实际任务的技能,主要用于Install.;One- 点击安装( GitHub Releases).;
从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。
执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。
clawsync 为 OpenClaw 提供基于 Git 的备份/迁移工作流,具备原生 Git 同步能力与更安全的恢复行为。
curl -fsSL "https://raw.githubusercontent.com/linsheng9731/clawsync/main/scripts/install.sh" | CLAWSYNC_GH_REPO="linsheng9731/clawsync" bash
安装指定版本:
curl -fsSL "https://raw.githubusercontent.com/linsheng9731/clawsync/main/scripts/install.sh" | CLAWSYNC_GH_REPO="linsheng9731/clawsync" bash -s -- v0.1.8
默认安装路径:~/.local/bin/clawsync(可通过 CLAWSYNC_INSTALL_DIR 覆盖)。请确保该路径已加入您的 PATH 环境变量。
npm install npm run build npm link clawsync --help
clawsync git init、push、pull 和 merge 命令,支持基于分支的备份与恢复。--include、--exclude、--ignore-paths 及 --workspace-include-globs 参数,精确控制归档内容。overwrite(覆盖)、skip(跳过)及本地优先的 merge(合并)模式,并默认启用多重安全机制(--dry-run、恢复前快照、网关令牌保留等)。当用户提出以下需求时,请使用本技能:
clawsync profile full-migrate --dry-run clawsync profile full-migrate
默认输出路径:~/.openclaw/migrations
默认行为:完整收集 workspace/ 目录用于迁移。
clawsync git init --repo-url--repo-dir ~/.clawsync-repo clawsync push --repo-dir ~/.clawsync-repo clawsync pull --repo-dir ~/.clawsync-repo --branch --dry-run clawsync pull --repo-dir ~/.clawsync-repo --branch --yes clawsync git prune-branches --repo-dir ~/.clawsync-repo --keep-days 30 --dry-run
clawsync unpack --from /path/to/archive.tar.gz --dry-run clawsync unpack --from /path/to/archive.tar.gz --yes
clawsync serve --token "" --port 7373
可用端点:
GET /health(无需 token)GET /(简易 Web UI,需 token)GET /archives(需 token)GET /download/(需 token)POST /upload(需 token)POST /backup(仅限 localhost)POST /restore/?dry_run=1|confirm=1 (仅限 localhost)对于 unpack / pull / merge 操作,CLI 默认启用以下安全机制:
--yes)/tmp 创建快照(除非指定 --no-pre-snapshot)gateway.auth.token(除非指定 --overwrite-gateway-token)source env-export.sh 命令为用户执行恢复/迁移操作时,请遵循以下步骤:
--dry-run 参数的命令。--yes 参数执行。source 命令。openclaw.json、凭据、会话信息等)。serve --token 中的 token 属于敏感信息,请勿公开分享。serve 端点直接暴露至公网。相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.3万人学习
共49课时 | 82.7万人学习
最新文章