Skip to main content

CLI Reference

The Shoppex CLI (@shoppexio/cli, command shoppex) is the terminal companion for Liquid theme development. It pulls a hosted theme into a local folder, runs a local Liquid dev server, pushes your draft source back to Shoppex, and drives validation, preview, and publish from the command line. It also installs the Shoppex MCP server into AI clients such as Claude Desktop, Claude Code, Cursor, Windsurf, and Codex.

Installation

Run it directly with npx:
Or install it globally:

Requirements

  • Node.js >= 18 for all commands.
  • Every command — including theme dev and theme screenshot — runs on Node alone when installed from npm. (Bun is only needed when running the dev server from a Shoppex monorepo checkout.)
  • Playwright is required for theme screenshot (optional peer dependency, not part of the default install): npm install -D playwright && npx playwright install chromium.

Authentication

Create an API key in the Dashboard under Settings → Developer → API Keys (“Theme Development” section) with the themes.read and themes.write scopes, then log in:
Instead of a stored login you can set environment variables: shoppex auth logout removes the stored credentials.

Command Reference

Auth

MCP

Installs the Shoppex MCP server into an AI client so assistants can work on your themes.
On Windows, shoppex mcp install --client claude-desktop writes the config to every known Claude Desktop location, including the Microsoft Store install path. Quit and reopen Claude Desktop after installing.

Theme: local workflow

Theme: inspect and edit

Theme: preview, publish, and recovery

Most theme commands resolve the theme id from the local .shoppex/theme.json link when --theme is omitted. Outside a linked workspace, --theme is required.

Core Workflows

Start a brand-new theme in one step (create + clone + link):
Follow a publish job as a status stream:
Clone, develop locally, preview, publish:
Health-check a workspace:
Capture visual evidence after edits, before pushing:
Use live shop data instead of fixtures in the dev server:

Exit Codes

Troubleshooting

The stored API key is missing, expired, or revoked. Re-run shoppex auth login --api-key <key> with a valid key that has the themes.read and themes.write scopes, or check that SHOPPEX_API_KEY is set correctly.
Someone changed the remote draft after your last pull. Check with the merchant (or your team) what changed, then refresh your workspace with shoppex theme pull --force. Only use shoppex theme push --force when you intentionally want to replace the newer remote draft.
Reinstall @shoppexio/cli so the bundled dev server files are present. When running from a Shoppex monorepo checkout (not an npm install), the dev server runs via bun run dev:liquid — install Bun from bun.sh in that case.
Merchant themes may not exceed 10MB of custom (non-official) files uncompressed; unchanged official theme assets do not count toward the cap. The CLI warns before upload and the push error lists the largest files. Convert large PNG/JPG images under assets/ to WebP, remove unused images and authoring files from the theme folder, then re-run shoppex theme push --preview.

Next Steps

Local Development

CLI sync, fixture data, live shop data, and common local setup issues.

Edit Themes with AI

Use the Edit with AI workflow and MCP-connected assistants on your theme.