Migrate from a Partner Dashboard-managed app to Shopify CLI
If you've been using the Partner Dashboard to manage your app, then you should consider importing it and using Shopify CLI to manage it instead for the following reasons:
- You can use familiar version control (like Git) to manage changes to your configuration over time because your app configuration is defined in code,
- CLI-managed apps can can use features like extensions or Shopify functions.
- Certain elements of app configuration can only be managed using the CLI, such as handles.
- You don't need to port your web app and focus only on app configuration.
- If you have multiple apps for different environments, such as staging and production, you can manage everything in a single local project.
Requirements
Anchor link to section titled "Requirements"- You've installed Shopify CLI
- The latest version of Chrome or Firefox
What you'll learn
Anchor link to section titled "What you'll learn"In this tutorial, you'll learn the following:
- How to set up a new local project for an existing app
- How to add Shopify CLI as a project dependency
Step 1: Create a new app
Anchor link to section titled "Step 1: Create a new app"Set up a new local project using Shopify CLI.
Create a new app and choose Start by adding your first extension in the set up process.
Step 2: Import the configuration from your existing app
Anchor link to section titled "Step 2: Import the configuration from your existing app"Connect the new app project to your existing app.
- Run the
shopify app config link
command and select connect it to an existing app. - Inspect the
shopify.app.toml
file to make sure you have correctly imported the configuration from your existing app. You can always run the command again to link to a different app.
You've successfully moved your app to Shopify CLI. Instead of going to the Partner Dashboard, you can now make changes by updating the shopify.app.toml
file and then running the shopify app deploy
command. This command releases a new app version to app users.
Find out more about deploying and releasing app versions.
You now have a local project that's linked to your existing Shopify app. What's next?
Manage multiple environments
Anchor link to section titled "Manage multiple environments"If you have multiple apps that represent different environments, you can manage these through a single app project. Run the shopify app config link
command, select connect it to an existing app, and choose the additional environment. You can give the imported app.toml
config file a different name.
You can switch between multiple configuration files that represent different environments by providing the --config
flag to CLI commands, or using the shopify app config use
command to set the default environment.
Find out more about managing multiple app configurations and environments.
Add your first extension
Anchor link to section titled "Add your first extension"With a local project set up with Shopify CLI, you can start to introduce app extensions. You can build a checkout or storefront customization, or Shopify function. You can add your first extension by running shopify app generate extension
. To preview your extension during development, run shopify app dev
.
Find out more about app extensions.