create-fs-app 2.0.5 → 3.1.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 (59) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +271 -158
  3. package/dist/cli/output.js +223 -0
  4. package/dist/cli/program.js +403 -0
  5. package/dist/cli/resolve-config.js +264 -0
  6. package/dist/cli/ui/errors.js +27 -0
  7. package/dist/cli/ui/help.js +43 -0
  8. package/dist/cli/ui/hints.js +22 -0
  9. package/dist/cli/ui/layer-log.js +113 -0
  10. package/dist/cli/ui/list.js +115 -0
  11. package/dist/cli/ui/text.js +56 -0
  12. package/dist/cli/wizard.js +275 -0
  13. package/dist/core/auth/jwt.js +478 -0
  14. package/dist/core/download.js +109 -0
  15. package/dist/core/health-check.js +46 -44
  16. package/dist/core/presets.js +75 -117
  17. package/dist/core/registry-fetch.js +101 -81
  18. package/dist/core/registry.fallback.json +904 -0
  19. package/dist/core/scaffold.js +121 -75
  20. package/dist/core/stack.js +109 -0
  21. package/dist/core/template-cache.js +95 -154
  22. package/dist/core/template-clone.js +353 -656
  23. package/dist/core/template-list.js +19 -141
  24. package/dist/core/template-registry.js +116 -216
  25. package/dist/index.js +13 -963
  26. package/dist/types/index.js +30 -82
  27. package/dist/utils/cli-error.js +15 -0
  28. package/dist/utils/exec.js +62 -0
  29. package/dist/utils/logger.js +10 -9
  30. package/dist/utils/theme.js +87 -0
  31. package/dist/utils/validation.js +24 -13
  32. package/package.json +38 -32
  33. package/dist/core/health-check.d.ts +0 -15
  34. package/dist/core/health-check.js.map +0 -1
  35. package/dist/core/presets.d.ts +0 -48
  36. package/dist/core/presets.js.map +0 -1
  37. package/dist/core/registry-fetch.d.ts +0 -20
  38. package/dist/core/registry-fetch.js.map +0 -1
  39. package/dist/core/scaffold.d.ts +0 -40
  40. package/dist/core/scaffold.js.map +0 -1
  41. package/dist/core/template-cache.d.ts +0 -38
  42. package/dist/core/template-cache.js.map +0 -1
  43. package/dist/core/template-clone.d.ts +0 -27
  44. package/dist/core/template-clone.js.map +0 -1
  45. package/dist/core/template-list.d.ts +0 -45
  46. package/dist/core/template-list.js.map +0 -1
  47. package/dist/core/template-registry.d.ts +0 -78
  48. package/dist/core/template-registry.js.map +0 -1
  49. package/dist/index.d.ts +0 -2
  50. package/dist/index.js.map +0 -1
  51. package/dist/types/index.d.ts +0 -102
  52. package/dist/types/index.js.map +0 -1
  53. package/dist/utils/errors.d.ts +0 -15
  54. package/dist/utils/errors.js +0 -50
  55. package/dist/utils/errors.js.map +0 -1
  56. package/dist/utils/logger.d.ts +0 -37
  57. package/dist/utils/logger.js.map +0 -1
  58. package/dist/utils/validation.d.ts +0 -48
  59. package/dist/utils/validation.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2023-2026 Om Jannu
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,14 +1,19 @@
1
1
  <div align="center">
2
- <img src="./assets/logo-no-bg.png" alt="create-fs-app" width="500"/>
2
+ <img src="https://raw.githubusercontent.com/Om-jannu/create-fs-app/master/assets/banner.png" alt="create-fs-app: the triangle logo, the wordmark and the tagline &quot;Stop configuring. Start building.&quot;, beside a hatched column of the five project layers" width="1200"/>
3
3
 
4
4
  **Stop configuring. Start building.**
5
5
 
6
- Production-ready full-stack monorepo in 60 seconds.
6
+ A frontend, a backend and a database, wired together from one command.
7
7
 
8
8
  [![npm version](https://img.shields.io/npm/v/create-fs-app.svg)](https://www.npmjs.com/package/create-fs-app)
9
9
  [![npm downloads](https://img.shields.io/npm/dm/create-fs-app.svg)](https://www.npmjs.com/package/create-fs-app)
10
10
  [![License: ISC](https://img.shields.io/npm/l/create-fs-app.svg)](https://opensource.org/licenses/ISC)
11
- [![Node.js ≥18](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
11
+ [![Node.js ^20.19 || ^22.12 || >=24](https://img.shields.io/badge/node-%5E20.19%20%7C%7C%20%5E22.12%20%7C%7C%20%3E%3D24-brightgreen)](https://nodejs.org)
12
+
13
+ <img src="https://raw.githubusercontent.com/Om-jannu/create-fs-app/master/assets/command-run.png" alt="create-fs-app in a terminal: the success screen with the project ready, the layer log of apps and packages with versions and ports, and the next steps" width="800"/>
14
+
15
+ <!-- Maintainer: to play the video inline on GitHub, edit README.md on github.com, drag assets/create-fs-app.mp4 into the editor and replace the link below with the user-attachments URL that GitHub inserts. -->
16
+ ▶ [Watch the launch video (36 s)](https://github.com/Om-jannu/create-fs-app/blob/master/assets/create-fs-app.mp4)
12
17
  </div>
13
18
 
14
19
  ---
@@ -19,7 +24,8 @@
19
24
  - [Interactive Wizard](#interactive-wizard)
20
25
  - [Stack Flags](#stack-flags)
21
26
  - [Official Templates](#official-templates)
22
- - [Contributed Templates](#contributed-templates)
27
+ - [JWT Authentication](#jwt-authentication)
28
+ - [Contributed and Custom Templates](#contributed-and-custom-templates)
23
29
  - [All CLI Options](#all-cli-options)
24
30
  - [Presets](#presets)
25
31
  - [Commands Reference](#commands-reference)
@@ -32,246 +38,350 @@
32
38
  ## Quick Start
33
39
 
34
40
  ```bash
35
- # Interactive wizard — guides you through every choice
36
- npx create-fs-app my-app
41
+ # Interactive wizard: asks for everything you did not pass
42
+ npx create-fs-app@latest my-app
37
43
 
38
44
  # Pick your stack and skip all prompts
39
- npx create-fs-app my-app \
45
+ npx create-fs-app@latest my-app \
40
46
  --frontend next.js \
41
47
  --backend nest.js \
42
48
  --database postgresql \
43
- --orm prisma \
44
- --yes
49
+ --orm prisma
50
+
51
+ # Let the CLI choose defaults for anything missing
52
+ npx create-fs-app@latest my-app --frontend vue --yes
53
+
54
+ # See what would be created, without writing anything
55
+ npx create-fs-app@latest my-app --frontend next.js --backend hono --dry-run
45
56
 
46
- # Use a saved preset
47
- npx create-fs-app my-app --preset saas-starter
57
+ # Use a preset
58
+ npx create-fs-app@latest my-app --preset saas-starter
48
59
  ```
49
60
 
61
+ Use `npx create-fs-app@latest` to always get the newest CLI; it does not check for updates itself.
62
+
63
+ > **Windows:** the commands in this README are written for a POSIX shell (bash, zsh, Git Bash, WSL). In PowerShell, put each command on one line (or end a line with a backtick instead of `\`) and use `curl.exe` instead of `curl`.
64
+
50
65
  ---
51
66
 
52
67
  ## Interactive Wizard
53
68
 
54
- Running `npx create-fs-app <name>` without stack flags launches a guided wizard:
69
+ When you run the CLI in a terminal and a required value is missing (the project name or a stack field), a short wizard asks for it. Values you passed as flags or through `--preset` are filled in and their questions are skipped.
55
70
 
56
- | Step | Options |
71
+ | Step | Choices |
57
72
  |------|---------|
58
- | Monorepo tool | Turborepo, Nx |
59
- | Frontend | Next.js, React (Vite), Vue, Nuxt, Angular |
60
- | Backend | NestJS, Express, Fastify (TS), Koa |
61
- | Database | PostgreSQL, MongoDB, MySQL, SQLite |
62
- | ORM / ODM | Prisma, TypeORM, Mongoose, Drizzle |
63
- | Package manager | npm, yarn, pnpm |
64
- | Styling | Tailwind CSS, CSS, SCSS, styled-components |
65
- | API style | REST, GraphQL, both |
66
- | Auth scaffolding | None, JWT |
67
- | Extras | ESLint, Prettier, Docker, Turbopack, GitHub Actions CI |
68
-
69
- After selection the CLI:
70
- 1. Fetches the best-matching official template from GitHub
71
- 2. Renames every placeholder to your project name
72
- 3. Initialises a git repository
73
- 4. Installs dependencies with your chosen package manager, if `--install` was passed
73
+ | Project name | validated as an npm package name and checked against existing folders |
74
+ | Monorepo | Turborepo |
75
+ | Frontend | Next.js, React (Vite), Vue (Vite) |
76
+ | Backend | NestJS, Express, Hono, Fastify |
77
+ | Database | PostgreSQL, MongoDB, SQLite |
78
+ | ORM / ODM | Prisma, Mongoose, Drizzle |
79
+ | Package manager | npm, pnpm, yarn (default: the one you ran the CLI with) |
80
+ | Extras | ESLint, Prettier, Docker (database compose file and app Dockerfiles, only if the template has Docker files), GitHub Actions CI, initialize git |
81
+ | Auth | None or JWT (only for NestJS and Express) |
82
+ | Install dependencies | yes / no (default: no) |
83
+
84
+ Every list only shows values that have an official template with your earlier answers. For example, Vue only offers Express, MongoDB only offers Mongoose, and SQLite only offers Drizzle. When only one value is left, the wizard picks it for you and says so.
85
+
86
+ Each choice has a short hint next to it. Stack hints come from the template registry (for example `v16 · App Router` for Next.js, or `libSQL · no Docker` for SQLite); the package manager you ran the CLI with is marked `detected`.
87
+
88
+ The wizard ends with a **Review** step: the layer log of the project (each app and package, its framework version and port) plus your extras, auth and install choice. Then pick **Create project**, **Change an answer** (choose the answer to change; later stack answers that no longer fit are asked again) or **Cancel**. Ctrl+C prints `Cancelled` and exits without writing anything.
89
+
90
+ ```text
91
+ demo Turborepo · npm · node ^20.19.0 || ^22.12.0 || >=24.0.0
92
+ ├─ apps/frontend Next.js 16 :3000 App Router · Tailwind CSS 4
93
+ ├─ packages/* eslint-config · typescript-config
94
+ ├─ apps/backend NestJS 12 :3001 Swagger · rate limit
95
+ ├─ apps/backend/prisma Prisma 7 schema · migrations
96
+ └─ database PostgreSQL 16 :5432 docker compose
97
+ ```
98
+
99
+ After you confirm, the CLI:
100
+ 1. Copies the matching official template (from GitHub, the 24-hour cache, or `--local-templates`)
101
+ 2. Sets the package names and replaces `{{PROJECT_NAME}}` with your project name
102
+ 3. Applies your extras (removes ESLint, Prettier or Docker files you turned off, adds CI or JWT auth)
103
+ 4. Initializes a git repository, unless you passed `--no-git`
104
+ 5. Installs dependencies, only if you chose to (or passed `--install`)
105
+
106
+ Each step prints one line with its time when it finishes, for example `✓ Template copied from local templates 0.1s` or `✓ Dependencies installed (npm) 41.0s` (in a terminal, a spinner runs while the step works). At the end the CLI prints `✓ <name> is ready` with the total time, the layer log, and the next steps in order: `cd`, install (unless it already ran), copy the `.env.example` files, for `--auth jwt` how to set `JWT_SECRET` and create the password hash, `docker compose up -d` if the project has a `docker-compose.yml`, and `<pm> run dev`.
74
107
 
75
108
  ---
76
109
 
77
110
  ## Stack Flags
78
111
 
79
- Bypass the wizard by passing flags directly. Any flag you omit is prompted for (or uses the `--yes` default).
112
+ Pass the stack as flags to skip those questions.
80
113
 
81
114
  ```bash
82
- npx create-fs-app my-app \
115
+ npx create-fs-app@latest my-app \
83
116
  --monorepo turborepo \
84
117
  --frontend next.js \
85
- --backend nest.js \
118
+ --backend express \
86
119
  --database postgresql \
87
120
  --orm prisma \
88
- --styling tailwind \
89
- --api-style rest \
90
121
  --auth jwt \
91
- --turbopack \
92
122
  --ci \
93
- --package-manager pnpm \
94
- --yes
123
+ --package-manager pnpm
95
124
  ```
96
125
 
97
126
  ### Available values
98
127
 
99
128
  | Flag | Values |
100
129
  |------|--------|
101
- | `--monorepo` | `turborepo`, `nx` |
102
- | `--frontend` | `next.js`, `react`, `vue`, `nuxt`, `angular` |
103
- | `--backend` | `nest.js`, `express`, `fastify-ts`, `koa` |
104
- | `--database` | `postgresql`, `mongodb`, `mysql`, `sqlite` |
105
- | `--orm` | `prisma`, `typeorm`, `mongoose`, `drizzle` |
106
- | `--package-manager` | `npm`, `yarn`, `pnpm` |
107
- | `--styling` | `tailwind`, `css`, `scss`, `styled-components` |
108
- | `--api-style` | `rest`, `graphql`, `both` |
109
- | `--auth` | `none`, `jwt` |
130
+ | `--monorepo` | `turborepo` |
131
+ | `--frontend` | `next.js`, `react`, `vue` |
132
+ | `--backend` | `nest.js`, `express`, `hono`, `fastify` |
133
+ | `--database` | `postgresql`, `mongodb`, `sqlite` |
134
+ | `--orm` | `prisma`, `mongoose`, `drizzle` |
135
+ | `--package-manager` | `npm`, `pnpm`, `yarn` |
136
+ | `--auth` | `none`, `jwt` (`jwt` only with `nest.js` or `express`) |
137
+
138
+ Values are case-insensitive. Aliases: `nextjs` → `next.js`, `nestjs` → `nest.js`, `fastify-ts` → `fastify`, `postgres` → `postgresql`, `mongo` → `mongodb`.
139
+
140
+ You do not need to pass a field that has only one possible value: `--frontend vue --database postgresql` picks Express and Prisma, and `--monorepo` is always `turborepo`.
141
+
142
+ ### Missing or invalid values
143
+
144
+ - **In a terminal:** the wizard asks for the missing values.
145
+ - **With `--yes`:** missing values get defaults (Next.js, NestJS, PostgreSQL, Prisma when available, otherwise the first value that fits).
146
+ - **Without a terminal (CI, scripts, piped input) and without `--yes`:** the CLI exits with code 1, lists the missing flags and their values, and suggests the `--yes` defaults:
147
+
148
+ ```text
149
+ ✗ Missing required options: --backend, --database, --orm
150
+ No terminal to ask in.
151
+ --backend nest.js, express, hono, fastify
152
+ --database postgresql, mongodb, sqlite
153
+ --orm prisma, mongoose, drizzle
154
+ Try: --backend nest.js --database postgresql --orm prisma
155
+ ```
156
+
157
+ - **A value without a template** exits with code 1 and names the values that fit:
158
+
159
+ ```text
160
+ ✗ No template for Vue + NestJS
161
+ Vue works with: express
162
+ Try: --backend express
163
+ ```
164
+
165
+ The CLI never prompts when stdin or stdout is not a terminal, or when the `CI` environment variable is set.
110
166
 
111
167
  ---
112
168
 
113
169
  ## Official Templates
114
170
 
115
- Official templates are built and maintained by the create-fs-app team. The wizard and stack flags select from this set automatically.
171
+ Official templates live in [`templates/`](https://github.com/Om-jannu/create-fs-app/tree/master/templates) of this repository and are built and tested in CI on Node 20, 22 and 24. Every template is a Turborepo with `apps/frontend`, `apps/backend` and shared `packages/{eslint-config,typescript-config}`, written in strict TypeScript with Tailwind CSS v4.
116
172
 
117
173
  | Template | Stack |
118
174
  |----------|-------|
119
- | `turborepo-nextjs-nestjs-postgresql-prisma` | Next.js 16 + NestJS 11 + PostgreSQL 16 + Prisma 5 |
120
- | `turborepo-nextjs-express-postgresql-prisma` | Next.js 15 + Express 4 + PostgreSQL 16 + Prisma 5 |
121
- | `turborepo-nextjs-nestjs-mongodb-mongoose` | Next.js 16 + NestJS 11 + MongoDB 7 + Mongoose 8 |
122
- | `turborepo-nextjs-express-mongodb-mongoose` | Next.js 15 + Express 4 + MongoDB 7 + Mongoose 8 |
123
- | `turborepo-react-nestjs-postgresql-prisma` | React 19 (Vite) + NestJS 11 + PostgreSQL 16 + Prisma 5 |
124
- | `turborepo-react-express-postgresql-prisma` | React 19 (Vite) + Express 4 + PostgreSQL 16 + Prisma 5 |
125
- | `turborepo-react-nestjs-mongodb-mongoose` | React 19 (Vite) + NestJS 11 + MongoDB 7 + Mongoose 8 |
126
- | `turborepo-react-express-mongodb-mongoose` | React 19 (Vite) + Express 4 + MongoDB 7 + Mongoose 8 |
127
-
128
- Browse them:
175
+ | `turborepo-nextjs-nestjs-postgresql-prisma` | Next.js 16 + NestJS 12 + PostgreSQL 16 + Prisma 7 |
176
+ | `turborepo-nextjs-nestjs-mongodb-mongoose` | Next.js 16 + NestJS 12 + MongoDB 7 + Mongoose 9 |
177
+ | `turborepo-nextjs-express-postgresql-prisma` | Next.js 16 + Express 5 + PostgreSQL 16 + Prisma 7 |
178
+ | `turborepo-nextjs-express-mongodb-mongoose` | Next.js 16 + Express 5 + MongoDB 7 + Mongoose 9 |
179
+ | `turborepo-nextjs-express-sqlite-drizzle` | Next.js 16 + Express 5 + SQLite (libSQL) + Drizzle (no Docker or database setup) |
180
+ | `turborepo-nextjs-hono-postgresql-drizzle` | Next.js 16 + Hono 4 + PostgreSQL 16 + Drizzle |
181
+ | `turborepo-nextjs-fastify-postgresql-prisma` | Next.js 16 + Fastify 5 + PostgreSQL 16 + Prisma 7 |
182
+ | `turborepo-react-nestjs-postgresql-prisma` | React 19 (Vite) + NestJS 12 + PostgreSQL 16 + Prisma 7 |
183
+ | `turborepo-react-nestjs-mongodb-mongoose` | React 19 (Vite) + NestJS 12 + MongoDB 7 + Mongoose 9 |
184
+ | `turborepo-react-express-postgresql-prisma` | React 19 (Vite) + Express 5 + PostgreSQL 16 + Prisma 7 |
185
+ | `turborepo-react-express-mongodb-mongoose` | React 19 (Vite) + Express 5 + MongoDB 7 + Mongoose 9 |
186
+ | `turborepo-vue-express-postgresql-prisma` | Vue 3 (Vite) + Express 5 + PostgreSQL 16 + Prisma 7 |
187
+
188
+ PostgreSQL and MongoDB templates include a `docker-compose.yml` for the database and a Dockerfile for each app (`apps/frontend`, `apps/backend`) that builds from the project root after you install dependencies (the image installs from your npm, pnpm or yarn lockfile). The SQLite template stores data in `apps/backend/dev.db` and applies its migrations on startup, so `npm run dev` works right away.
189
+
190
+ Every generated project includes Vitest tests for the frontend and the backend that need no running database; run them with `npm run test` (Turborepo runs `test` in each app).
129
191
 
130
192
  ```bash
131
- npx create-fs-app list
132
- npx create-fs-app list graphql # keyword search
193
+ npx create-fs-app@latest list # all official templates
194
+ npx create-fs-app@latest list prisma # keyword search
195
+ npx create-fs-app@latest info nextjs-hono-postgresql-drizzle # details and the exact flags
133
196
  ```
134
197
 
135
198
  ---
136
199
 
137
- ## Contributed Templates
200
+ ## JWT Authentication
201
+
202
+ `--auth jwt` (or "JWT" in the wizard) adds login to NestJS and Express backends. It is not offered for Hono and Fastify.
203
+
204
+ The generated code adds `POST /auth/login` and `GET /auth/me`. NestJS uses `@nestjs/jwt` with a guard; Express uses `jsonwebtoken` with a `requireAuth` middleware. There is no default secret and no "accept any password" shortcut:
205
+
206
+ 1. Set `JWT_SECRET` in `apps/backend/.env`, for example with `openssl rand -hex 32`. The backend refuses to start without it.
207
+ 2. Set `AUTH_USER_EMAIL`, then create the password hash and put it in `AUTH_USER_PASSWORD_HASH`:
208
+ ```bash
209
+ cd apps/backend && npm run auth:hash-password -- 'your-password'
210
+ ```
211
+ 3. Log in and call the protected route:
212
+ ```bash
213
+ curl -s -X POST http://localhost:3001/auth/login -H 'content-type: application/json' \
214
+ -d '{"email":"you@example.com","password":"your-password"}'
215
+ curl -s http://localhost:3001/auth/me -H "Authorization: Bearer <access_token>"
216
+ ```
217
+
218
+ Wrong credentials get a 401. The password is checked with async scrypt from `node:crypto`, and tokens are signed and verified with HS256 only. When you add real user accounts, replace `verifyCredentials()` in `apps/backend/src/auth/credentials.ts` with a database lookup. The generated project's README has the same instructions.
219
+
220
+ ---
221
+
222
+ ## Contributed and Custom Templates
223
+
224
+ ### Contributed templates
138
225
 
139
- Community-built variants extend the official stacks with additional tooling (GraphQL, tRPC, Redis, Sentry, etc.).
140
- Each contributed template is identified by a permanent **UUID v4**.
226
+ Community templates are listed in the registry with a permanent **UUID v4**.
141
227
 
142
228
  ```bash
143
- # Browse contributed templates — shows UUID and contributor
144
- npx create-fs-app list --contributed
229
+ npx create-fs-app@latest list --contributed # shows UUID and contributor
230
+ npx create-fs-app@latest my-app --template <uuid> # scaffold one
231
+ ```
232
+
233
+ To add a template, see [templates/CONTRIBUTING.md](https://github.com/Om-jannu/create-fs-app/blob/master/templates/CONTRIBUTING.md).
145
234
 
146
- # Scaffold from a contributed template using its UUID
147
- npx create-fs-app my-app --template bc75b4fb-3d42-4f6e-a8c1-0123456789ab
235
+ ### Any GitHub repository
236
+
237
+ ```bash
238
+ npx create-fs-app@latest my-app --template-url https://github.com/owner/repo
239
+ npx create-fs-app@latest my-app --template-url https://github.com/owner/repo/tree/main/path/to/template
148
240
  ```
149
241
 
150
- > **Why UUID?**
151
- > Keys can be renamed or refactored; UUIDs are permanent. A UUID you copy today will always resolve to the same template.
242
+ The CLI downloads the repository as a tarball (no git needed). A URL without `/tree/<branch>` uses the repository's default branch. For custom templates the CLI only sets the root package name and `packageManager`, replaces `{{PROJECT_NAME}}`, applies the pnpm workspace settings for `--package-manager pnpm`, and adds CI with `--ci`. `--auth jwt`, `--no-eslint`, `--no-prettier` and `--no-docker` are not applied to custom templates (the CLI warns).
152
243
 
153
- To add your own template to the contributed registry, see the [templates repo contributing guide](https://github.com/Om-jannu/create-fs-app-templates/blob/master/CONTRIBUTING.md).
244
+ > create-fs-app 2.x reads its templates from the old `create-fs-app-templates` repository. 3.x reads them from [`templates/`](https://github.com/Om-jannu/create-fs-app/tree/master/templates) of this repository.
154
245
 
155
246
  ---
156
247
 
157
248
  ## All CLI Options
158
249
 
159
- ```
160
- npx create-fs-app <project-name> [options]
161
-
162
- Stack selection
163
- --monorepo <framework> turborepo | nx
164
- --frontend <framework> next.js | react | vue | nuxt | angular
165
- --backend <framework> nest.js | express | fastify-ts | koa
166
- --database <db> postgresql | mongodb | mysql | sqlite
167
- --orm <orm> prisma | typeorm | mongoose | drizzle
168
-
169
- Customisation
170
- --styling <style> tailwind | css | scss | styled-components
171
- --api-style <style> rest | graphql | both (default: rest)
172
- --auth <strategy> none | jwt (default: none)
173
- --turbopack Enable Turbopack dev server (Next.js only)
174
- --ci Add GitHub Actions CI workflow
175
- --no-eslint Disable ESLint
176
- --no-prettier Disable Prettier
177
- --no-docker Skip Docker Compose
178
-
179
- Template sources
180
- --template <uuid> Use a contributed template by UUID v4
181
- --template-url <url> Use any GitHub repo as a template source
182
- --preset <name> Use a saved configuration preset
183
-
184
- Behaviour
185
- --package-manager <pm> npm | yarn | pnpm
250
+ ```text
251
+ npx create-fs-app@latest [name] [options]
252
+
253
+ Template source
254
+ -t, --template <uuid> Use a contributed template by UUID
255
+ --template-url <url> Use a custom template from a GitHub URL
256
+ --preset <name> Use a configuration preset
257
+ --local-templates <dir> Use templates from a local directory that contains registry.json
258
+
259
+ Stack
260
+ --monorepo <tool> turborepo
261
+ --frontend <framework> next.js | react | vue
262
+ --backend <framework> nest.js | express | hono | fastify
263
+ --database <db> postgresql | mongodb | sqlite
264
+ --orm <orm> prisma | mongoose | drizzle
265
+
266
+ Project options
267
+ --package-manager <pm> npm | pnpm | yarn
268
+ --eslint / --no-eslint Keep (default) or remove ESLint configs and lint scripts
269
+ --prettier / --no-prettier Keep (default) or remove Prettier and the format script
270
+ --docker / --no-docker Keep (default) or remove Docker files
271
+ --ci / --no-ci Add a GitHub Actions CI workflow (default: no)
272
+ --auth <strategy> none | jwt (jwt: nest.js, express)
273
+
274
+ Behavior
186
275
  --no-git Skip git initialization
187
276
  --install Install dependencies after scaffolding (default: false)
188
- --no-cache Force fresh download, skip cache
189
- -y, --yes Accept all defaults, skip prompts
277
+ --no-cache Skip the template cache
278
+ --dry-run Show what would be created without writing anything
279
+ -y, --yes Use defaults for missing options (no prompts)
280
+ -V, --version Print the version
281
+ -h, --help Show help
282
+ ```
283
+
284
+ `--dry-run` resolves the template exactly like a real run and prints the template, the layer log, a "Would create" list (the root files and each `apps/*` and `packages/*` folder with its file count, after the files your options remove or add; for a template that would be downloaded, the layer folders and the download URL), every customization, and whether git init and install would run. The last line is `Nothing was written.` It creates no files and does not touch the cache.
285
+
286
+ `--styling`, `--api-style` and `--turbopack` from 2.x are still accepted but ignored with a warning: all templates use Tailwind CSS and REST, and Next.js 16 already uses Turbopack.
190
287
 
191
- Development
192
- --local-templates <path> Use a local templates repo instead of GitHub
288
+ When one of its checks fails (an unavailable option, an invalid name, a missing template, a failed download), the CLI prints what failed, why, and what to try, and exits with code 1 (set `DEBUG=1` for the stack trace):
289
+
290
+ ```text
291
+ ✗ --auth jwt is not available for hono
292
+ JWT auth works with: nest.js, express
293
+ Try: --auth none
193
294
  ```
194
295
 
296
+ Option parse errors, such as an unknown option or a missing option value, print commander's one-line `error: ...` message and also exit 1.
297
+
298
+ If scaffolding fails, the CLI removes the folder it created, so you can simply retry.
299
+
300
+ ### Output and colours
301
+
302
+ Colours and symbols are only for terminals. `NO_COLOR`, output that is not a terminal (pipes, files) and `CI` give plain text with no ANSI codes; `TERM=dumb` does too. Terminals that report 24-bit colour (`COLORTERM=truecolor`, Windows Terminal) get the full palette, others 16 colours. Legacy Windows consoles get ASCII symbols (`|-`, `+`, `x`) instead of `├─`, `✓`, `✗`.
303
+
195
304
  ---
196
305
 
197
306
  ## Presets
198
307
 
199
- Save a flag combination as a named preset and re-use it with a single word.
308
+ A preset stores a stack and project options under a name.
200
309
 
201
310
  ```bash
202
- # Save a preset
203
- npx create-fs-app preset save my-stack \
204
- --description "NestJS + Next.js + PostgreSQL"
205
-
206
- # List all presets (built-ins + yours)
207
- npx create-fs-app preset list
311
+ # Save a preset (stack fields you leave out get the --yes defaults)
312
+ npx create-fs-app@latest preset save my-stack \
313
+ --frontend react --backend express --database mongodb \
314
+ --description "React + Express + MongoDB"
208
315
 
209
- # Use a preset
210
- npx create-fs-app new-project --preset my-stack
316
+ # List presets (built-ins and yours)
317
+ npx create-fs-app@latest preset list
211
318
 
212
- # Overwrite a preset
213
- npx create-fs-app preset save my-stack --force
319
+ # Use a preset; flags you pass on top override it (preset stack values that no
320
+ # longer fit those flags are dropped and picked again as if not given)
321
+ npx create-fs-app@latest new-project --preset my-stack
214
322
 
215
- # Delete a preset
216
- npx create-fs-app preset delete my-stack
323
+ # Overwrite or delete a preset
324
+ npx create-fs-app@latest preset save my-stack --frontend next.js --force
325
+ npx create-fs-app@latest preset delete my-stack
217
326
  ```
218
327
 
328
+ Presets are stored in `~/.create-fs-app/presets/presets.json`. Presets saved with 2.x are converted when they are read.
329
+
219
330
  ### Built-in presets (read-only)
220
331
 
221
332
  | Name | Stack |
222
333
  |------|-------|
223
- | `saas-starter` | Next.js + NestJS + PostgreSQL + Prisma + JWT + Docker |
224
- | `mern-stack` | React (Vite) + Express + MongoDB + Mongoose |
225
- | `t3-inspired` | Next.js + NestJS + PostgreSQL + Prisma + GraphQL |
334
+ | `saas-starter` | Next.js + NestJS + PostgreSQL + Prisma, pnpm |
335
+ | `ecommerce` | React (Vite) + Express + MongoDB + Mongoose, npm |
336
+ | `minimal` | React (Vite) + Express + PostgreSQL + Prisma, npm, without ESLint, Prettier and Docker |
226
337
 
227
338
  ---
228
339
 
229
340
  ## Commands Reference
230
341
 
231
- ### `list [search]`
342
+ ### `list [search]` (alias `ls`)
343
+
344
+ Lists official templates grouped by frontend, one line each with the backend, the database and ORM, and notes (`no Docker`, `JWT available`). Contributed templates follow with their author and `--template <uuid>`. The footer shows an `info` command and example create commands.
232
345
 
233
346
  ```bash
234
- npx create-fs-app list # official templates
235
- npx create-fs-app list --contributed # community templates
236
- npx create-fs-app list --all # both sections
237
- npx create-fs-app list graphql # keyword search
347
+ npx create-fs-app@latest list # official templates
348
+ npx create-fs-app@latest list --contributed # community templates
349
+ npx create-fs-app@latest list --all # both
350
+ npx create-fs-app@latest list drizzle # keyword search
238
351
  ```
239
352
 
240
353
  ### `info <template>`
241
354
 
242
- Show full details for any template.
355
+ Shows the details of a template (by key, part of a key, or UUID): its description, the layer log, its features and, for official templates, the exact flags that select it.
243
356
 
244
357
  ```bash
245
- npx create-fs-app info turborepo-nextjs-nestjs-postgresql-prisma
246
- npx create-fs-app info graphql
358
+ npx create-fs-app@latest info turborepo-nextjs-nestjs-postgresql-prisma
247
359
  ```
248
360
 
249
361
  ### `preset <subcommand>`
250
362
 
251
363
  ```bash
252
- npx create-fs-app preset list
253
- npx create-fs-app preset save <name> [--description "..."] [--force]
254
- npx create-fs-app preset delete <name>
364
+ npx create-fs-app@latest preset list
365
+ npx create-fs-app@latest preset save <name> [stack flags] [--description "..."] [--force]
366
+ npx create-fs-app@latest preset delete <name>
255
367
  ```
256
368
 
257
369
  ### `health`
258
370
 
259
- Verify your environment is ready.
260
-
261
371
  ```bash
262
- npx create-fs-app health
372
+ npx create-fs-app@latest health
263
373
  ```
264
374
 
265
- Checks: **Node.js ≥ 18**, **Git**, **Docker** (binary + daemon), **npm**, **pnpm**, **yarn**.
375
+ Required: **Node.js 20.19+, 22.12+ or 24+** and **npm**. Optional: **git** (only needed for `git init`), **Docker** (binary and daemon), **pnpm**, **yarn**. Exits with code 1 only when a required tool is missing.
266
376
 
267
377
  ### `cache <subcommand>`
268
378
 
269
379
  ```bash
270
- npx create-fs-app cache stats # show cache size and template count
271
- npx create-fs-app cache clear # wipe cached templates
380
+ npx create-fs-app@latest cache stats # cache size and template count
381
+ npx create-fs-app@latest cache clear # remove cached templates and the cached registry
272
382
  ```
273
383
 
274
- Cache location: `~/.create-fs-app/`
384
+ Downloaded templates are cached in `~/.create-fs-app/cache` for 24 hours. After that the CLI downloads them again; when you are offline it uses the old copy and warns. The template registry is cached for 1 hour, and a copy is bundled with the CLI for offline use.
275
385
 
276
386
  ---
277
387
 
@@ -282,59 +392,62 @@ Cache location: `~/.create-fs-app/`
282
392
  git clone https://github.com/Om-jannu/create-fs-app.git
283
393
  cd create-fs-app
284
394
 
285
- # 2. Install
286
- npm install
395
+ # 2. Install (pnpm workspace: packages/cli, apps/web)
396
+ pnpm install
287
397
 
288
- # 3. Build (TypeScript → dist/)
289
- npm run build
398
+ # 3. Build (CLI → packages/cli/dist/, website → apps/web/.next/)
399
+ pnpm build
290
400
 
291
- # 4. Link globally
292
- npm link
401
+ # 4. Link the CLI globally
402
+ cd packages/cli && npm link
293
403
 
294
- # 5. Test
404
+ # 5. Try it
295
405
  create-fs-app my-test-app
296
406
 
297
407
  # 6. Unlink when done
298
408
  npm unlink -g create-fs-app
299
409
  ```
300
410
 
301
- ### Point at a local templates repo
411
+ ### Use the local templates
302
412
 
303
413
  ```bash
304
- git clone https://github.com/Om-jannu/create-fs-app-templates.git ../create-fs-app-templates
305
-
306
414
  create-fs-app my-app \
307
- --frontend next.js --backend nest.js --database postgresql --orm prisma \
308
- --local-templates ../create-fs-app-templates \
309
- --yes
415
+ --frontend next.js --backend nest.js --database postgresql \
416
+ --local-templates /path/to/create-fs-app/templates
310
417
  ```
311
418
 
312
- This skips GitHub entirely and copies the template straight from your local clone.
419
+ `--local-templates` takes the folder that contains `registry.json` (`templates/` in this repo). The CLI then reads that registry and copies the template from your checkout, without network access.
313
420
 
314
421
  ---
315
422
 
316
423
  ## Requirements
317
424
 
318
- | Tool | Minimum version |
319
- |------|----------------|
320
- | Node.js | **18.0.0** |
321
- | npm | bundled with Node.js |
322
- | Git | any recent |
323
- | Docker | optional — used inside generated projects only |
425
+ | Tool | Version |
426
+ |------|---------|
427
+ | Node.js | **20.19+**, **22.12+** or **24+** (Node.js 21 and 23 are not supported) |
428
+ | npm, pnpm or yarn | npm comes with Node.js |
429
+ | git | optional, only for `git init` in the new project |
430
+ | Docker | optional, runs the database of the generated project and builds its app images |
324
431
 
325
432
  ---
326
433
 
327
434
  ## Contributing
328
435
 
329
- See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for:
436
+ See **[CONTRIBUTING.md](https://github.com/Om-jannu/create-fs-app/blob/master/CONTRIBUTING.md)** for:
330
437
 
331
438
  - Reporting bugs and requesting features
332
- - Development environment setup
439
+ - Development environment setup, tests and the template e2e script
333
440
  - Pull request process and code standards
334
- - How to contribute a template to the community registry
441
+ - How to add a template
442
+
443
+ Please also read our **[Code of Conduct](https://github.com/Om-jannu/create-fs-app/blob/master/CODE_OF_CONDUCT.md)**.
444
+
445
+ Found a security issue? See **[SECURITY.md](https://github.com/Om-jannu/create-fs-app/blob/master/SECURITY.md)** and please don't open a public issue for vulnerabilities.
446
+
447
+ See **[CHANGELOG.md](https://github.com/Om-jannu/create-fs-app/blob/master/CHANGELOG.md)** for release history.
335
448
 
336
449
  ---
337
450
 
338
451
  ## License
339
452
 
340
- ISC © [Om-jannu](https://github.com/Om-jannu)
453
+ ISC © [Om-jannu](https://github.com/Om-jannu) — see **[LICENSE](https://github.com/Om-jannu/create-fs-app/blob/master/LICENSE)**.