Blueprints Gallery Library: Add blueprints gallery to CLI - #3503
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CLI support for browsing and creating sites from the Studio Blueprints Gallery, reusing shared common-library helpers so both the desktop app and CLI can consume the same blueprint schema/bundle logic.
Changes:
- Introduces
studio blueprint listandstudio blueprint useCLI commands (with tests). - Adds a shared
fetchStudioBlueprints()API client + Zod schema in@studio/common. - Extracts blueprint bundle download/extract + cleanup into
@studio/commonand wires Studio IPC to use it.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/common/logger-actions.ts | Adds logger action enum for blueprint CLI operations. |
| tools/common/lib/tests/studio-blueprints-api.test.ts | Adds Vitest coverage for fetchStudioBlueprints() behavior and validation. |
| tools/common/lib/studio-blueprints-api.ts | Adds shared Blueprints Gallery API fetcher and Blueprint Zod schema/type. |
| tools/common/lib/blueprint-bundle.ts | Adds shared helpers to download/extract blueprint bundles and clean temp dirs. |
| apps/studio/src/stores/wpcom-api.ts | Reuses shared blueprintSchema/Blueprint instead of defining them locally. |
| apps/studio/src/ipc-handlers.ts | Switches blueprint bundle handling to shared @studio/common/lib/blueprint-bundle helpers. |
| apps/cli/index.ts | Registers top-level blueprint command group and lazily loads subcommands. |
| apps/cli/commands/site/create.ts | Exports CreateCommandOptions type for reuse. |
| apps/cli/commands/blueprint/use.ts | Implements interactive/non-interactive “use blueprint to create site” flow (incl. bundle handling). |
| apps/cli/commands/blueprint/tests/use.test.ts | Adds unit tests for blueprint “use” command behavior. |
| apps/cli/commands/blueprint/list.ts | Implements blueprint list with table/json output and optional category filtering. |
| apps/cli/commands/blueprint/tests/list.test.ts | Adds unit tests for blueprint “list” command behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
May 15, 2026 14:46
Collaborator
📊 Performance Test ResultsComparing a433377 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
…studio into add/blueprints-gallery-tocli
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.
Related issues
Fixes STU-1737
How AI was used in this PR
It was used to plan and implement the feature.
Proposed Changes
This PR allows using the new Blueprints Gallery through CLI so that you can easily choose and activate different blueprints before creating a site.
Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.mjs blueprint listto see the list of available bluerinptsnode apps/cli/dist/cli/main.mjs blueprintto see how the command worksnpm run cli:build && node apps/cli/dist/cli/main.mjs blueprint use woo-shop --name "My Woo Shop"(or whichever path you want)Pre-merge Checklist