Shopify CLI Docs

shopify theme preview

Applies JSON overrides to a theme and returns a preview URL.

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.

Usage

shopify theme preview [flags]

Summary

Applies JSON overrides to a theme and returns a preview URL.

Flags

  • --json — Output the preview URL and identifier as JSON. optional Environment: SHOPIFY_FLAG_JSON.
  • --no-color — Disable color output. optional Environment: SHOPIFY_FLAG_NO_COLOR.
  • --open — Automatically launch the theme preview in your default web browser. optional Environment: SHOPIFY_FLAG_OPEN.
  • --overrides <value> string — Path to a JSON overrides file. required Environment: SHOPIFY_FLAG_OVERRIDES.
  • --password <value> string — Password generated from the Theme Access app or an Admin API token. optional Environment: SHOPIFY_CLI_THEME_TOKEN.
  • --path <value> string — The path where you want to run the command. Defaults to the current working directory. optional Environment: SHOPIFY_FLAG_PATH.
  • --preview-id <value> string — An existing preview identifier to update instead of creating a new preview. optional Environment: SHOPIFY_FLAG_PREVIEW_ID.
  • --verbose — Increase the verbosity of the output. optional Environment: SHOPIFY_FLAG_VERBOSE.
  • -e, --environment <value> string — The environment to apply to the current command. optional Environment: SHOPIFY_FLAG_ENVIRONMENT.
  • -s, --store <value> string — Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com). optional Environment: SHOPIFY_FLAG_STORE.
  • -t, --theme <value> string — Theme ID or name of the remote theme. required Environment: SHOPIFY_FLAG_THEME_ID.

Official source

On this page