A lightweight command-line tool that seamlessly deploys Shopify apps to Heroku and synchronizes environment variables between platforms.
Install globally via npm:
npm install -g shopify-heroku-cli
This will make the shopify-heroku
command available globally on your system.
- Shopify CLI installed and authenticated
- Heroku CLI installed and authenticated
- A Shopify app configured in your environment
- A Heroku app created and ready to use
-
Install the CLI globally:
npm install -g shopify-heroku-cli
-
Set up your environment variables:
shopify-heroku set-env your-heroku-app-name
-
Deploy your app:
shopify-heroku deploy your-heroku-app-name
Typical Workflow:
# Create a Heroku app (if you haven't already)
heroku create my-shopify-app
# Set your environment variables
shopify-heroku set-env my-shopify-app
# Deploy your app
shopify-heroku deploy my-shopify-app
# Open your app in browser
heroku open --app my-shopify-app
set-env
command:
- Automatically syncs Shopify environment variables to your Heroku app
- Configures
SHOPIFY_API_KEY
andSHOPIFY_API_SECRET
from your Shopify app - Adds your Heroku app URL as
SHOPIFY_APP_URL
in the environment
deploy
command:
- Sets up Heroku container stack configuration
- Manages git remote setup for Heroku
- Deploys your app with a single command
- Handles branch detection (main/master) automatically
Authentication Issues:
- Ensure you're logged in to both Shopify CLI and Heroku CLI
- Run
shopify auth
andheroku login
if needed
Deployment Fails:
- Check that your Heroku app exists with
heroku apps
- Verify your git repository is properly initialized
Environment Variables:
- If variables aren't setting properly, try running
shopify-heroku set-env
again - Confirm your Shopify app is properly configured
Contributions are welcome! Please feel free to submit a Pull Request.
MIT © 2025 Mohamad Nashaat