Skip to content

Add --admin flag to shopify store open#7956

Draft
amcaplan wants to merge 1 commit into
store-open-commandfrom
store-open-admin-flag
Draft

Add --admin flag to shopify store open#7956
amcaplan wants to merge 1 commit into
store-open-commandfrom
store-open-admin-flag

Conversation

@amcaplan

@amcaplan amcaplan commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Builds on shopify store open (#7955). Beyond the storefront, people often want to land directly in the store's admin. For preview stores that aren't fully set up yet, getting into the admin requires saving the store first — so the command should handle that transparently rather than making the user juggle setup URLs.

WHAT is this pull request doing?

Adds an -a, --admin flag to shopify store open.

  • With --admin, the command opens the Shopify admin instead of the storefront.
  • For a preview store that doesn't have a resolvable admin yet, --admin routes through the store's save flow: it saves the store and then brings you to the admin in the browser. This is surfaced to the user as "the Shopify admin (saving your store first)".
  • If neither an admin nor a save flow is available, the command aborts with a clear message.

Files: packages/store/src/cli/commands/store/open.ts, packages/store/src/cli/services/store/open.ts, plus regenerated manifest/README.

Note: there is no user-facing "claim" terminology — opening with --admin is described as saving the store and then opening the admin.

How to test your changes?

  1. shopify store open --store <store>.myshopify.com --admin — opens the admin.
  2. With a preview store that isn't set up yet, confirm it saves the store and lands you in the admin.
  3. With a store that has no admin/save path, confirm a clear abort message.

Unit tests: pnpm exec vitest run packages/store/src/cli/services/store/open.test.ts

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

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@amcaplan amcaplan mentioned this pull request Jun 29, 2026
4 tasks
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Jun 29, 2026
@amcaplan amcaplan force-pushed the store-open-admin-flag branch 4 times, most recently from 04fa3f9 to d94e26a Compare June 29, 2026 20:14
@amcaplan amcaplan force-pushed the store-open-command branch from 2c5625a to 25ca7d1 Compare June 29, 2026 20:14
Opens the Shopify admin instead of the storefront. Unclaimed preview
stores fall back to the claim/save link.

Assisted-By: devx/14c34c82-e316-418f-9255-474db36c1b87
@amcaplan amcaplan force-pushed the store-open-command branch from 25ca7d1 to 5ea31e3 Compare June 29, 2026 20:18
@amcaplan amcaplan force-pushed the store-open-admin-flag branch from d94e26a to e552b87 Compare June 29, 2026 20:18
@amcaplan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @amcaplan! 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-20260629203156

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant