---
title: theme preview
description: Applies a JSON overrides file to a theme and creates or updates a preview.
source_url:
  html: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-preview'
  md: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-preview.md'
api_name: shopify-cli
---

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

#### Flags

The following flags are available for the `theme preview` command:

* **--overrides \<value>**

  **string**

  **required**

  **env: SHOPIFY\_FLAG\_OVERRIDES**

  Path to a JSON overrides file.

* **-t, --theme \<value>**

  **string**

  **required**

  **env: SHOPIFY\_FLAG\_THEME\_ID**

  Theme ID or name of the remote theme.

* **--auth-alias \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_AUTH\_ALIAS**

  Alias of the Shopify account to use for authentication.

* **--json**

  **env: SHOPIFY\_FLAG\_JSON**

  Output the preview URL and identifier as JSON.

* **--json-schema**

  **env: SHOPIFY\_FLAG\_JSON\_SCHEMA**

  Print the command's JSON schemas.

* **--no-color**

  **env: SHOPIFY\_FLAG\_NO\_COLOR**

  Disable color output.

* **--no-input**

  **env: SHOPIFY\_FLAG\_NO\_INPUT**

  Disable interactive prompts and browser authentication.

* **--open**

  **env: SHOPIFY\_FLAG\_OPEN**

  Automatically launch the theme preview in your default web browser.

* **--password \<value>**

  **string**

  **env: SHOPIFY\_CLI\_THEME\_TOKEN**

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

* **--path \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_PATH**

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

* **--preview-id \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_PREVIEW\_ID**

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

* **--verbose**

  **env: SHOPIFY\_FLAG\_VERBOSE**

  Increase the verbosity of the output. May include sensitive data.

* **-e, --environment \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_ENVIRONMENT**

  The environment to apply to the current command.

* **-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>).

Examples

### Examples

* ####

  ##### theme preview

  ```sh
  shopify theme preview [flags]
  ```

***
