Shopify App CLI command reference (Ruby on Rails)

This reference lists the Ruby on Rails commands that you can use with Shopify App CLI.

deploy

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

Terminal
$ shopify deploy heroku

generate

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

Terminal
$ shopify generate webhook

open

Opens your local development app in your default browser.

Terminal
$ shopify open

populate

Adds example data to your development store. This is useful for testing your app’s behavior. You can create the following types of example store records:

  • Products
  • Customers
  • Draft orders
Terminal
$ shopify populate products
$ shopify populate customers
$ shopify populate draftorders

By default, the populate command adds 5 records. Use the --count option to specify a different number:

Terminal
$ shopify populate products --count 10

serve

Starts a local development server for your project, as well as a public ngrok tunnel to your localhost.

Terminal
$ shopify serve

tunnel

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 auth command:

Terminal
$ shopify tunnel auth <token>

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:

Terminal
$ shopify tunnel start

To stop the running ngrok tunnel:

Terminal
$ shopify tunnel stop

Next steps