Executable source of truth: package.json, CLAUDE.md, build/workflow configs.
- Node.js >= 22.0.0 (enforced in package.json
engines) - Bun is the primary package manager (CI uses
setup-bun@v2) - CLI entry:
scripts/create-app.js→ built todist/create-wizard.js
# Development workflow
bun run build # esbuild build (runs lint:fix + format via prebuild)
bun start # Run CLI directly without building
bun test # Build + vitest (excludes template-library/, e2e-test-project/)
bun run test:e2e # End-to-end test (creates vue-wizard project with --answers)
bun run lint:fix # ESLint auto-fix
bun run format # Prettier format
bun run check # lint:fix + format (runs before build)
bun run release <type> # Automated release: version bump, changelog, push
bun run debug # Run with DEBUG=TRUE loggingImportant: bun run build must succeed before bun test (prebuild runs check).
- Single entry point:
scripts/create-app.jshandles all CLI flags and wizard flow - Templates:
template-library/<name>/withfiles/(always copied) andfeatures/(conditional) - Template metadata:
template.jsondefinesdependencies,devDependencies,scripts - Feature-based templates:
discord-botandvue-wizardsupport conditional features via prompts - Build: esbuild bundles to ESM, keeps dependencies external (see build script external list)
- Dependency injection pattern: all module exports accept
depsparameter for testability - Debug: set
DEBUG=create-wizard:*or use--debug=TRUEflag
- Vitest with
vitest.config.js(React + Vue plugins enabled) - Test alias:
@→e2e-test-project/src - Setup file:
vitest-setup.jsloadsvitest-previewonly whenVITESTenv is set - E2E uses
--answers=JSON flag to bypass interactivity - No unit tests in
scripts/— test coverage is on generated projects (e2e-test-project)
- ESLint flat config (
eslint.config.js) with per-directory rules:scripts/**and CJS: Node globals, relaxed- TypeScript:
typescript-eslintrecommended (no project mode) docs/**: React + Docusaurus plugintemplate-library/**: Browser globals, specialno-unused-varsallowances for Vue component names
- Prettier 3.x — run
bun run formatafter changes - License header plugin configured but commented out
- Output:
dist/create-wizard.js(shebang + ESM) - Published files:
dist/,README.md,LICENSE,template-library/ - Do not commit
dist/changes without building first
Templates are auto-discovered from template-library/ directory by listing subdirectories. Adding a new template only requires creating a folder with template.json and files/ — no registry updates needed.
bun run release <type> (patch/minor/major/pre*):
- Requires clean working directory on
mainbranch - Fetches remote, checks for divergence/behind
- Runs
conventional-changelogto updateCHANGELOG.md git add .,npm version,git push --follow-tags- GitHub Actions publishes to npm and creates release on version tag
Workflow: .github/workflows/ci-release.yml
- Build job runs on push to
mainor tagsv*.*.* - Test job needs build artifact, runs
bun run test - Publish job only on version tags, uses
setup-node@v3for npm publish
- Windows PowerShell: use
Get-ChildItem,Remove-Item,Copy-Item(notls,rm,cp) - ESM project:
createRequireused to loadpackage.jsonfrom CommonJS context npm startruns source directly (bun run scripts/create-app.js), not the built CLI- E2E test hardcodes
vue-wizardtemplate and specific feature flags (addLicense,addFunding,addDocs,useGhPages,initGit) - Test excludes:
--exclude "template-library/**" --exclude "e2e-test-project/**"— generated project tests are not part of CLI test suite
| Path | Purpose |
|---|---|
scripts/create-app.js |
Main CLI — wizard logic, template application, Git init |
scripts/create-template.js |
Interactive template scaffolding tool |
scripts/create-plugin.js |
Plugin config wizard (Prettier, ESLint, TypeScript, gitignore) |
scripts/create-test-setup.js |
Test framework installer (Jest/Vitest/Mocha) |
scripts/release.js |
Release automation (conventional-changelog, version bump, push) |
scripts/e2e-test.js |
End-to-end validation runner |
eslint.config.js |
Flat ESLint config — per-directory overrides |
vitest.config.js |
Test config with React/Vue plugins, alias @ |
template-library/ |
All available project templates |