pyreon

@pyreon/create-zero is the interactive scaffolder for new Pyreon projects. It ships under two bin aliases (both invoke the same tool):

# Canonical (recommended)
bunx create-pyreon-app my-app

# Back-compat (older docs)
bun create @pyreon/zero my-app

The interactive prompts walk through template choice, deployment adapter, feature selection (preset shortcut or grouped multiselect), backend integrations, AI tooling, and compat mode. Pass --yes to accept defaults non-interactively.

@pyreon/create-zerostable

Templates

Four curated starting points selected by the --template flag (or interactively):

TemplateDefault modeWhat you get
appSSR streamingCounter, posts, layout, admin route group — the full-featured starter.
blogStatic (SSG)Markdown-style TSX posts in src/content/posts/, RSS feed at /rss.xml, SEO-ready.
dashboardSSR streamingSaaS shape: marketing landing → auth-gated /app/* routes (overview, users, invoices, settings) → invoice export demo using @pyreon/document-primitives (the same component tree renders in browser AND exports to PDF / email).
monorepoSSR streamingBun workspaces shell — apps/web/ (full Pyreon Zero app, app-template shape) + packages/ui/ (@<name>/ui shared components) + packages/types/ (@<name>/types framework-agnostic shared types). Root package.json declares workspaces and proxies dev/build/preview/typecheck via bun run --filter='web' ….

Force a template non-interactively:

bunx create-pyreon-app my-app --template blog
bunx create-pyreon-app my-mono --template monorepo

Monorepo layout

--template monorepo produces:

my-mono/
├── package.json              # workspaces: ["apps/*", "packages/*"], proxy scripts
├── tsconfig.json             # global TS settings (no project references)
├── README.md
├── .gitignore
├── apps/
│   └── web/                  # full Pyreon Zero app
│       ├── package.json      # name: "web" + workspace deps for shared packages
│       └── …                 # everything the `app` template produces
└── packages/
    ├── ui/                   # @my-mono/ui — shared components stub
    │   ├── package.json      # deps: { "@my-mono/types": "workspace:^" }
    │   └── src/index.ts      # Button + ButtonProps stub
    └── types/                # @my-mono/types — framework-agnostic types
        ├── package.json
        └── src/index.ts      # ButtonVariant + User stubs

The @<projectName>/ scope is auto-derived from the project name — no extra prompt. All feature, preset, adapter, integration, AI, and lint flags apply to the inner web app (the inner template is always app-shaped for now).

Deployment adapters

Pick a target during the prompt or pass --adapter. Each adapter writes the platform-specific deploy artefact alongside the project, and the generated vite.config.ts automatically imports the matching *Adapter() factory from @pyreon/zero/server.

AdapterFiles written
vercelvercel.json
cloudflarewrangler.toml, _routes.json
netlifynetlify.toml
nodeDockerfile, .dockerignore
bunDockerfile (bun-based), .dockerignore
static(none — dist/ is the artefact)

Features

22 Pyreon fundamentals can be selected per project. The interactive prompt offers a preset shortcut first, then drops to a grouped multiselect (8 categories) when you pick Custom.

Presets

Four atomic shortcuts via --preset:

PresetFeature set
minimal(no features)
standardstore + query + forms — today's app defaults
dashboardstandard + table + charts
fullevery feature on (22 total)
bunx create-pyreon-app my-app --preset standard --yes
bunx create-pyreon-app my-mono --template monorepo --preset full --yes

Atomic add / remove

--with-<feature> adds a feature, --no-<feature> removes one. They compose with --preset (or with --features / with the template default under --yes):

# Standard preset + i18n - forms
bunx create-pyreon-app my-app --preset standard --with-i18n --no-forms --yes

--no-X always wins over --with-X for the SAME feature (set-subtraction semantics).

Known features: store, state-tree, storage, url-state, forms, feature, query, rx, styler, elements, animations, coolgrid, table, virtual, charts, code, flow, toast, i18n, hotkeys, permissions, hooks.

Resolution order

Highest-priority flag wins; --with-X / --no-X overlay every priority:

  1. --features <csv> — explicit list wins outright

  2. --preset <id> — preset feature set as starting point

  3. --yes — template default as starting point

  4. Interactive — preset prompt → Custom → grouped multiselect

Backend integrations

Two scaffolders that write plain files into your project — no Pyreon-side wrapper packages, no version coupling. You own the integration code and update it independently of Pyreon releases.

IntegrationFiles writtenReplaces
supabasesrc/lib/supabase.ts, src/lib/auth.ts, src/lib/db.ts (in dashboard)The dashboard template's in-memory auth + db stubs
emailsrc/lib/email.ts, src/emails/welcome.tsx, src/routes/api/email/welcome.ts

The dashboard template preselects both. For app / blog, integrations are off by default but selectable.

The email integration showcases the document-primitives angle: the same <DocDocument> / <DocSection> / <DocText> component tree renders in the browser AND exports to email HTML via @pyreon/document-primitives — one author surface for many output formats.

AI tooling

Multi-select for the AI rule files you want generated. All five share a canonical "Pyreon principles" body so the guidance stays consistent across tools.

OptionFileDefault
mcp.mcp.json
claudeCLAUDE.md
cursor.cursor/rules/pyreon.md
copilot.github/copilot-instructions.md
agentsAGENTS.md

Compat mode

Migrating from another framework? Pick react / vue / solid / preact and the scaffolder configures @pyreon/vite-plugin with the matching shim layer (useState, useEffect, <Suspense>, etc.).

CLI flags (one-shot, non-interactive)

# Standard app, default everything
bunx create-pyreon-app my-app --yes

# Dashboard + Supabase + Resend, full AI tooling
bunx create-pyreon-app my-app --template dashboard \
  --adapter vercel \
  --integrations supabase,email \
  --ai mcp,claude,cursor \
  --yes

# Standard preset + i18n minus forms
bunx create-pyreon-app my-app --preset standard --with-i18n --no-forms --yes

# Blog on Cloudflare Pages
bunx create-pyreon-app my-blog --template blog --adapter cloudflare --yes

# Monorepo with the standard preset
bunx create-pyreon-app my-mono --template monorepo --preset standard --yes
FlagValues
--templateapp / blog / dashboard / monorepo
--adaptervercel / cloudflare / netlify / node / bun / static
--modessr-stream / ssr-string / ssg / spa
--presetminimal / standard / dashboard / full (composes with --with-X / --no-X)
--featurescsv (store,query,forms,…) — overrides --preset entirely
--with-<feature>atomic add (e.g. --with-store --with-i18n)
--no-<feature>atomic remove (e.g. --no-forms)
--integrationscsv (supabase,email)
--aicsv (mcp,claude,cursor,copilot,agents)
--compatnone / react / vue / solid / preact
--packagesmeta (single barrel) / individual (selected packages only)
--lint / --no-linttoggle @pyreon/lint
--yesaccept defaults, skip prompts
--help, -hshow usage

What gets generated

Every template scaffolds a project with:

my-app/
├── src/
│   ├── routes/        # File-based routing
│   ├── components/
│   ├── stores/
│   └── app.tsx
├── public/
├── pyreon.config.ts
├── vite.config.ts
├── tsconfig.json
└── package.json

The generated project includes:

  • Pyreon Zero with all fundamentals via @pyreon/meta

  • Vite preconfigured with @pyreon/vite-plugin

  • TypeScript with strict mode and Pyreon-specific type settings

  • Router with starter routes and (for app / dashboard) a _layout.tsx

  • File-based routing convention ready to use

  • Selected adapter's deploy artefacts

  • Selected backend integration files

  • Selected AI rule files

After scaffolding:

cd my-app
bun install
bun dev
@pyreon/create-zero