Sync your Claude Code / OpenClaw skills, settings, commands, and workspace files across multiple Macs + iPhone — automatically.
A battle-tested, open-source toolkit using a Git + Syncthing dual-channel architecture to keep three devices (MacBook Pro + Mac Mini + iPhone) in perfect sync. Deploy once, runs in the background, zero manual effort.
- What Problem Does This Solve
- Architecture
- Features
- Prerequisites
- Step 1: Deploy MacBook Pro
- Step 2: Deploy Mac Mini
- Step 3: Pair the Two Macs
- Step 4: Deploy iPhone
- Verify Everything Works
- Daily Usage
- Command Reference
- Configuration
- Conflict Handling
- Telegram Notifications
- Project Structure
- FAQ
- Uninstall
- License
If you use Claude Code or OpenClaw on multiple devices, you've probably hit these problems:
| Pain Point | What Happens |
|---|---|
| Skills don't transfer | A Skill learned on Mac Mini via Telegram isn't available on MacBook Pro |
| Settings drift | Claude Code configs diverge across machines over time |
| Docs aren't shared | Research reports on MacBook Pro are invisible to Mac Mini's Agent |
| Phone is an island | Can't check any docs or notes when you're away from your computer |
| Manual Git is unreliable | You won't remember to push when you're busy coding; Agents never will |
This toolkit solves all of the above with automatic dual-channel sync.
MacBook Pro Mac Mini iPhone
+-----------------------+ +-----------------------+ +------------------+
| | | | | |
| ~/.claude/ | Git | ~/.claude/ | | |
| ├── skills/ <---------> ├── skills/ | | |
| ├── settings.json | (auto) | ├── settings.json | | |
| ├── commands/ | | ├── commands/ | | |
| ├── agents/ | | ├── agents/ | | |
| └── plugins/ | | └── plugins/ | | |
| | | | | |
| ~/claudecode_ |Syncthing| ~/claudecode_ |Syncthing| Obsidian Vault/ |
| workspace/ <---------> workspace/ <---------> (read-only) |
| ├── projects/ | (live) | ├── projects/ | (live) | ├── projects/ |
| ├── docs/ | | ├── docs/ | | ├── docs/ |
| └── notes/ | | └── notes/ | | └── notes/ |
| | | | | |
| Background: | | Background: | | Apps: |
| • launchd x3 | | • launchd x3 | | • Mobius Sync |
| • syncthing | | • syncthing | | • Obsidian |
+-----------------------+ +-----------------------+ +------------------+
Dual-channel design:
| Channel | What It Syncs | Technology | Strengths |
|---|---|---|---|
| Git channel | Claude Code configs (Skills, Settings, Commands, Agents, Plugins) | Git push/pull + launchd timer + fswatch realtime | Full version history, rollback support |
| Syncthing channel | Workspace files (code, docs, notes) | Syncthing P2P bidirectional | Sub-second realtime sync, incremental transfer |
- Git config sync — Skills, Settings, Commands, Agents, Plugins synced via Git with full version history
- Real-time file watching — fswatch detects config changes, auto-pushes within seconds
- Syncthing P2P sync — Workspace files sync in real-time, peer-to-peer encrypted, no third-party servers
- iPhone read-only sync — Browse all docs on your phone via Mobius Sync + Obsidian
- Conflict resolution — Keep-Local / Keep-Remote / Manual strategies with
.conflictbackup files - Version rollback — Roll back any config file to any previous version with one command
- Deployment manager — Track long-running services, optionally auto-restart on code changes
- Telegram notifications — Get notified on push, pull, conflicts, and errors
- launchd background services — Three persistent services that auto-start on boot and self-heal on crash
- Log rotation — 10MB rotation with 10 archive retention
- macOS 12 Monterey or later
- Homebrew installed
- Git installed (comes with macOS or via Homebrew)
- Claude Code installed and working
- A private repository for storing Claude Code configs (e.g.,
claude-config-sync) - Both Macs can access it via SSH
- Mobius Sync (Syncthing iOS client)
- Obsidian (Markdown reader)
# Option A: CLI (requires gh)
gh repo create claude-config-sync --private
# Option B: Create at https://github.com/new
# Name: claude-config-sync, Visibility: Privatessh -T git@github.com
# Should print: "Hi xxx! You've successfully authenticated"git clone https://github.com/yike-gunshi/openclaw-sync-toolkit.git ~/openclaw-sync-toolkitbash ~/openclaw-sync-toolkit/scripts/setup.sh \
--name macbook-pro \
--remote git@github.com:YOUR_USER/claude-config-sync.gitThe script runs 6 phases automatically:
Phase 1/6: Install dependencies (fswatch, jq, syncthing)
Phase 2/6: Clone config repo to ~/.claude-sync/repo/
Phase 3/6: Deploy sync scripts to ~/.claude-sync/scripts/
Phase 4/6: Initial pull of remote config to ~/.claude/
Phase 5/6: Install 3 launchd background services
Phase 6/6: Start Syncthing and print device ID
The script prints your device ID at the end — copy and save it for the next step.
# To retrieve it later:
syncthing --device-idgit clone https://github.com/yike-gunshi/openclaw-sync-toolkit.git ~/openclaw-sync-toolkitbash ~/openclaw-sync-toolkit/scripts/setup.sh \
--name mac-mini \
--remote git@github.com:YOUR_USER/claude-config-sync.git \
--partner-device "MACBOOK_PRO_SYNCTHING_DEVICE_ID"The script prints Mac Mini's device ID — save it too.
Syncthing requires bidirectional confirmation. Step 2 made Mac Mini aware of MacBook Pro. Now do the reverse.
Open Syncthing Web UI:
open http://127.0.0.1:8384- Click "+ Add Remote Device" (bottom right)
- Paste Mac Mini's device ID
- Name:
mac-mini - Click Save
In the Syncthing Web UI:
- Click "+ Add Folder"
- Fill in:
- Folder Label:
Claude Code Workspace - Folder ID:
claudecode-workspace(must match Mac Mini) - Folder Path:
~/claudecode_workspace
- Folder Label:
- Go to Sharing tab, check
mac-mini - Click Save
When the folder status shows "Up to Date" in the Web UI, sync is complete.
From the App Store:
- Mobius Sync (Syncthing iOS client)
- Obsidian (Markdown reader)
- Open Obsidian → "Create new vault"
- Name it anything (e.g.,
Workspace) - Storage: "On My iPhone" (important: NOT iCloud)
- Exit Obsidian for now
-
Open Mobius Sync
-
Add Mac Mini as a device:
- Devices → "+"
- Paste Mac Mini's Syncthing device ID
- Name:
mac-mini - Save
-
Create the shared folder (important: create FROM iPhone, don't wait for Mac's invitation):
- Folders → "+"
- Folder ID:
claudecode-workspace(must match exactly) - Folder Label:
Claude Code Workspace - Tap "Pick External Folder" → navigate to
On My iPhone→Obsidian→Workspace - In Sharing, check
mac-mini - Save
Tip: Don't try to send a share invitation from Mac to iPhone — Mobius Sync's iOS push notifications are unreliable. Always create the folder from the iPhone side with the matching Folder ID. It connects instantly.
In Mac Mini's Syncthing Web UI (http://127.0.0.1:8384):
- Accept the incoming device request from iPhone
- Accept the shared folder request, confirm path is
~/claudecode_workspace
Once complete, open Obsidian on iPhone — you should see the full directory structure matching your Mac.
For a complete P2P mesh (any two devices can sync directly), also add MacBook Pro's device ID in Mobius Sync.
# Check status on MacBook Pro
~/.claude-sync/scripts/sync.sh status
# Manual push
~/.claude-sync/scripts/sync.sh push
# Manual pull on Mac Mini
~/.claude-sync/scripts/sync.sh pull
# Confirm skills match
ls ~/.claude/skills/# Create test file on MacBook Pro
echo "sync test $(date)" > ~/claudecode_workspace/sync-test.txt
# Check on Mac Mini after a few seconds
cat ~/claudecode_workspace/sync-test.txt
# Clean up
rm ~/claudecode_workspace/sync-test.txt- Create a test
.mdfile in~/claudecode_workspace/ - Open Mobius Sync on iPhone to trigger sync
- Open Obsidian and search for the file
- Clean up after verification
launchctl list | grep claude-sync
# Expect 3 entries with exit code 0After deployment, no manual action is needed. Everything runs automatically:
| Scenario | What Happens | Your Action |
|---|---|---|
| Create a new Skill on MacBook Pro | fswatch detects → 5s debounce → auto git push → Mac Mini pulls within 5 min | Nothing |
| Agent generates files on Mac Mini | Syncthing syncs to MacBook Pro in sub-seconds | Nothing |
| Edit workspace files | Syncthing syncs across all devices | Nothing |
| Want to read docs on phone | Open Obsidian on iPhone | Open Mobius Sync briefly if files don't appear |
| Both machines edit same config | Local kept, remote saved as .conflict |
Resolve when notified (rare) |
sync.sh init # Initialize sync system
sync.sh push # Push local config to remote
sync.sh pull # Pull remote config to local
sync.sh status # View sync status
sync.sh log [filename] # View sync log or file history
sync.sh rollback <file> <commit> # Rollback file to specific version
sync.sh resolve <file> [strategy] # Resolve conflictdeploy.sh start <dir> [options] # Start and track a project
deploy.sh stop <dir> # Stop a project
deploy.sh status [dir] # View deployment status
deploy.sh update <dir> # Update deployed project
deploy.sh check <dir> # Check for available updatesmonitor.sh watch # Watch config changes, auto-push
monitor.sh pull # One-time pull check
monitor.sh workspace # Watch workspace, auto-deploynotify.sh sync_push "message" # Push notification
notify.sh conflict "message" # Conflict alert
notify.sh error "message" # Error alertGenerated per machine at ~/.claude-sync/sync-config.json:
{
"machine_name": "macbook-pro",
"git": {
"remote": "git@github.com:user/claude-config-sync.git"
},
"sync_sources": {
"skills": "~/.claude/skills",
"settings": "~/.claude/settings.json",
"commands": "~/.claude/commands",
"agents": "~/.claude/agents",
"plugins": "~/.claude/plugins"
},
"log": {
"max_size_mb": 10,
"max_archives": 10
},
"telegram": {
"enabled": false,
"bot_token": "",
"chat_id": ""
},
"auto_sync": {
"pull_interval_minutes": 5,
"watch_enabled": true
}
}Controls which files are excluded from config sync (glob syntax). Located at ~/.claude-sync/.syncignore.
Controls workspace sync exclusions. Edit via Syncthing Web UI or directly at ~/claudecode_workspace/.stignore.
When two machines modify the same config file:
- Detection: Git detects merge conflict during pull
- Auto-handling: Local version kept, remote saved as
<file>.conflict - Notification: Telegram alert (if configured)
- Resolution:
# Keep local version
sync.sh resolve skills/my-skill.md --keep-local
# Accept remote version
sync.sh resolve skills/my-skill.md --keep-remote
# Manual merge
sync.sh resolve skills/my-skill.md --manual- Message @BotFather on Telegram
- Send
/newbot, follow prompts - Save the Bot Token
- Send a message to your bot
- Visit
https://api.telegram.org/bot<TOKEN>/getUpdates - Find
chat.idin the response
Edit ~/.claude-sync/sync-config.json:
{
"telegram": {
"enabled": true,
"bot_token": "123456:ABC-DEF...",
"chat_id": "YOUR_CHAT_ID"
}
}openclaw-sync-toolkit/
├── README.md # This file
├── README_CN.md # Chinese README
├── LICENSE # MIT
├── scripts/
│ ├── sync.sh # Core sync engine
│ ├── setup.sh # One-click deployment (6 phases)
│ ├── deploy.sh # Deployment manager
│ ├── monitor.sh # File change watcher
│ ├── install.sh # Dependency installer
│ └── notify.sh # Telegram notifications
├── config/
│ ├── sync-config.template.json
│ ├── .syncignore
│ └── launchd/
│ ├── com.claude-sync.pull.plist # Periodic pull (every 5 min)
│ ├── com.claude-sync.watch.plist # Realtime config watcher
│ └── com.claude-sync.workspace.plist # Workspace monitor
└── docs/
└── ARCHITECTURE.md # Detailed architecture document
Q: Skills didn't sync after deployment?
Check if the config repo has any commits: cd ~/.claude-sync/repo && git log --oneline -5. If empty, manually push from the machine that has skills: ~/.claude-sync/scripts/sync.sh push.
Q: Syncthing devices show "Disconnected"?
Check: (1) Both on same network or reachable, (2) device IDs added bidirectionally, (3) macOS firewall isn't blocking Syncthing, (4) try brew services restart syncthing.
Q: iPhone Mobius Sync isn't syncing?
Common causes: (1) iOS killed background app — open Mobius Sync to foreground, (2) Folder ID mismatch — must be exactly claudecode-workspace, (3) Mac hasn't accepted the device/folder request.
Q: What is settings.local.json?
Machine-specific settings that are never synced. Use for MCP server paths, local env configs, hardware-specific settings. Values override settings.json.
Q: How to rollback a bad Skill change?
~/.claude-sync/scripts/sync.sh log skills/my-skill.md # Find commit
~/.claude-sync/scripts/sync.sh rollback skills/my-skill.md abc1234Q: Can I use this on Linux?
The toolkit is macOS-optimized (launchd, brew, fswatch). Linux would need launchd replaced with systemd — not tested but theoretically possible.
# 1. Remove launchd services
launchctl unload ~/Library/LaunchAgents/com.claude-sync.*.plist
rm ~/Library/LaunchAgents/com.claude-sync.*.plist
# 2. Stop Syncthing (if no longer needed)
brew services stop syncthing
# 3. Remove sync system
rm -rf ~/.claude-sync
# 4. Remove toolkit (optional)
rm -rf ~/openclaw-sync-toolkitUninstalling does not affect files already synced to
~/.claude/— they remain in place.
Contributions welcome! Feel free to submit Issues and Pull Requests.