Skip to content

Preview Stores prototype: add preview create / execute / claim#7573

Draft
dmerand wants to merge 1 commit into
mainfrom
preview-store/prototype
Draft

Preview Stores prototype: add preview create / execute / claim#7573
dmerand wants to merge 1 commit into
mainfrom
preview-store/prototype

Conversation

@dmerand
Copy link
Copy Markdown
Contributor

@dmerand dmerand commented May 18, 2026

WHY are these changes introduced?

This is the companion CLI half of the original Preview Stores prototype.

The paired World PR (shop/world#708792) adds local preview-store orchestration endpoints. This branch adds the CLI commands needed to exercise that flow end-to-end from a local CLI checkout:

  • shopify preview create
  • shopify preview execute
  • shopify preview claim

This is a prototype branch, not a ship candidate.

WHAT is this pull request doing?

  • adds the preview command surface in the CLI
  • wraps the local Core preview-store endpoints
  • supports:
    • creating a preview store
    • running Admin GraphQL against the preview store with an explicit token
    • claiming/transferring the preview store through the existing handoff flow
  • keeps the auth model intentionally simple for the first prototype: explicit token + magic-link handoff

This is the parent PR for the auth-bootstrap follow-up in #7574.

How to test your changes?

With the paired World branch from shop/world#708792 running locally:

cd /Users/donald/src/github.com/Shopify/cli
pnpm install
pnpm --filter @shopify/cli build

node packages/cli/bin/dev.js preview create --shop-name preview-demo --json
node packages/cli/bin/dev.js preview execute --from-file /tmp/preview.json --query 'query { shop { name } }' --json
node packages/cli/bin/dev.js preview claim --shop-id <shop_id> --recipient-email merchant@example.com --json

Post-release steps

None. This is prototype-only work and is not intended to ship as-is.

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 — no changeset added because this is a prototype stack paired to local-only World endpoints and is not intended to ship as-is

Adds three subcommands wrapping the Preview Stores orchestrator endpoints
in Core (//areas/core/shopify, shop/world#708792):

- `shopify preview create`  — POST /services/preview-stores
- `shopify preview execute` — runs an Admin GraphQL query against a preview
                              store (reads token from --from-file or flags)
- `shopify preview claim`   — POST /services/preview-stores/claim (org-based
                              vibe transfer hand-off)

This branch is a prototype paired with shop/world#708792. It is not intended
to merge as-is into Shopify/cli main — the Core endpoints it wraps are dev
endpoints behind hardcoded basic auth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

dmerand commented May 18, 2026

@dmerand dmerand changed the title Preview Stores prototype: shopify preview create / execute / claim Preview Stores prototype: add preview create / execute / claim May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants