Skip to content

feat: interactive CLI setup wizard (#21)#73

Merged
PAMulligan merged 18 commits into
mainfrom
21-create-interactive-cli-setup-wizard
May 20, 2026
Merged

feat: interactive CLI setup wizard (#21)#73
PAMulligan merged 18 commits into
mainfrom
21-create-interactive-cli-setup-wizard

Conversation

@PAMulligan
Copy link
Copy Markdown
Collaborator

Summary

  • New scripts/init.mjs wizard with interactive (@clack/prompts) and --yes non-interactive modes
  • Four theme starters: blank FSE, flavian-shop, Figma placeholder, InDesign placeholder
  • Auto-writes .env, scaffolds the chosen theme, stages WooCommerce hook when needed, makes an initial git commit
  • Static verification (theme.json JSON validity, required files, .env present) — fails fast with remediation hints
  • 39 tests (32 unit + 4 integration smoke), new init-wizard GitHub Actions job
  • Composer post-create-project-cmd runs the wizard after composer create-project pmds/flavian
  • Lazy-imports clack so --yes mode runs without node_modules (keeps CI/test fixtures lean)

Design and plan docs:

  • docs/plans/2026-05-20-cli-setup-wizard-design.md
  • docs/plans/2026-05-20-cli-setup-wizard.md
  • docs/CLI-WIZARD.md (user-facing reference)

Closes #21

Test plan

  • pnpm run test:init — 39/39 pass
  • composer validate --no-check-publish — valid
  • ./scripts/validate-agent-configs.sh — 0 warnings
  • Manual --yes smoke into a temp dir produces a verifiable blank scaffold
  • Manual interactive run (reviewer to exercise prompts)
  • CI init-wizard workflow green on PR

🤖 Generated with Claude Code

Paul Mulligan and others added 18 commits May 20, 2026 18:01
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>
@PAMulligan PAMulligan linked an issue May 20, 2026 that may be closed by this pull request
3 tasks
@PAMulligan PAMulligan merged commit 467db30 into main May 20, 2026
9 checks passed
@PAMulligan PAMulligan deleted the 21-create-interactive-cli-setup-wizard branch May 20, 2026 23:22
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.

Create interactive CLI setup wizard

1 participant