Skip to content

Add store create dev command#7332

Draft
amcaplan wants to merge 2 commits intoariel/extract-organizations-packagefrom
ariel/store-create-dev
Draft

Add store create dev command#7332
amcaplan wants to merge 2 commits intoariel/extract-organizations-packagefrom
ariel/store-create-dev

Conversation

@amcaplan
Copy link
Copy Markdown
Contributor

Summary

  • Adds shopify store create dev command for creating app development stores via CLI
  • Flags: --name (required), --organization (numeric ID, auto-selects single org), --json
  • Calls createAppDevelopmentStore mutation via Business Platform Organizations API
  • Polls for completion with renderSingleTask (2s interval, 5-minute timeout)
  • Structured JSON output for both success and error paths (supports agentic/automation use cases)
  • Sets up GraphQL codegen pipeline for the store package

Stack: PR 3 of 3 — depends on PR 1 and PR 2

Test plan

  • pnpm nx build store passes
  • pnpm nx type-check store passes
  • cd packages/store && pnpm vitest run — 128/128 tests pass (15 new)
  • cd packages/cli && pnpm vitest run — no regressions
  • Manual: shopify store create dev --name test-store --json creates store and returns JSON

🤖 Generated with Claude Code

@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from 558b244 to 1e0ddbe Compare April 16, 2026 15:47
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from 2b81b35 to db9717d Compare April 16, 2026 15:47
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from 1e0ddbe to f49260c Compare April 16, 2026 15:48
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from db9717d to c5cf362 Compare April 16, 2026 15:48
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from c5cf362 to f124191 Compare April 16, 2026 18:30
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from f49260c to 1ef614b Compare April 16, 2026 18:30
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from f124191 to 71126b0 Compare April 16, 2026 18:55
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch 2 times, most recently from d069d39 to a79415a Compare April 16, 2026 19:20
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch 2 times, most recently from 0b900a5 to d37933c Compare April 16, 2026 19:21
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from a79415a to af621f0 Compare April 16, 2026 19:21
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from d37933c to 83c7554 Compare April 16, 2026 19:28
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from af621f0 to ef6f7e9 Compare April 16, 2026 19:28
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from 83c7554 to a1ed994 Compare April 16, 2026 20:45
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from ef6f7e9 to 8dff738 Compare April 16, 2026 20:45
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from a1ed994 to 603ab33 Compare April 16, 2026 20:51
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from 8dff738 to 0fdfa8a Compare April 16, 2026 20:51
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from 603ab33 to 4ef8ece Compare April 16, 2026 21:12
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from 0fdfa8a to 3b5f211 Compare April 16, 2026 21:12
@github-actions
Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/session.d.ts
@@ -63,14 +63,14 @@ export interface OAuthSession {
 }
 type AuthMethod = 'partners_token' | 'device_auth' | 'theme_access_token' | 'custom_app_token' | 'none';
 /**
- * Retrieves a stable user identifier for analytics, or  if none applies.
+ * Retrieves the user ID from the current session or returns 'unknown' if not found.
  *
- * Evaluation order:
- * 1. If an app automation token or theme token is used, returns a deterministic UUID
- *    derived from that secret.
- * 2. Otherwise, if  was called (e.g. after OAuth), returns that value.
- * 3. Otherwise, if a persisted CLI session id is available, returns it.
- * 4. Otherwise returns .
+ * This function performs the following steps:
+ * 1. Checks for a cached user ID in memory (obtained in the current run).
+ * 2. Attempts to fetch it from the local storage (from a previous auth session).
+ * 3. Checks if a custom token was used (either as a theme password or partners token).
+ * 4. If a custom token is present in the environment, generates a UUID and uses it as userId.
+ * 5. If after all this we don't have a userId, then reports as 'unknown'.
  *
  * @returns A Promise that resolves to the user ID as a string.
  */
packages/cli-kit/dist/public/node/ui.d.ts
@@ -328,6 +328,7 @@ interface RenderTasksOptions {
 /**
  * Runs async tasks and displays their progress to the console.
  * @example
+ * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  * Installing dependencies ...
  */
 export declare function renderTasks<TContext>(tasks: Task<TContext>[], { renderOptions, noProgressBar }?: RenderTasksOptions): Promise<TContext>;
@@ -345,6 +346,7 @@ export interface RenderSingleTaskOptions<T> {
  * @param options.renderOptions - Optional render configuration
  * @returns The result of the task
  * @example
+ * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  * Loading app ...
  */
 export declare function renderSingleTask<T>({ title, task, onAbort, renderOptions, }: RenderSingleTaskOptions<T>): Promise<T>;

Copy link
Copy Markdown
Contributor Author

amcaplan commented Apr 16, 2026

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 force-pushed the ariel/extract-organizations-package branch from 4ef8ece to 8810eb4 Compare April 16, 2026 21:23
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch 3 times, most recently from 743bb19 to c7dc3ca Compare April 17, 2026 09:19
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from 8810eb4 to d5fe541 Compare April 17, 2026 09:19
Implements `shopify store create dev` with --name (required),
--organization, and --json flags. Calls the Business Platform
Organizations API to create app development stores with polling
for completion status. Includes structured JSON error output for
agentic/automation use cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amcaplan amcaplan force-pushed the ariel/extract-organizations-package branch from d5fe541 to ee242f3 Compare April 17, 2026 09:51
@amcaplan amcaplan force-pushed the ariel/store-create-dev branch from c7dc3ca to ce41839 Compare April 17, 2026 09:51
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.

1 participant