mercemur products list, because
GET /api/v1/products already exists and a second spelling of it would only drift.
What the CLI adds is the local half:
Your storefront as files
Templates on disk, in your editor, in your own git history alongside the rest of
your work.
A live edit loop
Save a file, see the change in a preview link, without publishing anything to
shoppers.
Install
On macOS and Linux:/usr/local/bin; set MERCEMUR_INSTALL_DIR to put it somewhere else.
On Windows, or to pin a version, download it directly from
cli.mercemur.com. Builds are published for macOS, Linux and
Windows on both amd64 and arm64, with checksums beside them.
There is no Homebrew formula or npm package yet, so anything claiming to be one is not
ours. Verify downloads came from
cli.mercemur.com.Log in
The CLI authenticates with the same API key everything else does. Create one in Settings, API keys with theread_storefront and
write_storefront scopes, then:
MERCEMUR_TOKEN in the
environment instead of running login.
Point it at a store
Every command needs to know which store it is talking to. Four places are checked, and the first one that names a value wins, per setting:
Per setting rather than per layer: a project file naming the API base is still used when
you pass
--store on the command line.
.mercemur.json
Never put an API key in
.mercemur.json. It is a file people commit. Keys live in the
keychain, which is why the CLI has no config field for one.Scripting it
Every command accepts--json and emits a single machine-readable document with no
human-readable lines mixed in, so it composes:
A retry loop that treats every failure alike will spin forever on a revoked key. That is
why
3 and 4 are separate from 1.
Next
Theme workflow
Pull your storefront to disk, edit with live preview, and publish.