theme duplicatecommand
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:
Anchor to flagsFlags
The following flags are available for the theme duplicate
command:
- Anchor to --no-color--no-colorenv: SHOPIFY_FLAG_NO_COLOR
Disable color output.
- Anchor to --password <value>--password <value>stringenv: SHOPIFY_CLI_THEME_TOKEN
Password generated from the Theme Access app.
- Anchor to --verbose--verboseenv: SHOPIFY_FLAG_VERBOSE
Increase the verbosity of the output.
- Anchor to -e, --environment <value>-e, --environment <value>stringenv: SHOPIFY_FLAG_ENVIRONMENT
The environment to apply to the current command.
- Anchor to -f, --force-f, --forceenv: SHOPIFY_FLAG_FORCE
Force the duplicate operation to run without prompts or confirmations.
- Anchor to -j, --json-j, --jsonenv: SHOPIFY_FLAG_JSON
Output the result as JSON.
- Anchor to -n, --name <value>-n, --name <value>stringenv: SHOPIFY_FLAG_NAME
Name of the newly duplicated theme.
- Anchor to -s, --store <value>-s, --store <value>stringenv: 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).
- Anchor to -t, --theme <value>-t, --theme <value>stringenv: SHOPIFY_FLAG_THEME_ID
Theme ID or name of the remote theme.
themeduplicate
- --no-color
Disable color output.
""
- --password <value>
Password generated from the Theme Access app.
string
- --verbose
Increase the verbosity of the output.
""
- -e, --environment <value>
The environment to apply to the current command.
string
- -f, --force
Force the duplicate operation to run without prompts or confirmations.
""
- -j, --json
Output the result as JSON.
""
- -n, --name <value>
Name of the newly duplicated theme.
string
- -s, --store <value>
Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).
string
- -t, --theme <value>
Theme ID or name of the remote theme.
string
export interface themeduplicate {
/**
* The environment to apply to the current command.
* @environment SHOPIFY_FLAG_ENVIRONMENT
*/
'-e, --environment <value>'?: string
/**
* Force the duplicate operation to run without prompts or confirmations.
* @environment SHOPIFY_FLAG_FORCE
*/
'-f, --force'?: ''
/**
* Output the result as JSON.
* @environment SHOPIFY_FLAG_JSON
*/
'-j, --json'?: ''
/**
* Name of the newly duplicated theme.
* @environment SHOPIFY_FLAG_NAME
*/
'-n, --name <value>'?: string
/**
* Disable color output.
* @environment SHOPIFY_FLAG_NO_COLOR
*/
'--no-color'?: ''
/**
* Password generated from the Theme Access app.
* @environment SHOPIFY_CLI_THEME_TOKEN
*/
'--password <value>'?: string
/**
* Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).
* @environment SHOPIFY_FLAG_STORE
*/
'-s, --store <value>'?: string
/**
* Theme ID or name of the remote theme.
* @environment SHOPIFY_FLAG_THEME_ID
*/
'-t, --theme <value>'?: string
/**
* Increase the verbosity of the output.
* @environment SHOPIFY_FLAG_VERBOSE
*/
'--verbose'?: ''
}
Theme duplicate
examples
theme duplicate
theme duplicate
shopify theme duplicate shopify theme duplicate --theme 10 --name 'New Theme'