1
Pull it down
theme/.2
Edit with live preview
3
Publish when you are ready
What lands on disk
templates/ holds one file per page kind. online-store.json is your builder
document: page layout and design tokens together, written indented so its diffs are
readable in a pull request.
.mercemur-state.json records the version of each resource as of your last pull. It is
per checkout, so do not commit it. Add it to .gitignore:
If you lose it, run
mercemur theme pull again. The CLI refuses to push without it
rather than guessing, because guessing means overwriting somebody else’s work.Draft and live are separate
Every command in this workflow writes to a draft. Shoppers see the published copy. Onlypublish moves one to the other.
That split is deliberate, and it is why push and publish are two commands rather
than one flag. A draft save is private to you and cheap to get wrong. A publish changes
what every visitor to your store sees. Collapsing them would put both behind one line in
your audit log and one entry in a retry policy.
Pushing safely
Before sending anything, see where you stand:Publishing
publish promotes the draft the server holds, not the files on your disk. Those are
usually the same thing, and when they are not it refuses:
Working with git
The two content files are meant for version control:Command reference
mercemur theme pull
mercemur theme pull
Downloads every template and the builder configuration, and records their versions.
Overwrites local files. Commit or stash first if you have unpushed edits.
mercemur theme push
mercemur theme push
Uploads local files as a draft, then records the new versions so a second push needs
no re-pull.
Exits
4 if anything changed on the server since your pull.mercemur theme dev
mercemur theme dev
Mints a preview link and pushes each save as a draft.
--json is refused here rather than ignored. A watch session is a stream for a
person; for scripted output run mercemur theme push --json in your own loop.Editors write a file several times per save, so changes are debounced into one upload.
A failed upload prints and the session continues; press ctrl-c to stop.The preview link lasts 48 hours and renders your draft. Anyone holding the link
can see it, so treat it as you would a shared document.mercemur theme publish
mercemur theme publish
Makes the pushed draft live for shoppers.
Refuses if your local files differ from the draft on the server, or if any version is
unknown.
mercemur theme diff
mercemur theme diff
Compares your local files against the draft on the server. Reads only, so it is safe
to run at any time.This answers something
push --dry-run cannot: whether the server moved since your
pull. A dry run only knows what is on your disk.With --json it reports in_sync, so a pipeline can check whether the storefront
matches the repository.mercemur theme revisions
mercemur theme revisions
Lists past versions of the builder configuration, newest first.One is recorded each time the configuration is published. Templates are not listed
here, because they live in your own git history; the builder document keeps
server-side revisions because the dashboard edits it too.
Read a revision before restoring it. A list of ids and timestamps tells you when
something changed, never what it changed to:
mercemur theme restore
mercemur theme restore
Copies a past revision back into the draft.
Nothing changes for shoppers until you publish, so a restore is as reversible as any
other edit until then. Afterwards run
mercemur theme pull to bring the restored
document down, then publish when you are happy with it.Like every other write, it presents the version you pulled and refuses if somebody
changed the configuration in the dashboard meanwhile.In CI
4 means somebody changed the
store while your pipeline was running, and the right response is to fail the build and
look, not to retry.