Skip to content

Add shopify store open command#7955

Draft
amcaplan wants to merge 3 commits into
mainfrom
store-open-command
Draft

Add shopify store open command#7955
amcaplan wants to merge 3 commits into
mainfrom
store-open-command

Conversation

@amcaplan

@amcaplan amcaplan commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Opening a store today means hunting for the right URL. Agents and humans working with stores (especially preview stores, which surface long tokenized access URLs) need a quick, reliable way to jump straight into a storefront without copying URLs around by hand.

This implements the shopify store open design shared in #proj-agentic-store-preview.

WHAT is this pull request doing?

Adds a new shopify store open --store <domain> command that opens a store's storefront in your default browser.

  • New command: packages/store/src/cli/commands/store/open.ts
  • New service openStore(): packages/store/src/cli/services/store/open.ts
  • Registered as store:open in packages/store/src/index.ts

URL resolution goes through the existing getStoreInfo service rather than naively building a URL from the domain string. This matters for preview stores, which expose a tokenized accessUrl that can't be reconstructed from the domain alone. Regular stores resolve to https://<subdomain>. If the browser can't auto-open (e.g. cloud/headless environments), the command prints a clickable URL instead.

How to test your changes?

  1. shopify store open --store <your-store>.myshopify.com — opens the storefront.
  2. Try with a preview store — confirm it opens the tokenized access URL.
  3. In an environment where the browser can't open, confirm a clickable URL is printed.

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

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

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Jun 29, 2026
amcaplan added 2 commits June 29, 2026 23:13
Opens a store's storefront in the default browser. Reuses the store info
lookup so preview stores open their tokenized access URL.

Assisted-By: devx/14c34c82-e316-418f-9255-474db36c1b87
Assisted-By: devx/14c34c82-e316-418f-9255-474db36c1b87
@amcaplan amcaplan force-pushed the store-open-command branch from 2c5625a to 25ca7d1 Compare June 29, 2026 20:14
@amcaplan amcaplan force-pushed the store-open-command branch from 25ca7d1 to 5ea31e3 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-20260629202701

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