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
- Using the CLI (Recommended)
- From the Dashboard
List all your shops and their theme IDs directly from the CLI:This prints all shops on your account, their Shop IDs, all themes within each shop, and each theme’s Theme ID. It’s the fastest way to retrieve both Shop IDs and Theme IDs without opening the dashboard.
Multiple Shops
If your account has multiple shops, you must specify the shop on every command that interacts with a shop:Commands
Create a Theme
Create a new theme: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:./themes/<themeId>, relative to the directory you run the command in.
Push a Theme
Sync your local theme to SellAuth:pull, this works on ./themes/<themeId>.
Watch Mode (Recommended for Development)
Watch your local theme and sync changes automatically:- Generate a temporary preview token
- Display a preview URL
- Watch for file changes
- Push updates automatically
- 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 atailwind.config.js, the CLI automatically:
- Builds
assets/style.cssintoassets/built.css - Watches the template files defined in
content - Pushes the built CSS automatically
- Reloads the preview
Sync Limitations
- Flat folders only. The CLI syncs
templates/,layouts/,components/,snippets/,assets/, and the theme root. Paths nested deeper than one folder, such asassets/img/logo.png, are skipped with a warning. Keep asset files directly inassets/. - Watch mode pushes text files only. The extensions synced on change are
njk,html,css,js,json,txt,md,xml, andsvg. Add images, fonts, and other binaries with a fullpush, or upload them from the dashboard. pullandpushalways use./themes/<themeId>. Onlywatchaccepts--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.