Primary + secondaries
How it works
Pick one machine as the primary. All authored changes (new commands, hooks, MCP servers, edits to settings.json) happen there. The primary commits and pushes ~/.claude/ to a git repo. Every other machine runs git pull --ff-only on a schedule. Secondaries never push; they receive.
~/.claude/When this is right
- Solo operator with 2–5 machines.
- You're at the same one of those machines most days — there's a natural "primary."
- You don't change settings on the road. The secondaries are passive consumers.
When it's wrong
- You routinely make edits on whichever machine you're sitting at. (Mesh is closer to your reality.)
- The "primary" travels with you and is often offline. Secondaries stall while waiting.
- Multiple humans share machines. There's no single primary.
The five-minute setup
- Pick the primary. Make
~/.claude/a git repo. Push to a private GitHub repo. - On each secondary, back up the existing
~/.claude/, then clone the repo over it. Re-runclaude loginon each. - Add a scheduled task on each secondary: nightly
git -C ~/.claude pull --ff-only. - Pin a habit: on the primary, after any settings change,
git add && commit && push. Resist the urge to edit on a secondary.
git -C ~/.claude push origin HEAD:main --force from there (since secondaries already have the latest pulled state) → promote it to primary in your head. Down-time: ten minutes if the secondary is already running.