CLI scaffolding for Spectre-ready applications. spectre-init creates a small vanilla TypeScript app with Spectre dependencies, local project guidance, and a predictable starter structure.
Contributing | Changelog | Roadmap | Security Policy
- You are starting a new Spectre-based application from scratch.
- You want a working starter with
@phcdevworks/spectre-shell,@phcdevworks/spectre-tokens, and the router wired up from the first commit. - You want project files,
AGENTS.md, and AI-agent guidance pre-populated for the Spectre ecosystem.
- You are adding Spectre to an existing project — install packages individually instead.
- You need a non-TypeScript or non-vanilla-JS template — this scaffold is TypeScript-only.
- You need a framework-specific template (React, Vue, etc.) — those are out of scope.
- Scaffolds a Spectre-ready vanilla TypeScript application.
- Copies the bundled
templates/vanillastarter into a new project directory. - Validates project names before writing files.
- Updates the generated package name to match the requested project.
- Runs
npm installafter scaffolding so the app is ready to start.
Run once with npx:
npx @phcdevworks/spectre-init my-appOr install globally:
npm install -g @phcdevworks/spectre-init
spectre-init my-appnpx @phcdevworks/spectre-init my-app
cd my-app
npm run devThis package exposes the spectre-init binary.
spectre-init <project-name>
spectre-init --help
spectre-init --versionThis package owns project scaffolding and starter templates. It does not own runtime routing, reactive state, design tokens, UI components, or framework adapters.
npm install
npm run checkUseful scripts:
npm run typecheckvalidates TypeScript without emitting files.npm run lintruns ESLint.npm run buildemits the CLI todist.npm run checkruns the standard package verification flow.
AI-agent coordination starts in AGENTS.md, with companion guidance in CLAUDE.md, CODEX.md, COPILOT.md, JULES.md, and .github/copilot-instructions.md.
| Problem | Likely cause | Fix |
|---|---|---|
npm run check fails |
Type or lint error | Run npm run typecheck or npm run lint to isolate |
Scaffolded app fails npm install |
Network or registry issue | Run npm install manually inside the generated directory |
| Project name rejected | Name contains uppercase, spaces, or invalid characters | Use lowercase letters, numbers, hyphens, and dots only |
spectre-init --version shows wrong version |
Stale global install | Run npm install -g @phcdevworks/spectre-init to update |
See CONTRIBUTING.md. The gate is npm run check. Template changes must preserve the token-driven constraints — no hardcoded hex colors or spacing literals. See AGENTS.md for boundaries.
See CHANGELOG.md.
MIT. See LICENSE.