Skip to main content

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​

CommandDescription
themes initScaffold a new theme based on Nova 2023
themes servePreview theme with live reload
themes pullDownload theme from store
themes pushUpload theme to store
themes shareShare a preview link
themes packagePackage theme as ZIP
themes envManage theme environments in shoplazza.theme.toml
themes publishPublish a theme
themes listList store themes
themes deleteDelete a theme
auth loginLog in to Shoplazza
auth logoutLog out
auth store useSwitch store
--versionShow CLI version
--helpShow 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.

shell
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.

shell
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​

FlagDescription
--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-pushSkip 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.

shell
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​

FlagDescription
--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-runPrint 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.

shell
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​

FlagDescription
--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-runPrint 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.

shell
shoplazza themes share

share flags​

FlagDescription
--environment, -e <NAME>Environment from shoplazza.theme.toml (store, profile)
--dry-runPrint 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.

shell
shoplazza themes package

package flags​

FlagDescription
--no-ignoreIgnore .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.

shell
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]
shoplazza.theme.toml
[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.

shell
shoplazza themes list --format table

publish​

Publish a theme to the live store.

shell
shoplazza themes publish --params '{"theme_id":"<THEME_ID>"}'

delete​

Delete a theme from your store. The store's default theme can't be deleted.

shell
shoplazza themes delete --params '{"theme_id":"<THEME_ID>"}'

Authentication commands​

login​

Log in via OAuth 2.0:

shell
shoplazza auth login --store-domain my-store.myshoplaza.com --domain themes

login flags​

FlagDescription
--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:

shell
shoplazza auth logout

store use​

Switch to a different store:

shell
shoplazza auth store use --store-domain another-store.myshoplaza.com

Utility commands​

version​

Display the CLI version:

shell
shoplazza --version

help​

List available commands:

shell
shoplazza --help
shoplazza [command] --help