Skip to main content

theme duplicate
command

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:

{
"theme": {
"id": 108267175958,
"name": "A Duplicated Theme",
"role": "unpublished",
"shop": "mystore.myshopify.com"
}
}
{
"message": "The theme 'Summer Edition' could not be duplicated due to errors",
"errors": ["Maximum number of themes reached"],
"requestId": "12345-abcde-67890"
}

The following flags are available for the theme duplicate command:

env: SHOPIFY_FLAG_NO_COLOR

Disable color output.

string
env: SHOPIFY_CLI_THEME_TOKEN

Password generated from the Theme Access app.

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.

env: SHOPIFY_FLAG_FORCE

Force the duplicate operation to run without prompts or confirmations.

env: SHOPIFY_FLAG_JSON

Output the result as JSON.

string
env: SHOPIFY_FLAG_NAME

Name of the newly duplicated theme.

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

string
env: SHOPIFY_FLAG_THEME_ID

Theme ID or name of the remote theme.

Was this section helpful?

Theme duplicate

shopify theme duplicate

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