Skip to main content

theme preview

Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.

The command returns a preview URL and a preview identifier. You can reuse the preview identifier with --preview-id to update an existing preview instead of creating a new one.

The following flags are available for the theme preview command:

Anchor to --overrides <value>
--overrides <value>
string
required
env: SHOPIFY_FLAG_OVERRIDES

Path to a JSON overrides file.

Anchor to -t, --theme <value>
-t, --theme <value>
string
required
env: SHOPIFY_FLAG_THEME_ID

Theme ID or name of the remote theme.

Anchor to --json
--json
env: SHOPIFY_FLAG_JSON

Output the preview URL and identifier as JSON.

Anchor to --no-color
--no-color
env: SHOPIFY_FLAG_NO_COLOR

Disable color output.

Anchor to --open
--open
env: SHOPIFY_FLAG_OPEN

Automatically launch the theme preview in your default web browser.

Anchor to --password <value>
--password <value>
string
env: SHOPIFY_CLI_THEME_TOKEN

Password generated from the Theme Access app or an Admin API token.

Anchor to --path <value>
--path <value>
string
env: SHOPIFY_FLAG_PATH

The path where you want to run the command. Defaults to the current working directory.

Anchor to --preview-id <value>
--preview-id <value>
string
env: SHOPIFY_FLAG_PREVIEW_ID

An existing preview identifier to update instead of creating a new preview.

Anchor to --verbose
--verbose
env: SHOPIFY_FLAG_VERBOSE

Increase the verbosity of the output.

Anchor to -e, --environment <value>
-e, --environment <value>
string
env: SHOPIFY_FLAG_ENVIRONMENT

The environment to apply to the current command.

Anchor to -s, --store <value>
-s, --store <value>
string
env: SHOPIFY_FLAG_STORE

Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).


Was this page helpful?