The Upstorr CLI creates, previews, checks and uploads custom retail themes that run on Upstorr's commerce backend.

It is Developer Mode, the third layer of Upstorr Design Control: Founder Mode uses visual controls, Agency Mode edits one Liquid section at a time, and Developer Mode opens the complete authored theme. Read docs/upstorr-design-control.md in the installed CLI package, or open Upstorr Design Control online.

Requirements

  • Node.js 20.9 or newer
  • A merchant development secret for the store you are allowed to work on

Start a theme

npm install --global @upstorr/cli
mkdir my-upstorr-themes
cd my-upstorr-themes
upstorr theme init "My Brand Theme"
upstorr theme dev my-brand-theme

The first dev command asks for the merchant development secret. Later runs remember and verify that connection. Paste the secret only when the CLI asks for it. This keeps the secret out of shell history.

The command creates themes/my-brand-theme/. Edit only its theme/ folder. .upstorr-theme/ is generated local state. The generated checkout also contains AGENTS.md, DESIGN.md, the .agents/skills/upstorr-themes/ coding skill, a docs/ folder and SDK type information, so an agency can understand the structure and get editor autocomplete without cloning the Upstorr monorepo.

Main commands

upstorr theme check my-brand-theme
upstorr theme dev my-brand-theme
upstorr theme upload-version my-brand-theme

check validates the folder boundary, Liquid sources, required retail templates, imports and unsafe platform access. dev opens the hosted Workbench and asks for a development secret if this theme is not connected yet. upload-version creates an unpublished version; it does not publish the theme to production.

Custom JavaScript and libraries

Put optional browser JavaScript in theme/assets/theme.ts. The CLI bundles and loads it in local preview and uploaded versions. To run an enhancement again after storefront navigation:

const enhance = () => {
  // Find the new page elements and attach your theme-only interactions.
};

enhance();
window.addEventListener('upstorr:storefront-navigation', enhance);

Install normal browser libraries in the theme checkout and declare them in its root package.json. Private @upstorr/* packages, Node/server modules, direct API requests, authentication and payment-provider code are blocked. Use @upstorr/theme-sdk/v1 and documented Liquid behaviour hooks for platform data and commerce actions.

For the full folder map, Liquid rules and SDK contract, open the docs/ folder generated beside your theme.

The same documentation is available online at help.upstorr.com/developers.

Hosted Workbench

The editor is hosted at workbench.upstorr.com. Your computer compiles and renders your theme. Keep theme dev running and open the private hosted link it prints. The storefront preview opens inside the editor from the separate workbench-preview.upstorr.com address so theme JavaScript cannot access editing controls. The CLI makes an outgoing connection to Workbench; you do not configure a tunnel or expose a port. You can use your preferred code editor or AI coding tool to edit theme/; Liquid, styles and section controls update in Workbench automatically.

Save keeps a local draft for this theme and connected store. Make defaults explicitly copies the design into authored theme config/templates. Upload version is a separate review step. Connecting another store keeps its draft separate. Keep .upstorr-theme/ credentials and local drafts private.

Deleting cookies in an open tab or restarting the same project reconnects while keeping edits on screen. After clearing cookies and refreshing, reopen the complete CLI link or enter this store’s development secret. Allow cookies for Workbench. Anyone holding the complete private link can edit the connected local project while the CLI runs; share it only with trusted collaborators. If access to the store expires, restart theme dev and provide a valid secret. When two tabs edit the same saved draft, the second save reports a conflict instead of overwriting the first tab's work. Save before closing or refreshing your browser.

Run upstorr theme connect <theme> to choose another remembered store or enter a new secret. Stop the running development process before changing its connection.