Prized docs

Sync.

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

The model

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

prized sync add <name> wires the pair and keeps it mirrored both ways. --local syncs a folder of your own in place, and local_root under [sync] in the config moves the default parent for everything.

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

How fast

Edits in a folder that changed recently land on the other side in under a second. The first edit in a folder nothing has touched for a while can take up to 10 seconds to leave the box; watch_polling_interval under a project's [[sync.project]] entry lowers that, at the cost of a full scan per interval.

Add a project

Pick the case that matches where the code is today.

Nothing exists yet. --create makes ~/code/myproject on the box, and the empty pair fills up as you or an agent work:

Terminal
prized sync add myproject --create

The code is on the box. The first sync copies ~/code/myproject down into ~/Prized/myproject (C:\Users\you\Prized\myproject on Windows). Pass a path for a folder outside ~/code (prized sync add ~/work/api derives the name api); a name that cannot be a project name is folded into one, and --name picks one yourself:

Terminal
prized sync add myproject

The code is on your machine. Point setup at the folder. A manual run asks one yes or no: sync it in place (the default) or copy it to the box once with no sync; two more modes are flags:

Terminal
prized setup ~/src/myproject              # asks: sync in place? (n = copy once)
prized setup ~/src/myproject --copy-once  # copy to ~/code/myproject on the box, no sync
prized setup ~/src/myproject --copy       # sync a copy under ~/Prized
prized setup ~/src/myproject --clone      # git clone on the box, no mirror
ModeWhat happensRight for
In placeYour folder becomes the live local side; setup asks first, because the box now wins conflicts there.A project one person edits.
--copy-onceOne upload to ~/code/myproject, .git included, ignored paths and .env files left out; no sync session, and a populated destination is never overwritten.A checkout others or several agents edit, or a one-time import.
--copyCopies the folder into ~/Prized/myproject (never a move) and syncs the copy; the original is out of the loop. A hard link inside the folder is refused.Leaving the original untouched; retire it once the copy is in use.
--cloneClones the folder's origin to ~/code/myproject on the box at your current branch; no sync session, work moves by push and pull.A checkout others edit, worktrees, uncommitted work in flight.

In place by hand is prized sync add --local ~/src/myproject --create. A clone is not a sync project, so it never appears in prized sync ls.

Rules for every add:

  • Both sides already have content: add refuses until you pass --merge (prized setup --merge passes it through), which accepts the conflict rule below; a copy of the local folder is kept under ~/Prized/.prized/backups/ first.
  • No nesting: a folder cannot be added inside, around, or on top of another synced folder, on either side of the pair.
  • Ignored by default: node_modules, .next, dist, build, out, target, .venv, venv, __pycache__, .turbo, coverage, *.log, .DS_Store, ._*, .tox, .nox, .mypy_cache, .pytest_cache, .ruff_cache, .ipynb_checkpoints, .pnpm-store, .parcel-cache, .nuxt, .svelte-kit, .cache, .gradle, .terraform. Adjust per project with --ignore and --unignore.
  • .env files: a session prized setup creates ignores .env and .env.* (.env.example still syncs); credential files move through setup's secrets question. prized sync add by hand syncs them unless you pass --ignore .env. See Bring your environment.
  • Files larger than 256 MB are skipped; sync add and prized sync ls name every skipped path.

If the first sync cannot be set up, sync add fails with the reason and keeps the project configured; the daemon retries on its own, prized sync ls shows it as error, and prized sync rm myproject drops it. A first sync can take a couple of minutes, since the whole folder travels, .git included; watch the transfer rate on setup's progress line before assuming something is stuck, trim what travels with --ignore, or use --clone so the box fetches the history from origin.

Conflicts: the box wins

Sync runs two-way-resolved and the box wins every conflict: agents on the box write at high rate, so a local edit that races one yields. This matters most for a folder synced in place, since the folder you have always edited is now the yielding side. --prefer mac flips that per project; --mode two-way-safe surfaces conflicts instead of resolving them.

Git over sync

Commit, rebase, and push from a shell on the box. Reading from your machine (history, diffs, blame in ~/Prized) is always safe; committing from your machine works only while the box side is quiet, since two commits landing at once can lose the local one.

Offline

Agents, builds, and servers keep running while your laptop is offline; sync and mirrored ports catch up on reconnect. 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.

A session that halted after a folder was deleted at its root refuses to resume, since that would propagate the mass delete. Use repair.

Remove a project

Terminal
prized sync rm myproject

This stops the sync and leaves files on both sides. Two flags go further; both are moves, never rm -rf, and both name the exact path in the confirm:

  • --delete-local moves the local folder to the Trash after you type delete-local; for a project synced in place that is your own checkout.
  • --delete-box moves the box folder aside after you type delete-box; it is refused when anything else still syncs that folder or one inside it.

Two box paths that spell the same folder differently count as the same folder, ~/code/app and /home/ubuntu/code/app included.

Several boxes

Sync commands follow the box you aim them at: the default box, or --box mango (or PRIZED_BOX=mango) for a box connected with prized setup --box mango. Two boxes cannot sync a project under the same name; the second prized sync add asks for --name. See Boxes.

Under the hood

Sync runs on Mutagen. Prized installs and manages its own pinned copy and ignores any on your PATH; prized doctor fetches it if it is missing.

Something unclear or out of date?

On this page