Skip to content

[Prototype] Flow standalone cli#8113

Draft
DariaSova wants to merge 6 commits into
mainfrom
flow-standalone-cli
Draft

[Prototype] Flow standalone cli#8113
DariaSova wants to merge 6 commits into
mainfrom
flow-standalone-cli

Conversation

@DariaSova

Copy link
Copy Markdown

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

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 — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Gasser-Aly and others added 6 commits June 23, 2026 13:45
Replace the old generic `flow tool call <name>` dispatcher with a
first-class CLI surface for Flow:

- New transport primitive in
  `packages/store/src/cli/services/flow/dispatch.ts` (auth, routing
  Flow vs SK, env-aware URLs, headers, error parsing). No tool catalog
  shipped in the CLI — each command knows its target tool name and
  source.
- New project model in `project-config.ts` (`flow.toml` read/write
  with directory walk-up).
- New `workflow-lifecycle.ts`: lockfile shape, JSON normalization,
  sha256, list-all paginator, status classifier, unified-diff, and
  typed wrappers for the upsert / lookup / activate / deactivate /
  list calls.
- 18 new commands under `commands/flow/`: discovery
  (`template/search`, `template/save`, `task/search`,
  `task/describe`, `env/search`, `type/show`,
  `shopifyql/columns`, `resource/search`); project setup (`init`);
  IaC lifecycle (`workflow/{validate,push,pull,show,diff,activate,
  deactivate,list,status,preview}`). Drop the old
  `commands/flow/tool/call.{ts,test.ts}` and
  `services/flow/tool-call.{ts,test.ts}`.
- `workflow preview <file>` calls the new
  `/flow-core/mcp_preview/transform` endpoint and prints the
  renderable preview JSON; used by the Flow VSCode extension.
- Register all commands in `packages/store/src/index.ts` and
  regenerate `packages/cli/oclif.manifest.json`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Flow CLI commands now reuse the merchant's `shopify store auth` session
(online Admin API access token) as the caller credential, like
`shopify store execute`, instead of forcing a Shopify Identity login.

- New services/flow/auth.ts wraps loadStoredStoreSession (transparent
  refresh) and a 401 re-auth handler reusing the store-auth recovery flow.
- dispatch.ts and workflow/preview.ts send `Authorization: Bearer <store
  token>` + shop domain, and drop the Identity-only X-Shopify-User-Id.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Following CLI team guidance — hidden commands are the right approach
while we wait for clarity on Flow availability without app install.
Commands still work when called directly; just don't appear in help.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Self-contained packages/flow-cli that bundles to a single flow.mjs via Rollup, porting the Flow commands and authenticating with merchant store access tokens from `shopify store auth` instead of Identity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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