---
title: theme publish
description: Publishes an unpublished theme from your theme library.
source_url:
  html: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-publish'
  md: 'https://shopify.dev/docs/api/shopify-cli/theme/theme-publish.md'
api_name: shopify-cli
---

# theme publish

Publishes an unpublished theme from your theme library.

If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.

You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).

If you want to publish your local theme, then you need to run `shopify theme push` first. You're asked to confirm that you want to publish the specified theme. You can skip this confirmation using the `--force` flag.

#### Flags

The following flags are available for the `theme publish` command:

* **--auth-alias \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_AUTH\_ALIAS**

  Alias of the Shopify account to use for authentication.

* **--json-schema**

  **env: SHOPIFY\_FLAG\_JSON\_SCHEMA**

  Print the command's JSON schemas.

* **--no-color**

  **env: SHOPIFY\_FLAG\_NO\_COLOR**

  Disable color output.

* **--no-input**

  **env: SHOPIFY\_FLAG\_NO\_INPUT**

  Disable interactive prompts and browser authentication.

* **--password \<value>**

  **string**

  **env: SHOPIFY\_CLI\_THEME\_TOKEN**

  Password generated from the Theme Access app or an Admin API token.

* **--path \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_PATH**

  The path where you want to run the command. Defaults to the current working directory.

* **--verbose**

  **env: SHOPIFY\_FLAG\_VERBOSE**

  Increase the verbosity of the output. May include sensitive data.

* **-e, --environment \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_ENVIRONMENT**

  The environment to apply to the current command.

* **-f, --force**

  **env: SHOPIFY\_FLAG\_FORCE**

  Skip confirmation. Required if non interactive.

* **-s, --store \<value>**

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

* **-t, --theme \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_THEME\_ID**

  Theme ID or name of the remote theme. Required if non interactive.

### Examples

* #### Theme publish

  ##### theme publish

  ```sh
  shopify theme publish [flags]
  ```

***
