Shopify CLI command reference (Ruby on Rails)

This reference lists the Ruby on Rails commands that you can use with Shopify CLI. Commands in this group use the syntax shopify rails [command].

To access help for any of these commands from the command line, use shopify rails [command] -h.


Connects an existing Shopify CLI project to a Partner account or to a specific Shopify development store.

The connect command re-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.


Creates a new project of the specified type. The project is created in a subdirectory of the current directory:

Shopify CLI then prompts you to enter a name for your project:


Deploys the current app to a hosting service. Currently, the only option is Heroku.


Generates boilerplate code inside your app project. Rails projects support generating new webhooks.


Opens your local development app in your default browser.


Starts a local development server for your project and a public ngrok tunnel to your localhost.


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 an authentication token. You can find it in your ngrok dashboard. Copy your token and use it with the tunnel [project type] auth command:

This writes your ngrok auth token to ~/.ngrok2/ngrok.yml. To learn more about ngrok configuration, refer to ngrok’s documentation.

To start an ngrok tunnel to your app in your localhost development environment:

To stop the running ngrok tunnel:

Next steps