create-fs-app 2.0.5 → 3.0.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 +254 -150
  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 +109 -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 +42 -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 +892 -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 +351 -655
  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 +22 -25
  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
@@ -8,7 +8,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](https://img.shields.io/badge/node-%3E%3D20.19-brightgreen)](https://nodejs.org)
12
12
  </div>
13
13
 
14
14
  ---
@@ -19,7 +19,8 @@
19
19
  - [Interactive Wizard](#interactive-wizard)
20
20
  - [Stack Flags](#stack-flags)
21
21
  - [Official Templates](#official-templates)
22
- - [Contributed Templates](#contributed-templates)
22
+ - [JWT Authentication](#jwt-authentication)
23
+ - [Contributed and Custom Templates](#contributed-and-custom-templates)
23
24
  - [All CLI Options](#all-cli-options)
24
25
  - [Presets](#presets)
25
26
  - [Commands Reference](#commands-reference)
@@ -32,246 +33,346 @@
32
33
  ## Quick Start
33
34
 
34
35
  ```bash
35
- # Interactive wizard — guides you through every choice
36
- npx create-fs-app my-app
36
+ # Interactive wizard: asks for everything you did not pass
37
+ npx create-fs-app@latest my-app
37
38
 
38
39
  # Pick your stack and skip all prompts
39
- npx create-fs-app my-app \
40
+ npx create-fs-app@latest my-app \
40
41
  --frontend next.js \
41
42
  --backend nest.js \
42
43
  --database postgresql \
43
- --orm prisma \
44
- --yes
44
+ --orm prisma
45
45
 
46
- # Use a saved preset
47
- npx create-fs-app my-app --preset saas-starter
46
+ # Let the CLI choose defaults for anything missing
47
+ npx create-fs-app@latest my-app --frontend vue --yes
48
+
49
+ # See what would be created, without writing anything
50
+ npx create-fs-app@latest my-app --frontend next.js --backend hono --dry-run
51
+
52
+ # Use a preset
53
+ npx create-fs-app@latest my-app --preset saas-starter
48
54
  ```
49
55
 
56
+ Use `npx create-fs-app@latest` to always get the newest CLI; it does not check for updates itself.
57
+
50
58
  ---
51
59
 
52
60
  ## Interactive Wizard
53
61
 
54
- Running `npx create-fs-app <name>` without stack flags launches a guided wizard:
62
+ 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
63
 
56
- | Step | Options |
64
+ | Step | Choices |
57
65
  |------|---------|
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
66
+ | Project name | validated as an npm package name and checked against existing folders |
67
+ | Monorepo | Turborepo |
68
+ | Frontend | Next.js, React (Vite), Vue (Vite) |
69
+ | Backend | NestJS, Express, Hono, Fastify |
70
+ | Database | PostgreSQL, MongoDB, SQLite |
71
+ | ORM / ODM | Prisma, Mongoose, Drizzle |
72
+ | Package manager | npm, pnpm, yarn (default: the one you ran the CLI with) |
73
+ | Extras | ESLint, Prettier, Docker (database compose file and app Dockerfiles, only if the template has Docker files), GitHub Actions CI, initialize git |
74
+ | Auth | None or JWT (only for NestJS and Express) |
75
+ | Install dependencies | yes / no (default: no) |
76
+
77
+ 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.
78
+
79
+ 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`.
80
+
81
+ 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.
82
+
83
+ ```
84
+ demo Turborepo · npm · node ≥20.19
85
+ ├─ apps/frontend Next.js 16 :3000 App Router · Tailwind CSS 4
86
+ ├─ packages/* eslint-config · typescript-config
87
+ ├─ apps/backend NestJS 11 :3001 REST · Swagger /api
88
+ ├─ apps/backend/prisma Prisma 7 schema · migrations
89
+ └─ database PostgreSQL 16 :5432 docker compose
90
+ ```
91
+
92
+ After you confirm, the CLI:
93
+ 1. Copies the matching official template (from GitHub, the 24-hour cache, or `--local-templates`)
94
+ 2. Sets the package names and replaces `{{PROJECT_NAME}}` with your project name
95
+ 3. Applies your extras (removes ESLint, Prettier or Docker files you turned off, adds CI or JWT auth)
96
+ 4. Initializes a git repository, unless you passed `--no-git`
97
+ 5. Installs dependencies, only if you chose to (or passed `--install`)
98
+
99
+ 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
100
 
75
101
  ---
76
102
 
77
103
  ## Stack Flags
78
104
 
79
- Bypass the wizard by passing flags directly. Any flag you omit is prompted for (or uses the `--yes` default).
105
+ Pass the stack as flags to skip those questions.
80
106
 
81
107
  ```bash
82
- npx create-fs-app my-app \
108
+ npx create-fs-app@latest my-app \
83
109
  --monorepo turborepo \
84
110
  --frontend next.js \
85
- --backend nest.js \
111
+ --backend express \
86
112
  --database postgresql \
87
113
  --orm prisma \
88
- --styling tailwind \
89
- --api-style rest \
90
114
  --auth jwt \
91
- --turbopack \
92
115
  --ci \
93
- --package-manager pnpm \
94
- --yes
116
+ --package-manager pnpm
95
117
  ```
96
118
 
97
119
  ### Available values
98
120
 
99
121
  | Flag | Values |
100
122
  |------|--------|
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` |
123
+ | `--monorepo` | `turborepo` |
124
+ | `--frontend` | `next.js`, `react`, `vue` |
125
+ | `--backend` | `nest.js`, `express`, `hono`, `fastify` |
126
+ | `--database` | `postgresql`, `mongodb`, `sqlite` |
127
+ | `--orm` | `prisma`, `mongoose`, `drizzle` |
128
+ | `--package-manager` | `npm`, `pnpm`, `yarn` |
129
+ | `--auth` | `none`, `jwt` (`jwt` only with `nest.js` or `express`) |
130
+
131
+ Values are case-insensitive. Aliases: `nextjs` → `next.js`, `nestjs` → `nest.js`, `fastify-ts` → `fastify`, `postgres` → `postgresql`, `mongo` → `mongodb`.
132
+
133
+ 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`.
134
+
135
+ ### Missing or invalid values
136
+
137
+ - **In a terminal:** the wizard asks for the missing values.
138
+ - **With `--yes`:** missing values get defaults (Next.js, NestJS, PostgreSQL, Prisma when available, otherwise the first value that fits).
139
+ - **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:
140
+
141
+ ```
142
+ ✗ Missing required options: --backend, --database, --orm
143
+ No terminal to ask in.
144
+ --backend nest.js, express, hono, fastify
145
+ --database postgresql, mongodb, sqlite
146
+ --orm prisma, mongoose, drizzle
147
+ Try: --backend nest.js --database postgresql --orm prisma
148
+ ```
149
+
150
+ - **A value without a template** exits with code 1 and names the values that fit:
151
+
152
+ ```
153
+ ✗ No template for Vue + NestJS
154
+ Vue works with: express
155
+ Try: --backend express
156
+ ```
157
+
158
+ The CLI never prompts when stdin or stdout is not a terminal, or when the `CI` environment variable is set.
110
159
 
111
160
  ---
112
161
 
113
162
  ## Official Templates
114
163
 
115
- Official templates are built and maintained by the create-fs-app team. The wizard and stack flags select from this set automatically.
164
+ Official templates live in [`templates/`](./templates) of this repository and are built 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
165
 
117
166
  | Template | Stack |
118
167
  |----------|-------|
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 |
168
+ | `turborepo-nextjs-nestjs-postgresql-prisma` | Next.js 16 + NestJS 11 + PostgreSQL 16 + Prisma 7 |
121
169
  | `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 |
170
+ | `turborepo-nextjs-express-postgresql-prisma` | Next.js 16 + Express 4 + PostgreSQL 16 + Prisma 7 |
171
+ | `turborepo-nextjs-express-mongodb-mongoose` | Next.js 16 + Express 4 + MongoDB 7 + Mongoose 8 |
172
+ | `turborepo-nextjs-express-sqlite-drizzle` | Next.js 16 + Express 4 + SQLite (libSQL) + Drizzle (no Docker or database setup) |
173
+ | `turborepo-nextjs-hono-postgresql-drizzle` | Next.js 16 + Hono 4 + PostgreSQL 16 + Drizzle |
174
+ | `turborepo-nextjs-fastify-postgresql-prisma` | Next.js 16 + Fastify 5 + PostgreSQL 16 + Prisma 7 |
175
+ | `turborepo-react-nestjs-postgresql-prisma` | React 19 (Vite) + NestJS 11 + PostgreSQL 16 + Prisma 7 |
125
176
  | `turborepo-react-nestjs-mongodb-mongoose` | React 19 (Vite) + NestJS 11 + MongoDB 7 + Mongoose 8 |
177
+ | `turborepo-react-express-postgresql-prisma` | React 19 (Vite) + Express 4 + PostgreSQL 16 + Prisma 7 |
126
178
  | `turborepo-react-express-mongodb-mongoose` | React 19 (Vite) + Express 4 + MongoDB 7 + Mongoose 8 |
179
+ | `turborepo-vue-express-postgresql-prisma` | Vue 3 (Vite) + Express 4 + PostgreSQL 16 + Prisma 7 |
127
180
 
128
- Browse them:
181
+ 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.
129
182
 
130
183
  ```bash
131
- npx create-fs-app list
132
- npx create-fs-app list graphql # keyword search
184
+ npx create-fs-app@latest list # all official templates
185
+ npx create-fs-app@latest list prisma # keyword search
186
+ npx create-fs-app@latest info nextjs-hono-postgresql-drizzle # details and the exact flags
133
187
  ```
134
188
 
135
189
  ---
136
190
 
137
- ## Contributed Templates
191
+ ## JWT Authentication
192
+
193
+ `--auth jwt` (or "JWT" in the wizard) adds login to NestJS and Express backends. It is not offered for Hono and Fastify.
194
+
195
+ 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:
196
+
197
+ 1. Set `JWT_SECRET` in `apps/backend/.env`, for example with `openssl rand -hex 32`. The backend refuses to start without it.
198
+ 2. Set `AUTH_USER_EMAIL`, then create the password hash and put it in `AUTH_USER_PASSWORD_HASH`:
199
+ ```bash
200
+ cd apps/backend && npm run auth:hash-password -- 'your-password'
201
+ ```
202
+ 3. Log in and call the protected route:
203
+ ```bash
204
+ curl -s -X POST http://localhost:3001/auth/login -H 'content-type: application/json' \
205
+ -d '{"email":"you@example.com","password":"your-password"}'
206
+ curl -s http://localhost:3001/auth/me -H "Authorization: Bearer <access_token>"
207
+ ```
208
+
209
+ 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.
210
+
211
+ ---
138
212
 
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**.
213
+ ## Contributed and Custom Templates
214
+
215
+ ### Contributed templates
216
+
217
+ Community templates are listed in the registry with a permanent **UUID v4**.
141
218
 
142
219
  ```bash
143
- # Browse contributed templates — shows UUID and contributor
144
- npx create-fs-app list --contributed
220
+ npx create-fs-app@latest list --contributed # shows UUID and contributor
221
+ npx create-fs-app@latest my-app --template <uuid> # scaffold one
222
+ ```
223
+
224
+ To add a template, see [templates/CONTRIBUTING.md](./templates/CONTRIBUTING.md).
145
225
 
146
- # Scaffold from a contributed template using its UUID
147
- npx create-fs-app my-app --template bc75b4fb-3d42-4f6e-a8c1-0123456789ab
226
+ ### Any GitHub repository
227
+
228
+ ```bash
229
+ npx create-fs-app@latest my-app --template-url https://github.com/owner/repo
230
+ npx create-fs-app@latest my-app --template-url https://github.com/owner/repo/tree/main/path/to/template
148
231
  ```
149
232
 
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.
233
+ 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
234
 
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).
235
+ > create-fs-app 2.x reads its templates from the old `create-fs-app-templates` repository. 3.x reads them from [`templates/`](./templates) of this repository.
154
236
 
155
237
  ---
156
238
 
157
239
  ## All CLI Options
158
240
 
159
241
  ```
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
242
+ npx create-fs-app@latest [name] [options]
243
+
244
+ Template source
245
+ -t, --template <uuid> Use a contributed template by UUID
246
+ --template-url <url> Use a custom template from a GitHub URL
247
+ --preset <name> Use a configuration preset
248
+ --local-templates <dir> Use templates from a local directory that contains registry.json
249
+
250
+ Stack
251
+ --monorepo <tool> turborepo
252
+ --frontend <framework> next.js | react | vue
253
+ --backend <framework> nest.js | express | hono | fastify
254
+ --database <db> postgresql | mongodb | sqlite
255
+ --orm <orm> prisma | mongoose | drizzle
256
+
257
+ Project options
258
+ --package-manager <pm> npm | pnpm | yarn
259
+ --eslint / --no-eslint Keep (default) or remove ESLint configs and lint scripts
260
+ --prettier / --no-prettier Keep (default) or remove Prettier and the format script
261
+ --docker / --no-docker Keep (default) or remove Docker files
262
+ --ci / --no-ci Add a GitHub Actions CI workflow (default: no)
263
+ --auth <strategy> none | jwt (jwt: nest.js, express)
264
+
265
+ Behavior
186
266
  --no-git Skip git initialization
187
267
  --install Install dependencies after scaffolding (default: false)
188
- --no-cache Force fresh download, skip cache
189
- -y, --yes Accept all defaults, skip prompts
268
+ --no-cache Skip the template cache
269
+ --dry-run Show what would be created without writing anything
270
+ -y, --yes Use defaults for missing options (no prompts)
271
+ -V, --version Print the version
272
+ -h, --help Show help
273
+ ```
274
+
275
+ `--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.
276
+
277
+ `--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.
278
+
279
+ 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):
190
280
 
191
- Development
192
- --local-templates <path> Use a local templates repo instead of GitHub
193
281
  ```
282
+ ✗ --auth jwt is not available for hono
283
+ JWT auth works with: nest.js, express
284
+ Try: --auth none
285
+ ```
286
+
287
+ Option parse errors, such as an unknown option or a missing option value, print commander's one-line `error: ...` message and also exit 1.
288
+
289
+ If scaffolding fails, the CLI removes the folder it created, so you can simply retry.
290
+
291
+ ### Output and colours
292
+
293
+ 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 `├─`, `✓`, `✗`.
194
294
 
195
295
  ---
196
296
 
197
297
  ## Presets
198
298
 
199
- Save a flag combination as a named preset and re-use it with a single word.
299
+ A preset stores a stack and project options under a name.
200
300
 
201
301
  ```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
302
+ # Save a preset (stack fields you leave out get the --yes defaults)
303
+ npx create-fs-app@latest preset save my-stack \
304
+ --frontend react --backend express --database mongodb \
305
+ --description "React + Express + MongoDB"
208
306
 
209
- # Use a preset
210
- npx create-fs-app new-project --preset my-stack
307
+ # List presets (built-ins and yours)
308
+ npx create-fs-app@latest preset list
211
309
 
212
- # Overwrite a preset
213
- npx create-fs-app preset save my-stack --force
310
+ # Use a preset; flags you pass on top override it (preset stack values that no
311
+ # longer fit those flags are dropped and picked again as if not given)
312
+ npx create-fs-app@latest new-project --preset my-stack
214
313
 
215
- # Delete a preset
216
- npx create-fs-app preset delete my-stack
314
+ # Overwrite or delete a preset
315
+ npx create-fs-app@latest preset save my-stack --frontend next.js --force
316
+ npx create-fs-app@latest preset delete my-stack
217
317
  ```
218
318
 
319
+ Presets are stored in `~/.create-fs-app/presets/presets.json`. Presets saved with 2.x are converted when they are read.
320
+
219
321
  ### Built-in presets (read-only)
220
322
 
221
323
  | Name | Stack |
222
324
  |------|-------|
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 |
325
+ | `saas-starter` | Next.js + NestJS + PostgreSQL + Prisma, pnpm |
326
+ | `ecommerce` | React (Vite) + Express + MongoDB + Mongoose, npm |
327
+ | `minimal` | React (Vite) + Express + PostgreSQL + Prisma, npm, without ESLint, Prettier and Docker |
226
328
 
227
329
  ---
228
330
 
229
331
  ## Commands Reference
230
332
 
231
- ### `list [search]`
333
+ ### `list [search]` (alias `ls`)
334
+
335
+ 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
336
 
233
337
  ```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
338
+ npx create-fs-app@latest list # official templates
339
+ npx create-fs-app@latest list --contributed # community templates
340
+ npx create-fs-app@latest list --all # both
341
+ npx create-fs-app@latest list drizzle # keyword search
238
342
  ```
239
343
 
240
344
  ### `info <template>`
241
345
 
242
- Show full details for any template.
346
+ 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
347
 
244
348
  ```bash
245
- npx create-fs-app info turborepo-nextjs-nestjs-postgresql-prisma
246
- npx create-fs-app info graphql
349
+ npx create-fs-app@latest info turborepo-nextjs-nestjs-postgresql-prisma
247
350
  ```
248
351
 
249
352
  ### `preset <subcommand>`
250
353
 
251
354
  ```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>
355
+ npx create-fs-app@latest preset list
356
+ npx create-fs-app@latest preset save <name> [stack flags] [--description "..."] [--force]
357
+ npx create-fs-app@latest preset delete <name>
255
358
  ```
256
359
 
257
360
  ### `health`
258
361
 
259
- Verify your environment is ready.
260
-
261
362
  ```bash
262
- npx create-fs-app health
363
+ npx create-fs-app@latest health
263
364
  ```
264
365
 
265
- Checks: **Node.js ≥ 18**, **Git**, **Docker** (binary + daemon), **npm**, **pnpm**, **yarn**.
366
+ Required: **Node.js ≥ 20.19** 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
367
 
267
368
  ### `cache <subcommand>`
268
369
 
269
370
  ```bash
270
- npx create-fs-app cache stats # show cache size and template count
271
- npx create-fs-app cache clear # wipe cached templates
371
+ npx create-fs-app@latest cache stats # cache size and template count
372
+ npx create-fs-app@latest cache clear # remove cached templates and the cached registry
272
373
  ```
273
374
 
274
- Cache location: `~/.create-fs-app/`
375
+ 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
376
 
276
377
  ---
277
378
 
@@ -282,45 +383,42 @@ Cache location: `~/.create-fs-app/`
282
383
  git clone https://github.com/Om-jannu/create-fs-app.git
283
384
  cd create-fs-app
284
385
 
285
- # 2. Install
286
- npm install
386
+ # 2. Install (pnpm workspace: packages/cli, apps/web)
387
+ pnpm install
287
388
 
288
- # 3. Build (TypeScript → dist/)
289
- npm run build
389
+ # 3. Build (CLI → packages/cli/dist/, website → apps/web/.next/)
390
+ pnpm build
290
391
 
291
- # 4. Link globally
292
- npm link
392
+ # 4. Link the CLI globally
393
+ cd packages/cli && npm link
293
394
 
294
- # 5. Test
395
+ # 5. Try it
295
396
  create-fs-app my-test-app
296
397
 
297
398
  # 6. Unlink when done
298
399
  npm unlink -g create-fs-app
299
400
  ```
300
401
 
301
- ### Point at a local templates repo
402
+ ### Use the local templates
302
403
 
303
404
  ```bash
304
- git clone https://github.com/Om-jannu/create-fs-app-templates.git ../create-fs-app-templates
305
-
306
405
  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
406
+ --frontend next.js --backend nest.js --database postgresql \
407
+ --local-templates /path/to/create-fs-app/templates
310
408
  ```
311
409
 
312
- This skips GitHub entirely and copies the template straight from your local clone.
410
+ `--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
411
 
314
412
  ---
315
413
 
316
414
  ## Requirements
317
415
 
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 |
416
+ | Tool | Version |
417
+ |------|---------|
418
+ | Node.js | **20.19.0** or newer |
419
+ | npm, pnpm or yarn | npm comes with Node.js |
420
+ | git | optional, only for `git init` in the new project |
421
+ | Docker | optional, runs the database of the generated project and builds its app images |
324
422
 
325
423
  ---
326
424
 
@@ -329,12 +427,18 @@ This skips GitHub entirely and copies the template straight from your local clon
329
427
  See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for:
330
428
 
331
429
  - Reporting bugs and requesting features
332
- - Development environment setup
430
+ - Development environment setup, tests and the template e2e script
333
431
  - Pull request process and code standards
334
- - How to contribute a template to the community registry
432
+ - How to add a template
433
+
434
+ Please also read our **[Code of Conduct](./CODE_OF_CONDUCT.md)**.
435
+
436
+ Found a security issue? See **[SECURITY.md](./SECURITY.md)** and please don't open a public issue for vulnerabilities.
437
+
438
+ See **[CHANGELOG.md](./CHANGELOG.md)** for release history.
335
439
 
336
440
  ---
337
441
 
338
442
  ## License
339
443
 
340
- ISC © [Om-jannu](https://github.com/Om-jannu)
444
+ ISC © [Om-jannu](https://github.com/Om-jannu) — see **[LICENSE](./LICENSE)**.