Skip to main content

Overview

The SellAuth Theme CLI is the official command-line tool for developing SellAuth themes locally. It lets you create, pull, and push themes, watch for file changes with live preview and auto-reload, and build Tailwind CSS without any extra setup.

sellauth-com/sellauth-theme-cli

View the source code on GitHub.
New to themes? Start with the Theme Quickstart, which walks through this whole flow end to end, then read Theme Structure to learn what the files do.

Installation

Requires Node.js 18+. Install the CLI globally via npm:

Authentication

Login using your SellAuth API key:
Your API key is available at Dashboard → Account → API Access. If you don’t see an API key, click Regenerate. Your Shop ID is shown on the same page.

Finding Your Theme ID

Multiple Shops

If your account has multiple shops, you must specify the shop on every command that interacts with a shop:
If your account has only one shop, the CLI uses it automatically.

Commands

Create a Theme

Create a new theme:
With an optional official template:
Official template IDs: canvas, marble, main, blue, pro. See Themes Overview for what each one is. The theme is created on SellAuth. Run pull afterwards to get the files locally.

Pull a Theme

Download theme files locally:
Files are written to ./themes/<themeId>, relative to the directory you run the command in.

Push a Theme

Sync your local theme to SellAuth:
Like pull, this works on ./themes/<themeId>.
push is a two-way sync, not an upload. Files that exist on SellAuth but not in your local folder are deleted on SellAuth. Always pull first if your local copy might be out of date.
Watch your local theme and sync changes automatically:
This will:
  1. Generate a temporary preview token
  2. Display a preview URL
  3. Watch for file changes
  4. Push updates automatically
  5. Reload the preview page
The preview token expires periodically. Watch mode regenerates it and prints a fresh preview URL, so use the newest URL if the old one stops working.
To enable auto-reload, watch mode adds a small block to layouts/master.njk, marked with a __SELLAUTH_LIVE_RELOAD__ comment. It only runs inside the preview, never on your live shop, and it is only added once. If you see an unexpected change to master.njk in your diff, that is what it is.

Apply a Theme to Your Shop

Apply a theme to your shop:

List Shops and Themes

Print every shop on your account with its Shop ID, and every theme within it with its Theme ID:

Help

Tailwind CSS Support

If your theme contains a tailwind.config.js, the CLI automatically:
  • Builds assets/style.css into assets/built.css
  • Watches the template files defined in content
  • Pushes the built CSS automatically
  • Reloads the preview
No need to install Tailwind inside the theme. The CLI handles it for you.

Sync Limitations

  • Flat folders only. The CLI syncs templates/, layouts/, components/, snippets/, assets/, and the theme root. Paths nested deeper than one folder, such as assets/img/logo.png, are skipped with a warning. Keep asset files directly in assets/.
  • Watch mode pushes text files only. The extensions synced on change are njk, html, css, js, json, txt, md, xml, and svg. Add images, fonts, and other binaries with a full push, or upload them from the dashboard.
  • pull and push always use ./themes/<themeId>. Only watch accepts --dir.

Next Steps

Theme Structure

What each folder does and which template renders which URL.

Settings and Schema

Add configurable settings that show up in the visual editor.