Skip to content

Add flags to avoid prompts in app config link#7630

Open
gonzaloriestra wants to merge 1 commit into
mainfrom
cli-interactivity/app-config-link
Open

Add flags to avoid prompts in app config link#7630
gonzaloriestra wants to merge 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 => should ask for the file
  • shopify app config link --client-id --file-name staging => should create shopify.app.staging.toml
  • shopify app config link --client-id --file-name shopify.app.toml => already exists error
  • shopify app config link --client-id --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
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-link branch from fed0194 to 7cb3d48 Compare July 2, 2026 13:41
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.

2 participants