CLI commands
Every salla theme command for a React theme, with its options.
Look here when you need a flag. Every command starts with salla theme; salla theme --help prints the live list.
| Command | Alias | Needs login | Purpose |
|---|---|---|---|
create | c, import | Only for your own store or the GitHub step | Create a theme and start it. |
dev | Only for your own store (--store) and --editor | Run the theme locally. | |
doctor | No | Check Node, pnpm and git. | |
preview | p, watch | Yes | Run locally and open the theme editor. |
publish | pub | Yes | Push and submit for review. |
list | l | Yes | List your themes. |
delete | d | Yes | Delete one of your themes. |
create
salla theme create [-t react] [-n <name>] [-s <store>] [-y]See Create a theme.
dev
salla theme dev [-p <port>] [-s [store]] [--no-open] [-e]| Option | Default | Meaning |
|---|---|---|
-p, --port | 5173 | First port to try. The next free one is used if busy. |
-s, --store [store] | the store in .env | Bind a store. No value: ask. |
--no-open | opens | Do not open the browser. |
-e, --editor | off | Same as preview. |
See Run it locally.
doctor
salla theme doctorSee Prerequisites.
preview
salla theme preview [-s <store>] [-E] [-o] [-b <browser>]See Theme editor.
publish
salla theme publishSee Publish.
list and delete
salla theme list prints your themes (id, name, status). salla theme delete asks which one to delete. Deleting cannot be undone.
Twig-only commands
salla theme serve and salla theme sync belong to the legacy Twig workflow. In a React theme they stop and point you to salla theme dev, because a React theme serves and reloads itself.
Files the CLI writes
| File | By | Content |
|---|---|---|
.env | create, dev, preview | VITE_STORE_DOMAIN. Git-ignored. |
package.json, twilight.json, server config, README.md | create | The theme's new name. |
.git/ | create | Initial commit, plus an origin remote if the GitHub step ran. |
Environment variables
| Variable | Meaning |
|---|---|
SALLA_THEME_TEMPLATE | A local .tgz or folder to create from instead of the published starter. |
Next: The Vite plugin