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:
Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"
The Client ID of your app.
Port to use for localhost.
Disable color output.
Skips the Partners Dashboard URL update step.
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.
The path to your app directory.
Reset all your settings.
Skips the installation of dependencies. Deprecated, use workspaces instead.
Resource URL for subscription UI extension. Format: "/products/{productId}"
Local port of the theme app extension development server.
Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".
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)
Increase the verbosity of the output.
The name of the app configuration.
Store URL. Must be an existing development or Shopify Plus sandbox store.
Theme ID or name of the theme app extension host theme.