Prized docs

Sync.

A synced project is one folder pair, ~/code/<name> on the box mirrored into a folder on your Mac. Edits land on the other side in under a second, both directions, .git included.

The model

SidePath
box~/code/<name>
your Mac~/Prized/<name> by default

prized sync add <name> wires the pair and keeps it mirrored both ways. ~/Prized is the default home for projects without a local override: pass --local to sync a folder of your own in place, or set local_root under [sync] in the config to move the default parent for everything. (An install from before the rename keeps ~/Doppel as that default parent; see doppel is now Prized.)

Sync keeps a real local copy, which is what makes tools that scan a whole repo fast. To look through the box without copying anything, use mount instead.

Add a project

Pick the line that matches where the code is today.

Starting fresh. Nothing exists yet on either side:

prized sync add myproject --create

--create makes ~/code/myproject on the box; the empty pair fills up as you (or an agent) work.

The code is on the box. Mirror it down:

prized sync add myproject

The first sync copies ~/code/myproject into ~/Prized/myproject. Pass a path to sync a folder outside ~/code: prized sync add ~/work/api derives the name api.

The code is on your Mac. Point setup at it:

prized setup ~/src/myproject

Setup offers three ways to get an existing folder onto the box; pick by how the folder is used.

Sync in place is the default: your folder becomes the live Mac side of the pair, no copy. The first sync uploads it to ~/code/myproject on the box, and edits mirror both ways from then on; the project name is the folder's basename. Setup asks before wiring it, and the confirm states the conflict rule below, because it now applies to that folder: when the same file changes on both sides at once, the box side wins. Right for a project one person edits. Doing it by hand is one command:

prized sync add --local ~/src/myproject --create

The path must already exist; --create refers to the box side, and --name overrides the derived name.

Copy leaves the folder untouched and syncs a copy instead:

prized setup ~/src/myproject --copy

That copies the folder into ~/Prized/myproject (a copy, never a move) and syncs the copy; the original is out of the loop from then on. Keep it until you have used the synced copy for a while, then retire it; two live copies of a repo on one Mac invites editing the wrong one. Running the same command again is safe and copies nothing a second time: it reports that ~/Prized/myproject is already the synced side and moves on.

Clone on the box skips the mirror entirely and lets git be the transport:

prized setup ~/src/myproject --clone

Setup reads the folder's origin remote and clones it to ~/code/myproject on the box: gh repo clone for github.com origins, riding your GitHub sign-in, plain git clone otherwise. It then checks out your current branch when it exists on origin. There is no live mirror and no sync session; work moves by push and pull, so nothing on your Mac can race an agent on the box, and nothing on the box can overwrite an edit on your Mac. That makes clone the right mode for a checkout that is not one person's to mirror: other people or several concurrent agents edit it, worktrees live inside it, uncommitted work is in flight. A live mirror of a checkout like that can lose concurrent work, and setup says so: when it detects linked worktrees in the folder, its recommendation flips from in place to clone. A clone is not a sync project, so it does not appear in prized sync ls; it is just a git checkout on the box.

If both sides already have content, add refuses until you pass --merge, which accepts the conflict rule below for every same-path difference in the initial merge.

A folder cannot be added inside another synced folder, or the other way round: two sessions would sync the same bytes and fight over them. That refusal comes before anything is created, so a refused add leaves no new folders on either side.

Each project's Mac folder must stand alone: add refuses a folder that is the same as, inside, or around another synced project's folder, because two sessions over the same files fight each other.

Build artifacts like node_modules, dist, and target are ignored by default. Adjust per project with --ignore and --unignore.

Conflicts: the box wins

Sync runs in two-way-resolved mode and the box wins every conflict: agents on the box write at high rate, so if the same file changes on both sides at once, the Mac edit yields. This matters most for a folder synced in place: the folder you have always edited is now the yielding side of the pair, so an edit that races an agent on the box loses. Prefer the other side per project with --prefer mac, or use --mode two-way-safe to surface conflicts instead of resolving them.

Files larger than 256 MB are skipped; the rest of the project syncs normally.

Git over sync

The box is the write side of git: commit, rebase, and push from a shell there. Reading from your Mac is always safe, so history, diffs, and blame in ~/Prized are fine. Committing from the Mac works too, but only while the box side is quiet: two commits landing at once can lose the Mac one.

Offline

Agents, builds, and servers keep running when your laptop goes offline. Sync catches up when you reconnect, and mirrored ports come back with it. To edit offline in a project an agent is also writing to, pause the project first, or the box's versions win on reconnect.

Everyday commands

CommandWhat it does
prized sync lsList projects with their state and conflicts.
prized sync flush myprojectForce a full sync cycle and wait for it. Useful before switching machines.
prized sync pause myprojectStop syncing until you resume. --all works too.
prized sync resume myprojectResume a paused project.
prized sync repair myprojectRecover a halted session with a safe re-scan. No deletions propagate.

Remove a project

prized sync rm myproject

By default this only stops the sync; files stay on both sides. Add --delete-local to move the Mac folder to the Trash, or --delete-box to move the box folder aside. Both are moves, never rm -rf, and both name the exact path in the confirm.

Which folder --delete-local means depends on the mode you added the project with. For a mirror under ~/Prized it is Prized's own copy of what is also on the box. For a project synced in place it is your own checkout, the one you pointed setup at, so that prompt asks you to type delete-local to confirm, the way --delete-box asks you to type delete-box. A clone has no Mac side at all, so the flag does not apply to it.

Sync commands only ever touch the box in the config you point them at. If you have several boxes and run one against a second box's config, a project of the same name on another box is left alone and named in the error rather than removed, paused, or listed as yours. The background daemon draws the same line: another box's projects stay out of prized sync ls and prized status, and it never pauses, resumes, or rebuilds them. Projects you synced before updating are unmarked and stay with the daemon's box, so nothing disappears from the list when you update.

If a session halts after a folder was deleted at its root, resume is refused, since it would propagate the mass delete. Run prized sync repair myproject instead.

Under the hood

Sync runs on Mutagen, and Prized installs and manages its own pinned copy; there is nothing to set up. If the copy is ever missing, prized doctor --fix fetches it.

Installed Mutagen yourself for an early release? Prized now uses its own copy and ignores the one on your PATH. If projects look gone after updating, run prized sync repair myproject once per project; the Homebrew mutagen can be uninstalled.

Something unclear or out of date?

On this page