cli icon indicating copy to clipboard operation
cli copied to clipboard

[Feature]:Base shopify.app.toml as template

Open stephen-christie-ss opened this issue 1 year ago • 7 comments

What area(s) will this request affect?

App

What type of change do you want to see?

Substantial change to existing feature

Overview

It is possible to create a new app from scratch, or to link to an existing app and pull its configuration into an app config TOML. However, there seems to be no way to create a new app according to a template.

The current support for deployment-specific configuration files provide the capabilities needed for Continuous Deployment with a powerful GitOps-style infrastructure-as-code. However, there is currently no build-in way to prepare a new app for deployment according to specifications committed to the repository as a template configuration file.

When starting to use the Shopify CLI for app configuration management, my assumption was that an shopify.app.toml without a app's client_id would be used as a template for creating new apps, or as a base for configurations to be inherited by the other app configuration files.

Proposal: Provide a tool, alongside 'shopify app link', which lets you create a new app according to the existing configuration in shopify.app.toml (including oauth scopes, etc.). This tool should not require that the template configuration is fully specified with client_id, etc. Note: this would still be compatible with the use of the shopify.app.toml as the default deployment, but I believe that the development workflow would be more obvious if this approach was to deprecated in favor of using it only as the template. If necessary, a separate template file could be introduced instead.

Motivation

We use GitLab CI for testing and deployment, and follow their recommendation to automatically deploy each feature development branch for review. This means setting up a new app for each development. Currently, this will also require managing a template of the shopify.app.toml with our own code during CI, to interface with the Shopify CLI's app configuration capabilites.

stephen-christie-ss avatar Mar 08 '24 19:03 stephen-christie-ss

My attempt to accomplish this functionality with external templating tools was met with a hard blocker, since creating an app through these tools requires a CLI:

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Flag not specified:                                                         │
│                                                                              │
│  client-id                                                                   │
│                                                                              │
│  This flag is required in non-interactive terminal environments, such as a   │
│  CI environment, or when piping input from another process.                  │
│                                                                              │
│  To resolve this, specify the option in the command, or run the command in   │
│  an interactive environment such as your local terminal.                     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

stephen-christie-ss avatar Mar 21 '24 14:03 stephen-christie-ss

+1

knjshimi avatar May 23 '24 07:05 knjshimi

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Jul 05 '24 03:07 github-actions[bot]

This is still relevant

illarionvk avatar Jul 08 '24 18:07 illarionvk

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Aug 20 '24 03:08 github-actions[bot]

This is still relevant

illarionvk avatar Aug 20 '24 12:08 illarionvk

Also interested in this

gerwinbrunner avatar Sep 04 '24 10:09 gerwinbrunner

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Oct 17 '24 03:10 github-actions[bot]