---
title: theme duplicate
description: >-
  If you want to duplicate your local theme, you need to run shopify theme push
  first.
source_url:
  html: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-duplicate'
  md: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-duplicate.md'
api_name: shopify-cli
---

# theme duplicate

If you want to duplicate your local theme, you need to run `shopify theme push` first.

If no theme ID is specified, you're prompted to select the theme that you want to duplicate from the list of themes in your store. You're asked to confirm that you want to duplicate the specified theme.

Prompts and confirmations are not shown when duplicate is run in a CI environment or the `--force` flag is used, therefore you must specify a theme ID using the `--theme` flag.

You can optionally name the duplicated theme using the `--name` flag.

If you use the `--json` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.

Sample JSON output:

```json
{
  "theme": {
    "id": 108267175958,
    "name": "A Duplicated Theme",
    "role": "unpublished",
    "shop": "mystore.myshopify.com"
  }
}
```

```json
{
  "message": "The theme 'Summer Edition' could not be duplicated due to errors",
  "errors": ["Maximum number of themes reached"],
  "requestId": "12345-abcde-67890"
}
```

#### Flags

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

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

  **string**

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

  Alias of the Shopify account to use for authentication.

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

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

  **string**

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

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

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

* **-f, --force**

  **env: SHOPIFY\_FLAG\_FORCE**

  Force the duplicate operation to run without prompts or confirmations. Required if non interactive outside CI.

* **-j, --json**

  **env: SHOPIFY\_FLAG\_JSON**

  Output the result as JSON. Automatically disables color output.

* **-n, --name \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_NAME**

  Name of the newly duplicated theme.

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

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

  **string**

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

  Theme ID or name of the remote theme. Required if non interactive.

Examples

### Examples

* ####

  ##### theme duplicate

  ```sh
  shopify theme duplicate

  shopify theme duplicate --theme 10 --name 'New Theme'
  ```

***
