feat: interactive CLI setup wizard (#21)#73
Merged
Conversation
Captures the wizard architecture (npx + composer entry points sharing one core), prompt flow, apply-phase generators, static verification, --yes / non-interactive mode, and test strategy. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
18 bite-sized tasks following TDD: validators → generators → orchestrator → tests → CI → docs. References design at docs/plans/2026-05-20-cli-setup-wizard-design.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Includes refuseIfExists guard so re-running the wizard against an existing themes/<slug>/ fails cleanly rather than overwriting. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The initial scaffold commit uses --no-verify because the freshly generated project has no hooks installed yet; user commits made after init run through hooks as normal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lazy-imports prompts.mjs so --yes mode doesn't depend on @clack/prompts being installed — keeps the non-interactive path runnable in CI/test fixtures that don't carry node_modules. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tests blank / flavian-shop / figma starters via full --yes runs in mkdtemp dirs, plus refuse-overwrite check. Total suite: 39 tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After 'composer create-project pmds/flavian my-site', the wizard runs automatically (if pnpm install has completed); otherwise prints a hint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <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.
Summary
scripts/init.mjswizard with interactive (@clack/prompts) and--yesnon-interactive modes.env, scaffolds the chosen theme, stages WooCommerce hook when needed, makes an initial git commitinit-wizardGitHub Actions jobpost-create-project-cmdruns the wizard aftercomposer create-project pmds/flavian--yesmode runs withoutnode_modules(keeps CI/test fixtures lean)Design and plan docs:
docs/plans/2026-05-20-cli-setup-wizard-design.mddocs/plans/2026-05-20-cli-setup-wizard.mddocs/CLI-WIZARD.md(user-facing reference)Closes #21
Test plan
pnpm run test:init— 39/39 passcomposer validate --no-check-publish— valid./scripts/validate-agent-configs.sh— 0 warnings--yessmoke into a temp dir produces a verifiable blank scaffoldinit-wizardworkflow green on PR🤖 Generated with Claude Code