shopify theme duplicate
Duplicates a theme from your theme library.
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"
}Usage
shopify theme duplicate
shopify theme duplicate --theme 10 --name 'New Theme'Summary
Duplicates a theme from your theme library.
Flags
--no-color— Disable color output. optional Environment:SHOPIFY_FLAG_NO_COLOR.--password <value>string— Password generated from the Theme Access app or an Admin API token. optional Environment:SHOPIFY_CLI_THEME_TOKEN.--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.-f, --force— Force the duplicate operation to run without prompts or confirmations. optional Environment:SHOPIFY_FLAG_FORCE.-j, --json— Output the result as JSON. Automatically disables color output. optional Environment:SHOPIFY_FLAG_JSON.-n, --name <value>string— Name of the newly duplicated theme. optional Environment:SHOPIFY_FLAG_NAME.-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. optional Environment:SHOPIFY_FLAG_THEME_ID.