[Prototype] Flow standalone cli#8113
Draft
DariaSova wants to merge 6 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add