Theme CLI
Edit your storefront theme in your own editor, preview it live and publish from the terminal.
The OpenStock CLI puts your storefront theme on your machine. Edit it in any editor, keep it in Git, watch changes appear in a live preview, and publish from the terminal. It talks to the same project the dashboard code editor uses, so you can switch between the two at any time.
$ openstock watch
Acme Keys watching for changes
Preview https://openstock.dev/api/store-api/preview/0218cf3c…
Folder ~/themes/acme
Saves are pushed as drafts and the preview reloads. Ctrl+C to stop.
18:32:28 ↑ src/StorePage.tsx 412ms
18:32:41 ↑ src/components/Hero.tsx 388ms
18:33:02 − src/components/OldBanner.tsx 301msHow it works#
Download
openstock init copies the theme files into a folder. If you have never edited the code, you get the theme your store is using right now.
Edit with a live preview
openstock watch uploads each save as a draft and gives you a preview link that reloads itself. Shoppers keep seeing the live version.
Publish
openstock publish builds the theme on OpenStock and makes it live. Every publish is a version you can roll back to from the dashboard.