Shopify CLI app commands
This reference lists the Shopify CLI commands for apps. The basic syntax for these commands is shopify app <command>
.
To get help and tips from the command line, type a command with the flag -h
:
Creates a project in a new subdirectory of the current directory.
Specify one of the following frameworks in your command after create
:
After you enter the command, you're prompted to name your project.
Connects an existing Shopify CLI project to a Partner account or to a specific Shopify development store.
The connect
command creates the project's .env
and .shopify-cli.yml
files if they don't exist, or updates the files if they do exist.
.env
contains sensitive information that provides functionality to your app, such as the app key. As a result, this file shouldn't be saved to a version control system.shopify-cli.yml
contains insensitive information required for a project to work with Shopify CLI, such as the project type.
This command is useful if you're working on one project across multiple computers, or if you're collaborating with other developers using a version control system like Git.
Deploys the current app to a hosting service. Currently, the only option is Heroku.
Opens your local development app in your default browser.
Starts a local development server for your project, creates a public ngrok tunnel to your localhost, and updates your app URLs. You can override the app URL updates using the --no-update
flag.
You need to authenticate with ngrok using the shopify app tunnel auth
command before you run this command.
Optional parameters
Anchor link to section titled "Optional parameters"Parameter | Description |
---|---|
--host=<URL> |
Bypass the tunnel and use a custom host. This value must be an HTTPS URL. |
--port=<PORT> |
Use a custom port. |
--no-update |
Don't update the App URLs that are set in the Partner Dashboard to use your ngrok URL. You might want to use this option if you're working on an app that's already deployed in one or more merchant stores. |
Controls an HTTP tunnel to your local development app using ngrok. With the tunnel
command, you can authenticate with ngrok and start or stop the tunnel.
To authenticate with ngrok, you need to create an ngrok account, and then create an authentication token from your ngrok dashboard. Copy your token and use it with the auth command:
To learn more about creating a token, refer to ngrok’s documentation.
You need to run this command before you start a new tunnel using the tunnel start
or serve
commands.
Start an ngrok tunnel to your app in your localhost development environment.
You need to authenticate with ngrok using the shopify app tunnel auth
command before you run this command.
Stop the running ngrok tunnel:
- Learn how to create and manage different types of projects with Shopify CLI.
- Familiarize yourself with the core commands for Shopify CLI.