What it solves
1. Will this change build and test on the other machine?
The usual path is commit → push → switch desk → pull → run the build. Often you only changed a few lines.
2. The AI session dies when you change machines.
Claude Code keeps chat and memory on disk (~/.claude/). Git moves code; it does not move that.
sw turns each into a command:
| You want | Command |
|---|---|
| Compile and test the working tree I have now (no commit) | sw verify |
| Take the AI session and memory to the other machine | sw ctx |
| I committed; bring the other machine onto this branch | sw handoff |
| See why a peer is unreachable | sw doctor |
| Watch peers, projects, and verify history | sw tui |
The machines are peers. Either side can start. They do not need the same LAN: HTTPS relay when needed; direct path on LAN or VPN when possible.
What sw verify looks like
Started on Windows, built on a Mac—no commit, no push:
verify mac-mini verify f3f2730 + 1 file
on mac-mini (macos) /Users/me/projects/app
› reusing worktree
› applying patch
› [1/2] cargo build --release --all-targets
error[E0308]: mismatched types
--> src/style.rs:106:18
fail mac-mini exit 1 in 1.6s
Three things that matter:
- The working tree—including unstaged and untracked files—travels as a patch.
- Compiler diagnostics come back with file and line.
- The exit code is the peer’s—so it fits
&&, hooks, or an edit → verify → edit loop.
Cold cache is about a minute; afterward often ~1.6s with a persistent worktree and build cache—remote verify stays inside the inner loop.
From zero
Needs Rust 1.91+ and git. Pair and install the node once per machine; link each repository once.
1. Install on both machines
cargo install --git https://github.com/txwmemoria/sync-work --locked
Keep --locked so both sides resolve the same dependencies.
2. Pair once
# machine A
sw pair init
# machine B
sw pair join sw1:…
# machine A, with B’s ticket
sw pair join sw1:…
sw pair list
Tickets carry a public key, machine name, and platform—enough for every project you add later.
3. Launch the node at login
sw service install
User-level launchd / Run key / systemd—no admin. A machine only answers verify / ctx while its node runs.
4. One project
# machine A
sw init # commit syncwork.toml
# machine B, after git pull
sw link
Paths may differ; the project name is the shared id. For Claude context, run sw hook install on both sides, then sw doctor.
Day to day
sw verify
sw verify check
sw verify --peer mac
sw ctx
sw ctx --watch
sw handoff
sw status
sw tui
Rule of thumb: code rides the patch; config rides git. After editing syncwork.toml, use sw handoff (or push) so the peer sees the new recipes.
One Claude session on one machine at a time. Simultaneous /resume forks the files—both copies are kept. Markdown memory is three-way merged when possible.