$npx -y skills add berabuddies/Semia --skill claw-roamSync OpenClaw workspace between multiple machines (local Mac and remote VPS) via Git. Enables seamless migration of OpenClaw personality, memory, and skills. Use when user wants to (1) push workspace changes to remote before shutdown, (2) pull latest workspace on a new machine, (
| 1 | # Claw Roam - OpenClaw Workspace Sync |
| 2 | |
| 3 | Sync your OpenClaw workspace across machines via Git. This allows you to: |
| 4 | - Work on local Mac as primary, seamlessly switch to VPS when traveling |
| 5 | - Maintain continuous memory and personality across different machines |
| 6 | - Backup your OpenClaw state to remote Git repository |
| 7 | |
| 8 | ## Quick Start |
| 9 | |
| 10 | Recommended branch model for multi-device: |
| 11 | - `main` = shared baseline |
| 12 | - `remote` = this server |
| 13 | - `local` = your laptop/desktop |
| 14 | |
| 15 | ```bash |
| 16 | # Check status (current branch) |
| 17 | claw-roam status |
| 18 | |
| 19 | # One-command full sync (recommended) |
| 20 | claw-roam sync |
| 21 | |
| 22 | # Or step by step: |
| 23 | # Commit+push current branch |
| 24 | claw-roam push "msg" |
| 25 | |
| 26 | # Pull latest for current branch |
| 27 | claw-roam pull |
| 28 | |
| 29 | # (Optional) merge another device branch into current branch |
| 30 | claw-roam merge-from local |
| 31 | claw-roam merge-from remote |
| 32 | ``` |
| 33 | |
| 34 | ## Commands |
| 35 | |
| 36 | ### push |
| 37 | Commit and push workspace to remote Git repository. |
| 38 | |
| 39 | ```bash |
| 40 | claw-roam push [message] |
| 41 | ``` |
| 42 | |
| 43 | - If no message provided, uses timestamp as default |
| 44 | - Automatically adds all changes (git add -A) |
| 45 | - Skips push if no changes detected |
| 46 | |
| 47 | ### pull |
| 48 | Pull latest workspace from remote and sync. |
| 49 | |
| 50 | ```bash |
| 51 | claw-roam pull |
| 52 | ``` |
| 53 | |
| 54 | - Fetches latest changes from remote |
| 55 | - Applies changes to current workspace |
| 56 | - Stops and restarts OpenClaw gateway to apply changes (VPS mode) |
| 57 | |
| 58 | ### status |
| 59 | Check sync status between local and remote. |
| 60 | |
| 61 | ```bash |
| 62 | claw-roam status |
| 63 | ``` |
| 64 | |
| 65 | - Shows current branch and commit |
| 66 | - Shows unpushed commits (if any) |
| 67 | - Shows uncommitted changes |
| 68 | - Suggests next action |
| 69 | |
| 70 | ### sync (One-Command Full Sync) |
| 71 | |
| 72 | ```bash |
| 73 | claw-roam sync |
| 74 | ``` |
| 75 | |
| 76 | Performs the complete sync workflow in one command: |
| 77 | |
| 78 | 1. **Commit and push current branch** - Saves your local changes |
| 79 | 2. **Merge main into current branch** - Gets latest from shared main |
| 80 | 3. **Push to main branch** - Shares your changes with other machines |
| 81 | |
| 82 | **Workflow diagram:** |
| 83 | ``` |
| 84 | ┌─────────────┐ commit+push ┌─────────────┐ |
| 85 | │ local │ ───────────────────▶│ origin/local│ |
| 86 | │ 分支 │ │ │ |
| 87 | └──────┬──────┘ └─────────────┘ |
| 88 | │ |
| 89 | │ merge main |
| 90 | ▼ |
| 91 | ┌─────────────┐ merge+push ┌─────────────┐ |
| 92 | │ local │ ───────────────────▶│ main │ |
| 93 | │ 分支 │ │ (shared) │ |
| 94 | └─────────────┘ └──────┬──────┘ |
| 95 | │ |
| 96 | ┌──────────────────────┘ |
| 97 | │ pull |
| 98 | ▼ |
| 99 | ┌─────────────┐ |
| 100 | │ remote │ |
| 101 | │ 分支 │ |
| 102 | └─────────────┘ |
| 103 | ``` |
| 104 | |
| 105 | **Recommended daily workflow:** |
| 106 | ```bash |
| 107 | # On each machine, just run: |
| 108 | claw-roam sync |
| 109 | ``` |
| 110 | |
| 111 | This ensures: |
| 112 | - Your changes are saved to your branch |
| 113 | - You get latest changes from other machines (via main) |
| 114 | - Other machines can get your changes (via main) |
| 115 | |
| 116 | ## Setup |
| 117 | |
| 118 | 1. **Initialize Git repo in workspace** (if not already done): |
| 119 | ```bash |
| 120 | cd ~/.openclaw/workspace |
| 121 | git init |
| 122 | git remote add origin <your-repo-url> |
| 123 | ``` |
| 124 | |
| 125 | 2. **Create initial commit**: |
| 126 | ```bash |
| 127 | git add -A |
| 128 | git commit -m "initial" |
| 129 | git push -u origin main |
| 130 | ``` |
| 131 | |
| 132 | 3. **On VPS machine** - clone the repo: |
| 133 | ```bash |
| 134 | cd ~ |
| 135 | git clone <your-repo-url> openclaw-workspace |
| 136 | ln -s openclaw-workspace ~/.openclaw/workspace |
| 137 | ``` |
| 138 | |
| 139 | ## Branch Workflow (Recommended) |
| 140 | |
| 141 | For multiple machines, use this branch strategy: |
| 142 | |
| 143 | ``` |
| 144 | local (Mac) ──┐ |
| 145 | ├──► main (shared) ◄── merge & push |
| 146 | remote (VPS) ─┘ |
| 147 | ``` |
| 148 | |
| 149 | ### Setup Each Machine |
| 150 | |
| 151 | **Local Mac:** |
| 152 | ```bash |
| 153 | cd ~/.openclaw/workspace |
| 154 | git checkout -b local |
| 155 | git push -u origin local |
| 156 | ``` |
| 157 | |
| 158 | **Remote VPS:** |
| 159 | ```bash |
| 160 | cd ~/.openclaw/workspace |
| 161 | git checkout -b remote |
| 162 | git push -u origin remote |
| 163 | ``` |
| 164 | |
| 165 | ### Daily Workflow |
| 166 | |
| 167 | **On each machine:** |
| 168 | |
| 169 | 1. **Get latest from main** (获取其他机器的最新内容): |
| 170 | ```bash |
| 171 | claw-roam merge-from main |
| 172 | ``` |
| 173 | |
| 174 | 2. **Work normally**, then push your changes: |
| 175 | ```bash |
| 176 | claw-roam push "update memory" |
| 177 | ``` |
| 178 | |
| 179 | 3. **Share to main** (让其他机器能获取): |
| 180 | ```bash |
| 181 | git checkout main |
| 182 | git merge local -m "merge: local -> main" |
| 183 | git push origin main |
| 184 | git checkout local |
| 185 | ``` |
| 186 | |
| 187 | ### Quick Sync (One-liner) |
| 188 | |
| 189 | ```bash |
| 190 | # Pull from main, then push to main |
| 191 | claw-roam merge-from main && git checkout main && git merge local && git push && git checkout local |
| 192 | ``` |
| 193 | |
| 194 | ### Conflict Resolution |
| 195 | |
| 196 | If `merge-from main` has conflicts: |
| 197 | ```bash |
| 198 | # Keep your version |
| 199 | git checkout --ours <conflicted-file> |
| 200 | git add -A && git commit -m "merge: resolved conflicts" |
| 201 | |
| 202 | # Or keep main's version |
| 203 | git checkout --theirs <conflicted-file> |
| 204 | git add -A && git commit -m "merge: resolved conflicts" |
| 205 | ``` |
| 206 | |
| 207 | ## Simple Workflow: Local Primary + VPS Backup |
| 208 | |
| 209 | For simpler setups without branches: |
| 210 | |
| 211 | ### Daily Usage (Local Mac) |
| 212 | Just use OpenClaw normally. Before shutdown: |