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.
Anchor to flagsFlags
The following flags are available for the theme preview command:
- Anchor to --overrides <value>--overrides <value>--overrides <value>stringstringrequiredrequiredenv: SHOPIFY_FLAG_OVERRIDESenv: SHOPIFY_FLAG_OVERRIDES
Path to a JSON overrides file.
- Anchor to -t, --theme <value>-t, --theme <value>-t, --theme <value>stringstringrequiredrequiredenv: SHOPIFY_FLAG_THEME_IDenv: SHOPIFY_FLAG_THEME_ID
Theme ID or name of the remote theme.
- Anchor to --json--json--jsonenv: SHOPIFY_FLAG_JSONenv: SHOPIFY_FLAG_JSON
Output the preview URL and identifier as JSON.
- Anchor to --no-color--no-color--no-colorenv: SHOPIFY_FLAG_NO_COLORenv: SHOPIFY_FLAG_NO_COLOR
Disable color output.
- Anchor to --open--open--openenv: SHOPIFY_FLAG_OPENenv: SHOPIFY_FLAG_OPEN
Automatically launch the theme preview in your default web browser.
- Anchor to --password <value>--password <value>--password <value>stringstringenv: SHOPIFY_CLI_THEME_TOKENenv: SHOPIFY_CLI_THEME_TOKEN
Password generated from the Theme Access app or an Admin API token.
- Anchor to --path <value>--path <value>--path <value>stringstringenv: SHOPIFY_FLAG_PATHenv: 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>--preview-id <value>stringstringenv: SHOPIFY_FLAG_PREVIEW_IDenv: SHOPIFY_FLAG_PREVIEW_ID
An existing preview identifier to update instead of creating a new preview.
- Anchor to --verbose--verbose--verboseenv: SHOPIFY_FLAG_VERBOSEenv: SHOPIFY_FLAG_VERBOSE
Increase the verbosity of the output.
- Anchor to -e, --environment <value>-e, --environment <value>-e, --environment <value>stringstringenv: SHOPIFY_FLAG_ENVIRONMENTenv: SHOPIFY_FLAG_ENVIRONMENT
The environment to apply to the current command.
- Anchor to -s, --store <value>-s, --store <value>-s, --store <value>stringstringenv: SHOPIFY_FLAG_STOREenv: 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).