Theme commands
This reference lists the Shoplazza CLI commands for theme development. For the full command reference (all topics), see the CLI command reference.
Command overview
| Command | Description |
|---|---|
| themes init | Scaffold a new theme based on Nova 2023 |
| themes serve | Preview theme with live reload |
| themes pull | Download theme from store |
| themes push | Upload theme to store |
| themes share | Share a preview link |
| themes package | Package theme as ZIP |
| themes env | Manage theme environments in shoplazza.theme.toml |
| themes publish | Publish a theme |
| themes list | List store themes |
| themes delete | Delete a theme |
| auth login | Log in to Shoplazza |
| auth logout | Log out |
| auth store use | Switch store |
| --version | Show CLI version |
| --help | Show help |
Theme development commands
These are subcommands of shoplazza themes with no + prefix. pull, push, serve, and share also accept -e, --environment <name> to run against an environment from shoplazza.theme.toml; see env.
init
Scaffold a new theme based on Nova 2023.
shoplazza themes init --name <dir>
No login is required. The target directory must not exist or must be empty.
serve
Upload the current theme to a store and preview it with live reload.
shoplazza themes serve
This command returns:
- A preview link that you can share with other developers
- A link to the theme editor in the Shoplazza admin
Without --theme-id, it uploads to the directory's development theme, creating one on the first run. Each file change is synced to the theme and reloads connected browsers; syncing is one-way, so run themes pull to fetch changes made in the theme editor. The command runs until you press Ctrl-C.
The startup upload replaces the theme's files on the server with your local files, removing files that exist only on the server and overwriting theme editor changes. Use --skip-push to keep them.
serve flags
| Flag | Description |
|---|---|
--theme-id, -t <THEME_ID> | Theme ID to serve and overwrite. If omitted, uses a development theme. |
--environment, -e <NAME> | Environment from shoplazza.theme.toml (store, profile, theme) |
--port <PORT> | LiveReload server port (default: 21647) |
--skip-push | Skip the startup full upload and watch right away; only files changed while serve runs are sent |
--task-id <TASK_ID> | Resume waiting for an earlier upload task instead of uploading again |
--timeout <SECONDS> | Stop watching after this many seconds and exit (default: 0, watch until interrupted) |
pull
Download theme files from Shoplazza.
shoplazza themes pull --theme-id <THEME_ID>
Files are unpacked into the current directory, and the store and theme are recorded in shoplazza.theme.toml.
pull flags
| Flag | Description |
|---|---|
--theme-id, -t <THEME_ID> | Theme ID to pull. Required unless -e provides it; in a terminal, you can pick a theme from a list instead. Run shoplazza themes list to discover. |
--environment, -e <NAME> | Environment from shoplazza.theme.toml (store, profile, theme) |
--dry-run | Print what would be downloaded and which local files it can overwrite, without sending anything |
push
Upload local theme files to Shoplazza, overwriting the remote version.
shoplazza themes push --theme-id <THEME_ID>
In a terminal, push asks you to confirm before it overwrites the theme. It waits up to 10 minutes for the server to process the upload; if the wait times out, re-run with --task-id to keep waiting. Like pull, it records the store and theme in shoplazza.theme.toml.
push flags
| Flag | Description |
|---|---|
--theme-id, -t <THEME_ID> | Theme ID to overwrite. Required unless -e provides it; in a terminal, you can pick a theme from a list instead. Run shoplazza themes list to discover. |
--environment, -e <NAME> | Environment from shoplazza.theme.toml (store, profile, theme) |
--task-id <TASK_ID> | Resume waiting for an earlier upload task instead of uploading again (the task_id from a timeout error) |
--dry-run | Print what would be uploaded and where, without packaging or sending anything |
share
Upload your theme as a new, unpublished theme and return a shareable preview link. It never overwrites an existing theme.
shoplazza themes share
share flags
| Flag | Description |
|---|---|
--environment, -e <NAME> | Environment from shoplazza.theme.toml (store, profile) |
--dry-run | Print what would be uploaded as a new preview, without packaging or sending anything |
package
Package local theme files into a ZIP file named theme_name-theme_version.zip.
shoplazza themes package
package flags
| Flag | Description |
|---|---|
--no-ignore | Ignore .themeignore rules (default: false) |
env
Inspect and edit the environments in shoplazza.theme.toml, which the CLI finds by searching up from the current directory.
shoplazza themes env list
shoplazza themes env show [name]
shoplazza themes env check [name]
shoplazza themes env add [name] --store <domain> [--theme <id>]
shoplazza themes env set [name] [--store <domain>] [--theme <id>]
shoplazza themes env remove [name]
[environments.default]
store = "my-store.myshoplaza.com"
theme = "123456"
[environments.staging]
store = "staging.myshoplaza.com"
theme = "654321"
Select an environment with -e <name> or the SHOPLAZZA_CLI_ENVIRONMENT environment variable. When neither is set, the default environment applies automatically. check validates offline that each environment resolves to a logged-in profile. The file holds no credentials.
Theme API commands
Theme API commands pass path parameters in --params. For all theme API commands, see themes (API).
list
List the themes in your store with their IDs and statuses. It returns 10 themes per page by default; pass --params '{"page_size":250}' to get up to 250.
shoplazza themes list --format table
publish
Publish a theme to the live store.
shoplazza themes publish --params '{"theme_id":"<THEME_ID>"}'
delete
Delete a theme from your store. The store's default theme can't be deleted.
shoplazza themes delete --params '{"theme_id":"<THEME_ID>"}'
Authentication commands
login
Log in via OAuth 2.0:
shoplazza auth login --store-domain my-store.myshoplaza.com --domain themes
login flags
| Flag | Description |
|---|---|
--store-domain, -s <domain> | Store domain to connect to. When you select a store, also pass --domain or --scope; in a terminal, you're prompted if both are omitted. |
--domain <domains> | Business domains for scope expansion |
logout
Log out and remove all profiles and stored credentials on this machine:
shoplazza auth logout
store use
Switch to a different store:
shoplazza auth store use --store-domain another-store.myshoplaza.com
Utility commands
version
Display the CLI version:
shoplazza --version
help
List available commands:
shoplazza --help
shoplazza [command] --help