@pyreon/create-zero 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +73 -43
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,103 +1,133 @@
1
- # @pyreon/create-zero · `create-pyreon-app`
1
+ # @pyreon/create-zero
2
2
 
3
- Interactive scaffolder for [Pyreon Zero](https://github.com/pyreon/pyreon) projects.
3
+ Interactive scaffolder for new Pyreon Zero projects.
4
4
 
5
- This package ships **two bin aliases** — both invoke the same scaffolder:
5
+ Ships two bin aliases — `create-pyreon-app` (canonical) and `create-zero` (back-compat) — both invoke the same scaffolder. Walks through template choice, deployment adapter, backend integrations, AI tooling, and compat mode via [@clack/prompts](https://github.com/bombshell-dev/clack), or accepts the full configuration non-interactively via CLI flags. Generates a working `@pyreon/zero` project with `vite.config.ts`, route tree, deploy artefacts, and optional AI rule files.
6
+
7
+ ## Install
6
8
 
7
9
  ```bash
8
- # Canonical (recommended in docs)
10
+ # Canonical
9
11
  bunx create-pyreon-app my-app
10
12
 
11
13
  # Back-compat (older docs / `bun create` flow)
12
14
  bun create @pyreon/zero my-app
13
15
  ```
14
16
 
15
- Pick whichever you prefer; the interactive prompts and the resulting project are identical.
17
+ Both invocations are identical — pick whichever you prefer. The `--help` text echoes the alias you actually typed so docs links stay consistent.
16
18
 
17
- ## Templates
19
+ ## Quick start
20
+
21
+ ```bash
22
+ # Interactive — answers every prompt
23
+ bunx create-pyreon-app my-app
18
24
 
19
- Three curated starting points:
25
+ # Non-interactive accept defaults
26
+ bunx create-pyreon-app my-app --yes
20
27
 
21
- | Template | Default mode | What you get |
22
- | --- | --- | --- |
23
- | **`app`** | SSR streaming | Counter, posts, layout, admin route group — the full-featured starter. |
24
- | **`blog`** | Static (SSG) | Markdown-style TSX posts in `src/content/posts/`, RSS feed at `/rss.xml`, SEO-ready. |
25
- | **`dashboard`** | SSR streaming | SaaS-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). |
28
+ # Fully specified
29
+ bunx create-pyreon-app my-app \
30
+ --template dashboard \
31
+ --adapter vercel \
32
+ --mode ssr-stream \
33
+ --integrations supabase,email \
34
+ --ai mcp,claude,cursor \
35
+ --yes
36
+ ```
26
37
 
27
- Force a template non-interactively:
38
+ After scaffolding:
28
39
 
29
40
  ```bash
30
- bunx create-pyreon-app my-app --template blog
41
+ cd my-app
42
+ bun install
43
+ bun run dev
31
44
  ```
32
45
 
46
+ ## Templates
47
+
48
+ | Template | Default mode | What you get |
49
+ |---|---|---|
50
+ | `app` | SSR streaming | Counter, posts, layout, admin route group — the full-featured starter. |
51
+ | `blog` | SSG (static) | TSX posts in `src/content/posts/`, RSS at `/rss.xml`, SEO-ready. |
52
+ | `dashboard` | SSR streaming | SaaS shape: marketing landing → auth-gated `/app/*` (overview, users, invoices, settings) → invoice export demo using `@pyreon/document-primitives` (the same component tree renders in browser AND exports to PDF / email). |
53
+
54
+ Force a template: `--template app | blog | dashboard`.
55
+
33
56
  ## Deployment adapters
34
57
 
35
- Pick a target during the prompt or pass `--adapter`. Each adapter writes the platform-specific deploy artefact alongside the project:
58
+ Pick a target via `--adapter`. Each adapter writes the platform-specific deploy artefact alongside the project, and `vite.config.ts` imports the matching `*Adapter()` factory from `@pyreon/zero/server`.
36
59
 
37
60
  | Adapter | Files written |
38
- | --- | --- |
61
+ |---|---|
39
62
  | `vercel` | `vercel.json` |
40
63
  | `cloudflare` | `wrangler.toml`, `_routes.json` |
41
64
  | `netlify` | `netlify.toml` |
42
65
  | `node` | `Dockerfile`, `.dockerignore` |
43
66
  | `bun` | `Dockerfile` (bun-based), `.dockerignore` |
44
- | `static` | (none — `dist/` is the artefact) |
67
+ | `static` | — (`dist/` is the artefact) |
45
68
 
46
- The `vite.config.ts` automatically imports the matching `*Adapter()` factory from `@pyreon/zero/server`.
69
+ ## Rendering modes
70
+
71
+ `--mode ssr-stream | ssr-string | ssg | spa`
72
+
73
+ Maps to the `mode` + `ssr.mode` options on `@pyreon/zero`'s Vite plugin. `ssr-stream` is the default; `ssg` requires `getStaticPaths` on dynamic routes.
47
74
 
48
75
  ## Backend integrations
49
76
 
50
- 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.
77
+ Two scaffolders that write **plain files into your project** — no Pyreon-side wrapper packages, no version coupling.
51
78
 
52
79
  | Integration | Files written | Replaces |
53
- | --- | --- | --- |
54
- | `supabase` | `src/lib/supabase.ts`, `src/lib/auth.ts`, `src/lib/db.ts` (in dashboard) | The dashboard template's in-memory auth + db stubs |
80
+ |---|---|---|
81
+ | `supabase` | `src/lib/supabase.ts`, `src/lib/auth.ts`, `src/lib/db.ts` (in `dashboard`) | The dashboard template's in-memory auth + db stubs |
55
82
  | `email` | `src/lib/email.ts`, `src/emails/welcome.tsx`, `src/routes/api/email/welcome.ts` | — |
56
83
 
57
- The `dashboard` template preselects both. For `app` / `blog`, integrations are off by default but selectable.
58
-
59
- The email integration is the **headline Pyreon angle**: the same `<DocDocument>` / `<DocSection>` / `<DocText>` component tree renders in the browser AND exports to email HTML via `@pyreon/document-primitives` — one author for many output formats.
84
+ The `dashboard` template preselects both. The email integration is the canonical Pyreon export-pipeline demo: the same `<DocDocument>` / `<DocSection>` / `<DocText>` component tree renders in the browser AND exports to email HTML via `@pyreon/document-primitives`.
60
85
 
61
86
  ## AI tooling
62
87
 
63
- Multi-select for the AI rule files you want generated:
88
+ Multi-select for the AI rule files you want generated. All five share a canonical "Pyreon principles" body so guidance stays consistent across tools.
64
89
 
65
90
  | Option | File | Default |
66
- | --- | --- | --- |
91
+ |---|---|---|
67
92
  | `mcp` | `.mcp.json` | ✓ |
68
93
  | `claude` | `CLAUDE.md` | ✓ |
69
94
  | `cursor` | `.cursor/rules/pyreon.md` | — |
70
95
  | `copilot` | `.github/copilot-instructions.md` | — |
71
96
  | `agents` | `AGENTS.md` | — |
72
97
 
73
- All five share a canonical "Pyreon principles" body so guidance stays consistent across tools.
74
-
75
98
  ## Compat mode
76
99
 
77
- 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.).
100
+ Migrating from another framework? Pick `--compat react | vue | solid | preact` and the scaffolder configures `@pyreon/vite-plugin` with the matching shim layer (`useState`, `useEffect`, `<Suspense>`, etc.).
78
101
 
79
- ## CLI flags (one-shot, non-interactive)
102
+ ## Package strategy
80
103
 
81
- ```bash
82
- bunx create-pyreon-app my-app --template dashboard \
83
- --adapter vercel \
84
- --integrations supabase,email \
85
- --ai mcp,claude,cursor \
86
- --yes
87
- ```
104
+ `--packages meta | individual`
105
+
106
+ - `meta` (default) — installs `@pyreon/meta` (one dep re-exports the whole ecosystem)
107
+ - `individual` — installs only the specific `@pyreon/*` packages your selected features need
108
+
109
+ ## CLI flags
88
110
 
89
111
  | Flag | Values |
90
- | --- | --- |
112
+ |---|---|
113
+ | `[name]` | Positional project name (first non-flag arg) |
91
114
  | `--template` | `app` / `blog` / `dashboard` |
92
115
  | `--adapter` | `vercel` / `cloudflare` / `netlify` / `node` / `bun` / `static` |
93
116
  | `--mode` | `ssr-stream` / `ssr-string` / `ssg` / `spa` |
94
- | `--features` | csv (`store,query,forms,…`) |
95
- | `--integrations` | csv (`supabase,email`) |
96
- | `--ai` | csv (`mcp,claude,cursor,copilot,agents`) |
117
+ | `--features` | CSV: `store,query,forms,table,virtual,i18n,charts,…` |
118
+ | `--integrations` | CSV: `supabase,email` |
119
+ | `--ai` | CSV: `mcp,claude,cursor,copilot,agents` |
97
120
  | `--compat` | `none` / `react` / `vue` / `solid` / `preact` |
121
+ | `--packages` (alias `--pm`, `--package-strategy`) | `meta` / `individual` |
98
122
  | `--lint` / `--no-lint` | toggle `@pyreon/lint` |
99
- | `--yes` | accept defaults, skip prompts |
100
- | `--help`, `-h` | show usage |
123
+ | `--yes` | skip prompts, accept defaults |
124
+ | `--help` / `-h` | show usage |
125
+
126
+ Flag values accept both `--flag value` and `--flag=value` forms. Invalid enum values exit with a clear error.
127
+
128
+ ## Documentation
129
+
130
+ Full docs: [docs.pyreon.dev/docs/create-zero](https://docs.pyreon.dev/docs/create-zero) (or `docs/docs/create-zero.md` in this repo).
101
131
 
102
132
  ## License
103
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/create-zero",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "description": "Create a new Pyreon project — invoke as `create-pyreon-app` (canonical) or `create-zero` (alias)",
5
5
  "license": "MIT",
6
6
  "author": "Vit Bokisch",