--- title: theme duplicate description: >- 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" } ``` api_name: shopify-cli 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' --- # 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 { "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" } ``` ```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: * **--no-color** **env: SHOPIFY\_FLAG\_NO\_COLOR** Disable color output. * **--password \** **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. * **-e, --environment \** **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. * **-j, --json** **env: SHOPIFY\_FLAG\_JSON** Output the result as JSON. * **-n, --name \** **string** **env: SHOPIFY\_FLAG\_NAME** Name of the newly duplicated theme. * **-s, --store \** **string** **env: SHOPIFY\_FLAG\_STORE** Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, ). * **-t, --theme \** **string** **env: SHOPIFY\_FLAG\_THEME\_ID** Theme ID or name of the remote theme. Examples ### Examples * #### theme duplicate ##### theme duplicate ```bash shopify theme duplicate shopify theme duplicate --theme 10 --name 'New Theme' ```