Skip to content

Prompt for store create dev flags in TTY, require them in non-TTY#7920

Merged
amcaplan merged 1 commit into
mainfrom
store-create-dev-prompt-or-require
Jun 25, 2026
Merged

Prompt for store create dev flags in TTY, require them in non-TTY#7920
amcaplan merged 1 commit into
mainfrom
store-create-dev-prompt-or-require

Conversation

@amcaplan

@amcaplan amcaplan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Per the spec, store create dev should treat --organization-id, --name, and --plan as required only when there's no TTY to prompt in. Previously --organization-id wasn't required at all, and --name/--plan were always required, so interactive users couldn't be prompted for them.

WHAT is this pull request doing?

  • Makes --name, --organization-id, and --plan required only in non-interactive (non-TTY) environments via this.failMissingNonTTYFlags(flags, ['name', 'organization-id', 'plan']).
  • In a TTY, prompts for any missing value:
    • name — text prompt
    • organization-id — reuses the standard organization selector
    • plan — list selector backed by the PLAN_LABELS map (Basic / Grow / Advanced / Plus)
  • Extracts the prompts into packages/store/src/cli/prompts/store.ts (storeNamePrompt, storePlanPrompt) to match the repo's prompts/ convention.

How to test your changes?

  • Run shopify store create dev in a terminal with no flags → it should prompt for organization, name, and plan.
  • Run it in a non-TTY (e.g. piped/CI) without those flags → it should fail listing the missing required flags.

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 — minor bump, changeset added

amcaplan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Jun 24, 2026
@amcaplan amcaplan force-pushed the store-create-dev-prompt-or-require branch 2 times, most recently from c0372a3 to 9230ad6 Compare June 24, 2026 21:41
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/cli @shopify/cli package issues labels Jun 24, 2026
Make --name, --organization-id, and --plan required only in
non-interactive environments via failMissingNonTTYFlags. In TTY
environments, prompt for any missing value: text prompt for name,
existing org selector (selectOrg), and a list selector for plan.

Regenerated oclif.manifest.json to reflect the flags no longer
being unconditionally required.

Assisted-By: devx/ae84811a-733c-4815-8d7d-604504428a4b
@amcaplan amcaplan force-pushed the store-create-dev-prompt-or-require branch from 9230ad6 to a41813a Compare June 24, 2026 21:47
@amcaplan amcaplan marked this pull request as ready for review June 24, 2026 21:53
@amcaplan amcaplan requested review from a team as code owners June 24, 2026 21:53
Base automatically changed from store-create-dev-flags to main June 25, 2026 11:23
@amcaplan amcaplan added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 13650df Jun 25, 2026
25 of 26 checks passed
@amcaplan amcaplan deleted the store-create-dev-prompt-or-require branch June 25, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants