CartistoDocs

The Cartisto CLI

Edit, preview, validate, and publish themes from your own editor.

@cartisto/cli is how you work on a theme from your own editor and CI. It talks to a store with a scoped API key and enforces the same quality gate the server does, so validate locally means push --publish won’t be rejected.

Install & authenticate

npm install -g @cartisto/cli
cartisto login --store your-store.cartisto.app --key sk_xxxxxxxxxxxx
cartisto doctor        # verifies Node, version, connection, and key scope

Config lives in ~/.cartisto/config.json (named profiles). For CI, set CARTISTO_STORE_URL and CARTISTO_API_KEY instead of logging in.

Commands

Command What it does
cartisto theme init [name] Create a fresh custom theme (fork of the starter) and pull it locally.
cartisto theme list [--json] List the store’s themes.
cartisto theme pull [--id] [--dir] Download a theme’s files + a .cartisto/theme.json mapping.
cartisto theme dev Watch + auto-push each save as a draft; prints the preview URL.
cartisto theme diff Show what changed locally vs. the server (read-only).
cartisto theme validate [dir] Run the quality gate locally.
cartisto theme push [--publish] Upload changes (as a draft); --publish promotes to live through the gate.
cartisto store add|list|use|remove Manage store profiles.
cartisto doctor Diagnose the environment + credentials.

The inner loop

cartisto theme pull
cartisto theme dev        # edit files; each save previews instantly
# … iterate …
cartisto theme validate
cartisto theme push --publish

dev pushes each changed file as a draft and prints a ?previewTheme=<id> URL. Only that preview shows your work; the live storefront keeps serving the published version.

What the key can and can’t do

A Theme Access key is scoped to themes. It can list/pull/push/validate/publish theme code. It cannot activate a theme, buy a paid theme, or delete a theme — those are owner decisions and return 403. A developer builds and publishes; the merchant decides go-live and purchases. See Authentication.

Tip

Offline-safe validation cartisto theme validate needs no network — it runs the contract rules over your local files. Wire it into a pre-commit hook or CI to catch a banned pattern before it ever reaches the store.