theme pushcommand
Uploads your local theme files to Shopify, overwriting the remote version if specified.
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
You can run this command only in a directory that matches the default Shopify theme folder structure.
This command returns the following information:
- A link to the editor for the theme in the Shopify admin.
- A preview link that you can share with others.
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 output:
Anchor to flagsFlags
The following flags are available for the theme push
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 --path <value>--path <value>stringenv: SHOPIFY_FLAG_PATH
The path where you want to run the command. Defaults to the current working directory.
- Anchor to --strict--strictenv: SHOPIFY_FLAG_STRICT_PUSH
Require theme check to pass without errors before pushing. Warnings are allowed.
- Anchor to --verbose--verboseenv: SHOPIFY_FLAG_VERBOSE
Increase the verbosity of the output.
- Anchor to -a, --allow-live-a, --allow-liveenv: SHOPIFY_FLAG_ALLOW_LIVE
Allow push to a live theme.
- Anchor to -d, --development-d, --developmentenv: SHOPIFY_FLAG_DEVELOPMENT
Push theme files from your remote development theme.
- Anchor to -e, --environment <value>-e, --environment <value>stringenv: SHOPIFY_FLAG_ENVIRONMENT
The environment to apply to the current command.
- Anchor to -j, --json-j, --jsonenv: SHOPIFY_FLAG_JSON
Output the result as JSON.
- Anchor to -l, --live-l, --liveenv: SHOPIFY_FLAG_LIVE
Push theme files from your remote live theme.
- Anchor to -n, --nodelete-n, --nodeleteenv: SHOPIFY_FLAG_NODELETE
Prevent deleting remote files that don't exist locally.
- Anchor to -o, --only <value>-o, --only <value>stringenv: SHOPIFY_FLAG_ONLY
Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
- Anchor to -p, --publish-p, --publishenv: SHOPIFY_FLAG_PUBLISH
Publish as the live theme after uploading.
- 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.
- Anchor to -u, --unpublished-u, --unpublishedenv: SHOPIFY_FLAG_UNPUBLISHED
Create a new unpublished theme and push to it.
- Anchor to -x, --ignore <value>-x, --ignore <value>stringenv: SHOPIFY_FLAG_IGNORE
Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
themepush
- --no-color
Disable color output.
""
- --password <value>
Password generated from the Theme Access app.
string
- --path <value>
The path where you want to run the command. Defaults to the current working directory.
string
- --strict
Require theme check to pass without errors before pushing. Warnings are allowed.
""
- --verbose
Increase the verbosity of the output.
""
- -a, --allow-live
Allow push to a live theme.
""
- -d, --development
Push theme files from your remote development theme.
""
- -e, --environment <value>
The environment to apply to the current command.
string
- -j, --json
Output the result as JSON.
""
- -l, --live
Push theme files from your remote live theme.
""
- -n, --nodelete
Prevent deleting remote files that don't exist locally.
""
- -o, --only <value>
Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
string
- -p, --publish
Publish as the live theme after uploading.
""
- -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
- -u, --unpublished
Create a new unpublished theme and push to it.
""
- -x, --ignore <value>
Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
string
export interface themepush {
/**
* Allow push to a live theme.
* @environment SHOPIFY_FLAG_ALLOW_LIVE
*/
'-a, --allow-live'?: ''
/**
* Push theme files from your remote development theme.
* @environment SHOPIFY_FLAG_DEVELOPMENT
*/
'-d, --development'?: ''
/**
* The environment to apply to the current command.
* @environment SHOPIFY_FLAG_ENVIRONMENT
*/
'-e, --environment <value>'?: string
/**
* Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
* @environment SHOPIFY_FLAG_IGNORE
*/
'-x, --ignore <value>'?: string
/**
* Output the result as JSON.
* @environment SHOPIFY_FLAG_JSON
*/
'-j, --json'?: ''
/**
* Push theme files from your remote live theme.
* @environment SHOPIFY_FLAG_LIVE
*/
'-l, --live'?: ''
/**
* Disable color output.
* @environment SHOPIFY_FLAG_NO_COLOR
*/
'--no-color'?: ''
/**
* Prevent deleting remote files that don't exist locally.
* @environment SHOPIFY_FLAG_NODELETE
*/
'-n, --nodelete'?: ''
/**
* Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
* @environment SHOPIFY_FLAG_ONLY
*/
'-o, --only <value>'?: string
/**
* Password generated from the Theme Access app.
* @environment SHOPIFY_CLI_THEME_TOKEN
*/
'--password <value>'?: string
/**
* The path where you want to run the command. Defaults to the current working directory.
* @environment SHOPIFY_FLAG_PATH
*/
'--path <value>'?: string
/**
* Publish as the live theme after uploading.
* @environment SHOPIFY_FLAG_PUBLISH
*/
'-p, --publish'?: ''
/**
* 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
/**
* Require theme check to pass without errors before pushing. Warnings are allowed.
* @environment SHOPIFY_FLAG_STRICT_PUSH
*/
'--strict'?: ''
/**
* Theme ID or name of the remote theme.
* @environment SHOPIFY_FLAG_THEME_ID
*/
'-t, --theme <value>'?: string
/**
* Create a new unpublished theme and push to it.
* @environment SHOPIFY_FLAG_UNPUBLISHED
*/
'-u, --unpublished'?: ''
/**
* Increase the verbosity of the output.
* @environment SHOPIFY_FLAG_VERBOSE
*/
'--verbose'?: ''
}
Theme push
examples
theme push
theme push
shopify theme push shopify theme push --unpublished --json