Install
openclaw skills install @lyy4916/workbuddy-multi-machine-syncSet up WorkBuddy config sync across 3+ Macs with machine naming, conflict resolution, and status tracking. Supports GitHub or iCloud as backend. Triggers: 多机同步, 三台电脑同步, 多台 Mac 同步 WorkBuddy, multi-machine sync, 3+ devices sync, 多台电脑配置同步, team sync WorkBuddy. Includes machine registry, per-machine commit tagging, stale lock detection, and a status command to see which machines are active.
openclaw skills install @lyy4916/workbuddy-multi-machine-syncExtend WorkBuddy config sync to three or more Macs. Built on top of the two-machine sync skill, this adds:
studio,
laptop, office) for easy identification in commit logsmachines.json file tracks all registered machines
and their last-sync timestampswbstatus shows which machines are registered, when
they last synced, and which is currently active| Factor | Two-Machine Sync | Multi-Machine Sync |
|---|---|---|
| Machine count | 2 | 3+ |
| Machine naming | Not needed | Yes (human-readable labels) |
| Machine registry | Not needed | machines.json |
| Conflict probability | Low | Higher (more concurrent edits) |
| Status tracking | Manual | wbstatus command |
| Backend | GitHub or iCloud | GitHub or iCloud |
If you only have 2 machines, use workbuddy-multi-device-sync (simpler).
Upgrade to this skill when adding a 3rd machine.
Same as the two-machine skill. Additionally:
.machine-name — this machine's labelmachines.json — registry of all machinesbinaries/, workbuddy.db, .mcp.json, sessions/, logs/, traces/,
credentials/, memory/, daemon state filesFollow the two-machine skill (workbuddy-multi-device-sync) for Mac A setup,
then add multi-machine enhancements:
# Set a human-readable name for this machine
echo "studio" > ~/.workbuddy/.machine-name
Choose short, descriptive names: studio, laptop, office, home, etc.
# Create machines.json with this machine registered
MACHINE_NAME=$(cat ~/.workbuddy/.machine-name)
HOSTNAME=$(hostname)
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
cat > ~/.workbuddy/machines.json << EOF
{
"machines": [
{
"name": "$MACHINE_NAME",
"hostname": "$HOSTNAME",
"registered": "$TIMESTAMP",
"last_sync": "$TIMESTAMP",
"status": "active"
}
]
}
EOF
scripts/auto-sync-multi.sh to ~/.workbuddy/auto-sync.shscripts/start-sync-daemon.sh to ~/.workbuddy/start-sync-daemon.shscripts/machine-status.sh to ~/.workbuddy/machine-status.shchmod +x ~/.workbuddy/auto-sync.sh ~/.workbuddy/start-sync-daemon.sh ~/.workbuddy/machine-status.sh
The auto-sync-multi.sh script differs from the two-machine version:
auto-sync <timestamp> from <machine>machines.json with last_sync timestamp on each syncAppend to ~/.bash_profile (or ~/.zshrc):
# WorkBuddy multi-machine sync shortcuts
alias wbsync='cd ~/.workbuddy && git add -A && git commit -m "sync $(date +%m%d-%H%M) from $(cat ~/.workbuddy/.machine-name 2>/dev/null || echo $(hostname))" && git push origin main'
alias wbpull='cd ~/.workbuddy && git pull --rebase origin main'
alias wbstatus='bash ~/.workbuddy/machine-status.sh'
# WorkBuddy auto-sync — daemon keepalive + sync on terminal open
if [ -f ~/.workbuddy/start-sync-daemon.sh ]; then
bash ~/.workbuddy/start-sync-daemon.sh 2>/dev/null
fi
if [ -t 1 ] && [ -f ~/.workbuddy/auto-sync.sh ]; then
_wb_now=$(date +%s)
_wb_last=$(cat ~/.workbuddy/.last-auto-sync 2>/dev/null || echo 0)
if [ $((_wb_now - _wb_last)) -gt 300 ]; then
bash ~/.workbuddy/auto-sync.sh >/dev/null 2>&1 &
echo $_wb_now > ~/.workbuddy/.last-auto-sync
fi
unset _wb_now _wb_last
fi
Ensure these are NOT in .gitignore (they should be synced):
.machine-name — machine labelmachines.json — machine registryEnsure these ARE in .gitignore (already covered by template):
.auto-sync.log, .sync-daemon.pid, .last-auto-sync, start-sync-daemon.shcd ~/.workbuddy
git add -A
git commit -m "init: multi-machine sync setup on $(cat .machine-name)"
git push origin main
For each additional machine:
Use scripts/setup-machine.sh.template as the setup script. Replace:
<REMOTE_URL> → GitHub repo URL or iCloud bare repo path<REMOTE_NAME> → origin for GitHub, icloud for iCloud<GITHUB_USERNAME> / <GITHUB_TOKEN> → only for GitHub backendThen on the new machine:
# For GitHub backend:
curl -sSL -H "Authorization: token <TOKEN>" \
"https://raw.githubusercontent.com/<USER>/wb-sync/main/wb-setup-machine.sh" | bash
# For iCloud backend:
bash wb-setup-machine.sh # after AirDrop or manual copy
The setup script will:
machines.json# Check status of all machines
wbstatus
# Output example:
# ┌──────────┬──────────────────────┬──────────┬─────────────────────┐
# │ Machine │ Hostname │ Status │ Last Sync │
# ├──────────┼──────────────────────┼──────────┼─────────────────────┤
# │ studio │ pascalliu-mac-studio │ active │ 2026-08-01 12:30:15 │
# │ laptop │ pascalliu-mbp │ active │ 2026-08-01 12:28:42 │
# │ office │ pascalliu-imac │ stale │ 2026-07-30 18:15:00 │
# └──────────┴──────────────────────┴──────────┴─────────────────────┘
With 3+ machines, conflicts are more likely. The auto-sync script uses this strategy:
git pull --rebase — replays local commits on top of remote~/.workbuddy/.sync-conflicts.log
for manual reviewcd ~/.workbuddy
git status # see conflicted files
# edit files to resolve...
git add -A
git rebase --continue
git push origin main
machines.json:
{
"machines": [
{
"name": "studio",
"hostname": "pascalliu-mac-studio",
"registered": "2026-08-01T00:00:00Z",
"last_sync": "2026-08-01T12:30:15Z",
"status": "active"
},
{
"name": "laptop",
"hostname": "pascalliu-mbp",
"registered": "2026-08-01T01:00:00Z",
"last_sync": "2026-08-01T12:28:42Z",
"status": "active"
}
]
}
Each machine updates its own entry on every sync. Stale entries (machines not seen for > 30 days) can be cleaned up manually.
auto-sync-multi.sh — Enhanced sync script with machine tagging and conflict handlingstart-sync-daemon.sh — Daemon launcher (same as two-machine version)machine-status.sh — Display registered machines and their sync statussetup-machine.sh.template — Setup script template for any new machine (Nth machine)gitignore-template — .gitignore for multi-machine setupmulti-machine-architecture.md — Architecture, conflict handling, and migration guide