Skip to content

Sync Decks

The Sync Decks page syncs decks imported from Archidekt, from the browser. It runs the same engine as the deck-sync CLI command, with the same diffing, changelog entries, and lastSynced stamping. Per-deck progress streams into the page as it happens.

Syncing needs an Archidekt login, stored on the server and shared with the CLI. The page reports the state of that login at the top:

  • Signed in as username: the stored token is usable. An expired access token that can still be refreshed counts as usable, as in the CLI.
  • Your Archidekt session has expired / Not signed in to Archidekt: a login form appears inline. Signing in there is the same operation as the admin’s Archidekt Login page and ritual login archidekt. The sync controls unlock as soon as it succeeds.

If the token stops working mid-run, the run reports the failure and the login form reappears.

Control Effect
Direction Pull (Archidekt → local) or Push (local → Archidekt). The text below the control says what the selected direction writes.
Changes All changes, Additions only, or Removals only — the CLI’s --only. Skipped changes are still reported per deck.
Decks One row per Archidekt-linked deck, all selected by default. All decks toggles every row and also syncs any deck linked after the page loaded.
Preview only Runs as a dry run. Both directions still fetch the remote deck, but nothing is written locally and nothing is sent to Archidekt.
Sync printings Also sync each card’s set, collector number, and foil/etched finish — the CLI’s --sync-printings. Off by default.
Sync categories Also sync each card’s categories (its role in the deck) — the CLI’s --sync-categories. Off by default.

With no deck selected, the sync button is disabled.

Only decks whose front matter carries an Archidekt sourceUrl and a sourceId are listed. A deck with a sourceUrl but no sourceId is reported as skipped when you sync all decks.

Sync printings reconciles a card held at several printings printing by printing: copies are added, removed, or re-pointed so both sides hold the same printings. The Changes filter does not affect it.

Each row shows when that deck last synced (hover for the exact timestamp), and a line above the controls shows the most recent sync across all decks. Both refresh when a run finishes.

The run streams over server-sent events, so each deck updates as it is processed:

Icon Meaning
⏳ In progress.
✓ Synced — including “no changes detected”.
⏭ Skipped, with the reason (e.g. an Archidekt deck you do not own, which a push cannot write).
✗ Failed, with the error. The run continues with the remaining decks.

Under each deck are the same lines the CLI prints:

  • The change summary: Changes: +2 added, -1 removed, ~0 quantity changed on a pull, Changes: +2 to add, -1 to remove, ~0 quantity changes on a push. A deck whose cards change board gains a , 2 board moves clause. With printing sync on, each gains a , 3 printings changed / , 3 printings to change clause, and with category sync on a , 3 cards' categories changed / , 3 cards' categories to change one. A category-sync push from a deck with no local categories also logs that it left Archidekt’s categories alone.
  • Under the change summary, one line per card the run changes (or would change on a dry run): + 1 Lightning Bolt to Main, - 1 Brainstorm from Sideboard, ~ Counterspell in Main: 2 → 3, a board move as > 2 Island: Main → Sideboard, a printing change as * Sol Ring in Main: (C21:263) → (LEA:270), and a category change as = Sol Ring categories: Ramp. This is the listing the CLI prints only under --verbose. The page always shows it, including when it falls back to a plain request because the progress stream could not connect: the change summary and the per-card lines are then rendered from each deck’s structured changes.
  • What the change filter left out (Skipped 3 removals (applying additions only).).
  • Any format change.
  • With printing sync off, a warning for each card whose printings the two sides cannot square up (Printings not synced for "Lightning Bolt": … Re-run with --sync-printings to reconcile them.).
  • The final Saved. / Pushed N card changes to Archidekt.

A closing alert summarizes the run, such as Pulled 3 decks, 1 skipped., or Previewed 3 decks, 1 skipped. for a preview.

If the browser cannot hold the event stream open (some reverse proxies buffer server-sent events), the page falls back to a single non-streaming request and fills in every deck’s result when it returns.

Syncing rewrites the deck file, so a line Ritual’s parser cannot read (a stray comment, a malformed card line) would be deleted by the save. Rather than let that happen quietly, the run refuses those decks and shows what is at stake: each deck file, each line, and a Sync anyway and remove those lines button that re-runs with your consent. This is the page’s version of the confirmation the CLI prompts for. Fixing the lines by hand is the lossless option. The panel appears on the non-streaming fallback too.

Decks refused this way are reported as failed (N unreadable lines would be dropped by a sync); the rest of the run continues. A Preview only run is exempt, since it writes nothing: those decks are previewed like any other and no confirmation is asked for.

The same as the CLI, since it is the same engine:

  • A pull applies remote card additions, removals, quantity changes, and board moves per board, adopts the deck’s Archidekt format, records every card change in the deck’s .changes.md, and stamps lastSynced.

  • A push sends local card changes, board moves included, to Archidekt and stamps lastSynced, only for decks that pushed cleanly.

  • Both directions move a card between boards when it sits on a different board on each side: a pull moves the local line (keeping its ID), and a push moves the existing Archidekt entry by changing its board category. The change filter never skips a move. See Board moves.

  • With Sync printings ticked, a pull also rewrites local printings and finishes to what Archidekt records (as set-printing changelog entries), and a push moves the remote entries to the local file’s printing and finish. A card held at several printings is reconciled printing by printing, adding and removing copies as needed. See Printing Sync.

  • With it unticked, printings are never added or removed. A card’s new total is spread over the lines (or Archidekt entries) it already occupies, and a card whose printings the two sides cannot square up is reported and left alone. See Without the flag.

  • With Sync categories ticked, a pull makes the deck’s categories file hold Archidekt’s categories for every card (as set-categories changelog entries), and a push makes each Archidekt card hold the local categories, beside the board category of the board it ends up on. A push from a deck with no local categories leaves Archidekt’s alone. See Category Sync.

See What Is Compared for the full rules.

A push makes Archidekt match your local file, so a card added on archidekt.com since your last sync would be silently reverted. A push therefore refuses any deck whose Archidekt updatedAt is newer than the sourceUpdatedAt its last sync recorded:

Remote deck changed since last sync (remote: …, last synced against: …) — pull first, or pass --force to overwrite remote changes.

The deck is reported as failed and the rest of the run continues. The remedy on this page is to pull that deck first. A pull records the new baseline even when it finds no card changes, after which the push goes through. The --force override is not offered here; it exists on the CLI (deck-sync push --force) and MCP (sync_decks with force: true) only.

See Divergence Guard for the full rules.