Skip to content

Add flags to avoid prompts in app config link#7630

Merged
gonzaloriestra merged 1 commit into
mainfrom
cli-interactivity/app-config-link
Jul 9, 2026
Merged

Add flags to avoid prompts in app config link#7630
gonzaloriestra merged 1 commit into
mainfrom
cli-interactivity/app-config-link

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented May 25, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Related to https://github.com/shop/issues-develop/issues/22869

The interactivity audit found that shopify app config link --client-id <id> can still prompt for a local configuration file name when the target file cannot be inferred.

WHAT is this pull request doing?

  • Adds --file-name to choose the config file that app config link should create.
  • Adds --force to overwrite an existing config file without prompting.

How to test your changes?

With a new client-id (not used in any toml file) and an existing shopify.app.toml:

  • shopify app config link --client-id XXX => should ask for the file
  • shopify app config link --client-id XXX --file-name staging => should create shopify.app.staging.toml
  • shopify app config link --client-id XXX --file-name shopify.app.toml => already exists error
  • shopify app config link --client-id XXX --file-name shopify.app.toml --force => works

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing, so I've added a changelog entry with pnpm changeset add

gonzaloriestra commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label May 25, 2026
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch 2 times, most recently from 22f6bf8 to 1dcfefd Compare June 1, 2026 11:58
@gonzaloriestra gonzaloriestra changed the title Allow app config link to target config by client ID Add flags to avoid prompts in app config link Jun 1, 2026
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from 1dcfefd to 7bc268b Compare June 1, 2026 12:45
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch 2 times, most recently from 2247c50 to 87644b5 Compare June 16, 2026 08:58
@gonzaloriestra gonzaloriestra marked this pull request as ready for review June 16, 2026 13:10
@gonzaloriestra gonzaloriestra requested review from a team as code owners June 16, 2026 13:10
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from 87644b5 to 772ca83 Compare July 1, 2026 14:10

Copy link
Copy Markdown
Contributor

link already accepts a config flag, how does that affect --file-name/--force?

gonzaloriestra commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

--config and --filename are exclusive flags, so you can't use them together

@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch 3 times, most recently from 7032f1f to fed0194 Compare July 2, 2026 12:43
@github-actions github-actions Bot added Area: @shopify/app @shopify/app package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels Jul 2, 2026
Comment thread packages/app/src/cli/commands/app/config/link.ts Outdated
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from fed0194 to 7cb3d48 Compare July 2, 2026 13:41
Comment thread packages/cli/README.md Outdated
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from 7cb3d48 to 72d1300 Compare July 7, 2026 11:02

Copy link
Copy Markdown
Contributor

Captura de pantalla 2026-07-07 a las 15.24.02.png

Got this error, but i wasn't using --force.
Maybe because the default value triggers the dependsOn?

@isaacroldan isaacroldan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working with the dependsOn change

@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from 72d1300 to fd60151 Compare July 9, 2026 08:57
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260709091220

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from fd60151 to 9bafc2f Compare July 9, 2026 10:12
@gonzaloriestra gonzaloriestra added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 2cb776e Jul 9, 2026
29 checks passed
@gonzaloriestra gonzaloriestra deleted the cli-interactivity/app-config-link branch July 9, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants