app devcommand
Builds the app and lets you preview it on a development store or Plus sandbox store.
Development store preview of extension drafts is not supported for Plus sandbox stores. You must deploy
your app.
To preview your app on a development store or Plus sandbox store, Shopify CLI walks you through the following steps. If you've run dev
before, then your settings are saved and some of these steps are skipped. You can reset these configurations using dev --reset
to go through all of them again:
Associating your project with an app associated with your Partner account or organization, or creating a new app.
Selecting a development store or Plus sandbox store to use for testing. If you have only one store, then it's selected automatically.
Installing your app on the store using the provided install link.
Creating a tunnel between your local environment and the store using Cloudflare.
You can use your own tunneling software instead, by passing your tunnel URL with the
--tunnel-url
flag.Updating the app URLs that are set in the Partner Dashboard.
To avoid overwriting any URLs that are already set, select the No, never option. If you select this option, then you're provided with URLs that you can manually add in the Partner Dashboard so you can preview your app.
Enabling development store preview for extensions.
Serving GraphiQL for the Admin API using your app's credentials and access scopes.
Building and serving your app and app extensions.
If you're using the Ruby app template, then you need to complete the following steps outlined in the README before you can preview your app for the first time.
To use a development store or Plus sandbox store with Shopify CLI, you need to be the store owner, or have a staff account on the store. Staff accounts are created automatically the first time you access a development store with your Partner staff account through the Partner Dashboard.
Anchor to flagsFlags
The following flags are available for the app dev
command:
- Anchor to --checkout-cart-url <value>--checkout-cart-url <value>stringenv: SHOPIFY_FLAG_CHECKOUT_CART_URL
Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"
- Anchor to --client-id <value>--client-id <value>stringenv: SHOPIFY_FLAG_CLIENT_ID
The Client ID of your app.
- Anchor to --localhost-port <value>--localhost-port <value>stringenv: SHOPIFY_FLAG_LOCALHOST_PORT
Port to use for localhost.
- Anchor to --no-color--no-colorenv: SHOPIFY_FLAG_NO_COLOR
Disable color output.
- Anchor to --no-update--no-updateenv: SHOPIFY_FLAG_NO_UPDATE
Skips the Partners Dashboard URL update step.
- Anchor to --notify <value>--notify <value>stringenv: SHOPIFY_FLAG_NOTIFY
The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.
- Anchor to --path <value>--path <value>stringenv: SHOPIFY_FLAG_PATH
The path to your app directory.
- Anchor to --reset--resetenv: SHOPIFY_FLAG_RESET
Reset all your settings.
- Anchor to --skip-dependencies-installation--skip-dependencies-installationenv: SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION
Skips the installation of dependencies. Deprecated, use workspaces instead.
- Anchor to --subscription-product-url <value>--subscription-product-url <value>stringenv: SHOPIFY_FLAG_SUBSCRIPTION_PRODUCT_URL
Resource URL for subscription UI extension. Format: "/products/{productId}"
- Anchor to --theme-app-extension-port <value>--theme-app-extension-port <value>stringenv: SHOPIFY_FLAG_THEME_APP_EXTENSION_PORT
Local port of the theme app extension development server.
- Anchor to --tunnel-url <value>--tunnel-url <value>stringenv: SHOPIFY_FLAG_TUNNEL_URL
Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".
- Anchor to --use-localhost--use-localhostenv: SHOPIFY_FLAG_USE_LOCALHOST
Service entry point will listen to localhost. A tunnel won't be used. Will work for testing many app features, but not those that directly invoke your app (E.g: Webhooks)
- Anchor to --verbose--verboseenv: SHOPIFY_FLAG_VERBOSE
Increase the verbosity of the output.
- Anchor to -c, --config <value>-c, --config <value>stringenv: SHOPIFY_FLAG_APP_CONFIG
The name of the app configuration.
- Anchor to -s, --store <value>-s, --store <value>stringenv: SHOPIFY_FLAG_STORE
Store URL. Must be an existing development or Shopify Plus sandbox store.
- Anchor to -t, --theme <value>-t, --theme <value>stringenv: SHOPIFY_FLAG_THEME
Theme ID or name of the theme app extension host theme.
appdev
- --checkout-cart-url <value>
Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"
string
- --client-id <value>
The Client ID of your app.
string
- --localhost-port <value>
Port to use for localhost.
string
- --no-color
Disable color output.
""
- --no-update
Skips the Partners Dashboard URL update step.
""
- --notify <value>
The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.
string
- --path <value>
The path to your app directory.
string
- --reset
Reset all your settings.
""
- --skip-dependencies-installation
Skips the installation of dependencies. Deprecated, use workspaces instead.
""
- --subscription-product-url <value>
Resource URL for subscription UI extension. Format: "/products/{productId}"
string
- --theme-app-extension-port <value>
Local port of the theme app extension development server.
string
- --tunnel-url <value>
Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".
string
- --use-localhost
Service entry point will listen to localhost. A tunnel won't be used. Will work for testing many app features, but not those that directly invoke your app (E.g: Webhooks)
""
- --verbose
Increase the verbosity of the output.
""
- -c, --config <value>
The name of the app configuration.
string
- -s, --store <value>
Store URL. Must be an existing development or Shopify Plus sandbox store.
string
- -t, --theme <value>
Theme ID or name of the theme app extension host theme.
string
export interface appdev {
/**
* Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"
* @environment SHOPIFY_FLAG_CHECKOUT_CART_URL
*/
'--checkout-cart-url <value>'?: string
/**
* The Client ID of your app.
* @environment SHOPIFY_FLAG_CLIENT_ID
*/
'--client-id <value>'?: string
/**
* The name of the app configuration.
* @environment SHOPIFY_FLAG_APP_CONFIG
*/
'-c, --config <value>'?: string
/**
* Port to use for localhost.
* @environment SHOPIFY_FLAG_LOCALHOST_PORT
*/
'--localhost-port <value>'?: string
/**
* Disable color output.
* @environment SHOPIFY_FLAG_NO_COLOR
*/
'--no-color'?: ''
/**
* Skips the Partners Dashboard URL update step.
* @environment SHOPIFY_FLAG_NO_UPDATE
*/
'--no-update'?: ''
/**
* The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.
* @environment SHOPIFY_FLAG_NOTIFY
*/
'--notify <value>'?: string
/**
* The path to your app directory.
* @environment SHOPIFY_FLAG_PATH
*/
'--path <value>'?: string
/**
* Reset all your settings.
* @environment SHOPIFY_FLAG_RESET
*/
'--reset'?: ''
/**
* Skips the installation of dependencies. Deprecated, use workspaces instead.
* @environment SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION
*/
'--skip-dependencies-installation'?: ''
/**
* Store URL. Must be an existing development or Shopify Plus sandbox store.
* @environment SHOPIFY_FLAG_STORE
*/
'-s, --store <value>'?: string
/**
* Resource URL for subscription UI extension. Format: "/products/{productId}"
* @environment SHOPIFY_FLAG_SUBSCRIPTION_PRODUCT_URL
*/
'--subscription-product-url <value>'?: string
/**
* Theme ID or name of the theme app extension host theme.
* @environment SHOPIFY_FLAG_THEME
*/
'-t, --theme <value>'?: string
/**
* Local port of the theme app extension development server.
* @environment SHOPIFY_FLAG_THEME_APP_EXTENSION_PORT
*/
'--theme-app-extension-port <value>'?: string
/**
* Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".
* @environment SHOPIFY_FLAG_TUNNEL_URL
*/
'--tunnel-url <value>'?: string
/**
* Service entry point will listen to localhost. A tunnel won't be used. Will work for testing many app features, but not those that directly invoke your app (E.g: Webhooks)
* @environment SHOPIFY_FLAG_USE_LOCALHOST
*/
'--use-localhost'?: ''
/**
* Increase the verbosity of the output.
* @environment SHOPIFY_FLAG_VERBOSE
*/
'--verbose'?: ''
}
App dev
examples
app dev
app dev
shopify app dev [flags]