Clawdbot Sync
2026-03-31
新闻来源:网淘吧
围观:11
电脑广告
手机广告
Clawdbot 同步更新 🔄
通过 Tailscale/SSH 在多个 Clawdbot 实例之间同步记忆、偏好和技能。
功能特性
- 双向同步于 Clawdbot 实例之间
- 智能冲突解决(最新版本优先,或合并日志)
- 选择性同步—— 选择要同步的内容
- 节点发现通过 Tailscale
- 试运行模式用于预览
命令列表
| 命令 | 操作 |
|---|---|
/sync | 显示状态和已配置的节点 |
/sync status | 检查与所有节点的连接 |
/sync now [节点] | 与节点(或所有节点)同步 |
/sync push [节点] | 推送本地更改到对等设备 |
/sync pull [peer] | 从对等设备拉取更改 |
/sync add <name> <host> [user] [path] | 添加一个对等设备 |
/sync remove <name> | 移除一个对等设备 |
/sync diff [peer] | 显示将会发生哪些更改 |
/sync history | 显示同步历史 |
设置
1. 配置对等设备
handler.sh add mac-mini 100.95.193.55 clawdbot /Users/clawdbot/clawd $WORKSPACE
handler.sh add server 100.89.48.26 clawdbot /home/clawdbot/clawd $WORKSPACE
2. 确保SSH访问权限
两台机器都需要SSH密钥认证:

ssh-copy-id clawdbot@100.95.193.55
3. 测试连接
handler.sh status $WORKSPACE
同步内容
| 项目 | 默认 | 备注 |
|---|---|---|
memory/ | ✅ 是 | 所有记忆文件和技能数据 |
MEMORY.md | ✅ 是 | 主内存文件 |
USER.md | ✅ 是 | 用户配置文件 |
IDENTITY.md | ❌ 否 | 每个实例都有其独立的身份标识 |
技能/ | ⚙️ 可选 | 已安装技能 |
配置/ | ❌ 否 | 实例特定配置 |
处理器命令
handler.sh status $WORKSPACE # Check peers and connection
handler.sh sync <peer> $WORKSPACE # Bi-directional sync
handler.sh push <peer> $WORKSPACE # Push to peer
handler.sh pull <peer> $WORKSPACE # Pull from peer
handler.sh diff <peer> $WORKSPACE # Show differences
handler.sh add <name> <host> <user> <path> $WS # Add peer
handler.sh remove <name> $WORKSPACE # Remove peer
handler.sh history $WORKSPACE # Sync history
handler.sh auto <on|off> $WORKSPACE # Auto-sync on heartbeat
冲突解决
- 基于时间戳:较新的文件胜出
- 日志合并:仅追加文件会被合并
- 跳过冲突:跳过冲突文件的选项
- 手动解决:标记以供审查
数据文件
存储在$WORKSPACE/memory/clawdbot-sync/:
| 文件 | 用途 |
|---|---|
peers.json | 已配置的对等节点 |
history.json | 同步历史日志 |
config.json | 同步偏好设置 |
conflicts/ | 待审核的冲突文件 |
示例会话
User: /sync now mac-mini
Bot: 🔄 Syncing with mac-mini (100.95.193.55)...
📤 Pushing: 3 files changed
• memory/streaming-buddy/preferences.json
• memory/2026-01-26.md
• MEMORY.md
📥 Pulling: 1 file changed
• memory/2026-01-25.md
✅ Sync complete! 4 files synchronized.
要求
rsync(用于高效文件同步)ssh(用于安全传输)- 对等节点间需具备Tailscale或直接网络访问
- 已配置SSH密钥认证
安全性
- 所有传输均使用SSH(加密)
- 不存储密码(仅基于密钥认证)
- 同步路径限制在工作空间内
- 系统文件从不被同步
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~