forgestack-os-cli 0.3.4 → 0.3.6

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 (46) hide show
  1. package/README.md +382 -150
  2. package/dist/commands/doctor.d.ts +12 -0
  3. package/dist/commands/doctor.js +214 -0
  4. package/dist/commands/doctor.js.map +1 -0
  5. package/dist/commands/organize.d.ts +2 -0
  6. package/dist/commands/organize.js +126 -0
  7. package/dist/commands/organize.js.map +1 -0
  8. package/dist/commands/run-tasks.d.ts +12 -0
  9. package/dist/commands/run-tasks.js +125 -0
  10. package/dist/commands/run-tasks.js.map +1 -0
  11. package/dist/index.js +30 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/utils/doctor/check-database.d.ts +8 -0
  14. package/dist/utils/doctor/check-database.js +271 -0
  15. package/dist/utils/doctor/check-database.js.map +1 -0
  16. package/dist/utils/doctor/check-docker.d.ts +8 -0
  17. package/dist/utils/doctor/check-docker.js +212 -0
  18. package/dist/utils/doctor/check-docker.js.map +1 -0
  19. package/dist/utils/doctor/check-env.d.ts +12 -0
  20. package/dist/utils/doctor/check-env.js +207 -0
  21. package/dist/utils/doctor/check-env.js.map +1 -0
  22. package/dist/utils/doctor/check-lint.d.ts +8 -0
  23. package/dist/utils/doctor/check-lint.js +225 -0
  24. package/dist/utils/doctor/check-lint.js.map +1 -0
  25. package/dist/utils/doctor/check-node.d.ts +20 -0
  26. package/dist/utils/doctor/check-node.js +172 -0
  27. package/dist/utils/doctor/check-node.js.map +1 -0
  28. package/dist/utils/doctor/check-ports.d.ts +15 -0
  29. package/dist/utils/doctor/check-ports.js +166 -0
  30. package/dist/utils/doctor/check-ports.js.map +1 -0
  31. package/dist/utils/doctor/check-prisma.d.ts +8 -0
  32. package/dist/utils/doctor/check-prisma.js +202 -0
  33. package/dist/utils/doctor/check-prisma.js.map +1 -0
  34. package/dist/utils/doctor/index.d.ts +14 -0
  35. package/dist/utils/doctor/index.js +15 -0
  36. package/dist/utils/doctor/index.js.map +1 -0
  37. package/dist/utils/doctor/types.d.ts +50 -0
  38. package/dist/utils/doctor/types.js +5 -0
  39. package/dist/utils/doctor/types.js.map +1 -0
  40. package/dist/utils/file-organizer.d.ts +17 -0
  41. package/dist/utils/file-organizer.js +170 -0
  42. package/dist/utils/file-organizer.js.map +1 -0
  43. package/dist/utils/task-runner.d.ts +14 -0
  44. package/dist/utils/task-runner.js +79 -0
  45. package/dist/utils/task-runner.js.map +1 -0
  46. package/package.json +11 -4
package/README.md CHANGED
@@ -1,236 +1,424 @@
1
- # ForgeStack OS CLI
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/halloffame12/forgestack-os/main/docs/assets/logo.svg" alt="ForgeStack OS Logo" width="80" height="80" />
3
+ </p>
2
4
 
3
- Generate production-ready full-stack SaaS projects with one command.
5
+ <h1 align="center">ForgeStack OS CLI</h1>
4
6
 
5
- ## Installation
7
+ <p align="center">
8
+ <strong>Generate production-ready full-stack SaaS projects with one command.</strong>
9
+ </p>
6
10
 
7
- ### Option 1: Using npx (Recommended - No Installation Needed)
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/forgestack-os-cli"><img src="https://img.shields.io/npm/v/forgestack-os-cli?style=flat-square&color=0891b2&label=npm" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/forgestack-os-cli"><img src="https://img.shields.io/npm/dm/forgestack-os-cli?style=flat-square&color=0891b2" alt="npm downloads" /></a>
14
+ <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License" />
15
+ <img src="https://img.shields.io/badge/Node.js-18+-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js" />
16
+ <img src="https://img.shields.io/badge/TypeScript-5.7-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" />
17
+ </p>
8
18
 
9
- ```bash
10
- npx forgestack-os-cli create my-app
11
- ```
19
+ <p align="center">
20
+ <a href="#-installation">Installation</a>
21
+ <a href="#-quick-start">Quick Start</a> •
22
+ <a href="#-commands">Commands</a> •
23
+ <a href="#-examples">Examples</a> •
24
+ <a href="#-troubleshooting">Help</a>
25
+ </p>
26
+
27
+ ---
12
28
 
13
- No setup required! The fastest way to get started. The CLI is downloaded and run on the fly.
29
+ ## 📦 Installation
14
30
 
15
- ### Option 2: Install Globally
31
+ ### Using npx (Recommended — No Install Required)
16
32
 
17
33
  ```bash
18
- npm install -g forgestack-os-cli
34
+ npx forgestack-os-cli create my-app
19
35
  ```
20
36
 
21
- Then create projects using:
37
+ ### Global Installation
22
38
 
23
39
  ```bash
40
+ npm install -g forgestack-os-cli
24
41
  forgestack-os-cli create my-app
25
42
  ```
26
43
 
27
- **Note on Global Install:** After installing globally, the command `forgestack-os-cli` should be in your PATH. If you get `command not found` errors:
44
+ <details>
45
+ <summary><strong>🔧 Troubleshooting global install</strong></summary>
46
+
47
+ If you get `command not found` after global install:
48
+
49
+ 1. Check your npm bin directory:
28
50
 
29
- 1. Verify your npm bin directory is in PATH:
30
51
  ```bash
31
52
  npm config get prefix
32
53
  ```
33
-
34
- 2. Add it to PATH if needed:
35
- - **Windows (PowerShell):** `[System.Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Users\YourUsername\AppData\Roaming\npm", [System.EnvironmentVariableTarget]::User)`
36
- - **macOS/Linux:** Add `export PATH="~/.npm-global/bin:$PATH"` to `~/.bash_profile` or `~/.zshrc`
54
+
55
+ 2. Add it to your PATH:
56
+ - **Windows (PowerShell)**:
57
+ ```powershell
58
+ [System.Environment]::SetEnvironmentVariable("Path", "$env:Path;$(npm config get prefix)", [System.EnvironmentVariableTarget]::User)
59
+ ```
60
+ - **macOS/Linux**:
61
+ ```bash
62
+ export PATH="$(npm config get prefix)/bin:$PATH"
63
+ ```
37
64
 
38
65
  3. Verify installation:
39
66
  ```bash
40
67
  forgestack-os-cli --version
41
68
  ```
42
69
 
43
- ## Quick Start
70
+ </details>
44
71
 
45
- **Fastest way to create a project:**
72
+ ---
73
+
74
+ ## ⚡ Quick Start
46
75
 
47
76
  ```bash
48
- # Interactive mode - we'll ask you questions
49
- npx forgestack-os-cli create my-app
77
+ # Interactive mode answer prompts to configure your stack
78
+ npx forgestack-os-cli create my-saas-app
50
79
 
51
- # With a preset - production-ready stack
52
- npx forgestack-os-cli create my-enterprise --preset next-nest-clerk-pg
80
+ # Use a preset for instant setup
81
+ npx forgestack-os-cli create my-app --preset next-nest-clerk-pg
53
82
 
54
- # With specific flags
55
- npx forgestack-os-cli create my-api --frontend nextjs --backend nestjs --auth supabase --database postgresql --docker
83
+ # Specify options directly
84
+ npx forgestack-os-cli create my-app \
85
+ --frontend nextjs \
86
+ --backend nestjs \
87
+ --auth clerk \
88
+ --database postgresql \
89
+ --docker
56
90
  ```
57
91
 
58
- ## Usage
92
+ **In 30 seconds**, you get:
93
+
94
+ - ✅ Full authentication system
95
+ - ✅ Database with migrations
96
+ - ✅ API documentation (Swagger)
97
+ - ✅ Docker configuration
98
+ - ✅ TypeScript everywhere
99
+
100
+ ---
101
+
102
+ ## 🧰 Commands
103
+
104
+ ### `create` — Generate a New Project
59
105
 
60
106
  ```bash
61
- forgestack-os-cli create <project-name> [options]
107
+ npx forgestack-os-cli create <project-name> [options]
62
108
  ```
63
109
 
64
- Or with npx:
110
+ <table>
111
+ <tr><th>Option</th><th>Values</th><th>Description</th></tr>
112
+ <tr><td><code>--frontend</code></td><td><code>react-vite</code> | <code>nextjs</code> | <code>vue-vite</code> | <code>sveltekit</code></td><td>Frontend framework</td></tr>
113
+ <tr><td><code>--backend</code></td><td><code>express</code> | <code>fastify</code> | <code>nestjs</code> | <code>bun-elysia</code> | <code>go-fiber</code></td><td>Backend framework</td></tr>
114
+ <tr><td><code>--auth</code></td><td><code>jwt</code> | <code>clerk</code> | <code>supabase</code> | <code>authjs</code> | <code>firebase</code></td><td>Authentication</td></tr>
115
+ <tr><td><code>--database</code></td><td><code>postgresql</code> | <code>mongodb</code> | <code>mysql</code> | <code>sqlite</code></td><td>Database</td></tr>
116
+ <tr><td><code>--api</code></td><td><code>rest</code> | <code>graphql</code> | <code>trpc</code></td><td>API style</td></tr>
117
+ <tr><td><code>--preset</code></td><td><code>next-nest-clerk-pg</code> | <code>react-express-jwt-mongo</code> | <code>next-fastify-supabase-trpc</code></td><td>Preset stack</td></tr>
118
+ <tr><td><code>--docker</code></td><td>—</td><td>Include Docker config</td></tr>
119
+ <tr><td><code>--multi-tenant</code></td><td>—</td><td>Enable multi-tenancy</td></tr>
120
+ <tr><td><code>--skip-install</code></td><td>—</td><td>Skip npm install</td></tr>
121
+ <tr><td><code>--skip-git</code></td><td>—</td><td>Skip git init</td></tr>
122
+ </table>
123
+
124
+ ---
125
+
126
+ ### `doctor` — Validate Environment ✨ NEW
127
+
128
+ Diagnose your dev environment and catch issues before they slow you down.
65
129
 
66
130
  ```bash
67
- npx forgestack-os-cli create <project-name> [options]
131
+ npx forgestack-os-cli doctor [options]
68
132
  ```
69
133
 
70
- ### Available Options
71
-
72
- | Option | Values | Description |
73
- |--------|--------|-------------|
74
- | `--frontend` | `react-vite` \| `nextjs` \| `vue-vite` \| `sveltekit` | Frontend framework |
75
- | `--backend` | `express` \| `fastify` \| `nestjs` \| `bun-elysia` \| `go-fiber` | Backend framework |
76
- | `--auth` | `jwt` \| `clerk` \| `supabase` \| `authjs` \| `firebase` | Authentication provider |
77
- | `--database` | `postgresql` \| `mongodb` \| `mysql` \| `sqlite` \| `supabase-db` | Database |
78
- | `--api` | `rest` \| `graphql` \| `trpc` | API style |
79
- | `--preset` | `next-nest-clerk-pg` \| `react-express-jwt-mongo` \| `next-fastify-supabase-trpc` | Predefined stack |
80
- | `--stack` | JSON string | Full stack config as JSON |
81
- | `--docker` | - | Include Docker configuration |
82
- | `--no-docker` | - | Skip Docker configuration (default) |
83
- | `--multi-tenant` | - | Enable multi-tenancy scaffolding |
84
- | `--skip-install` | - | Skip npm install after project creation |
85
- | `--skip-git` | - | Skip git initialization |
86
-
87
- ## Examples
134
+ <table>
135
+ <tr><th>Option</th><th>Description</th></tr>
136
+ <tr><td><code>--lint</code></td><td>Run ESLint and TypeScript checks</td></tr>
137
+ <tr><td><code>--json</code></td><td>Output as JSON for CI/CD pipelines</td></tr>
138
+ <tr><td><code>--fix</code></td><td>Generate <code>.env.missing</code> report</td></tr>
139
+ <tr><td><code>--cwd &lt;path&gt;</code></td><td>Check a specific directory</td></tr>
140
+ </table>
88
141
 
89
- ### Interactive Mode (Recommended)
142
+ **Example Output:**
143
+
144
+ ```
145
+ 🩺 ForgeStack Doctor Report
146
+
147
+ 📋 Node.js & Package Managers
148
+
149
+ ✅ Node.js: Node version: 20.2.0
150
+ ✅ npm: npm version: 10.2.0
151
+ ⏭️ pnpm: pnpm is not installed (optional)
152
+
153
+ 📋 Environment Variables
154
+
155
+ ❌ Missing .env Variables: DATABASE_URL, JWT_SECRET
156
+ 💡 Fix: Add the missing variables to your .env file
157
+
158
+ 📋 Database Connectivity
159
+
160
+ ✅ PostgreSQL Connection: Successfully connected to PostgreSQL
161
+
162
+ 📋 Prisma ORM
163
+
164
+ ✅ Prisma Schema: Prisma schema is valid
165
+ ✅ Prisma Client: Prisma client is generated
166
+ ⚠️ Prisma Migrations: Pending migrations detected
167
+ 💡 Fix: Run: npx prisma migrate dev
168
+
169
+ 📋 Docker
170
+
171
+ ✅ Docker: Docker installed: 24.0.7
172
+ ✅ Docker Daemon: Docker daemon is running
173
+ ✅ Docker Compose: Docker Compose V2: 2.23.0
174
+
175
+ 📋 Port Availability
176
+
177
+ ❌ Backend (port 3000): Port 3000 is used by node (PID: 12345)
178
+ 💡 Fix: Stop the process or use a different port. Kill: taskkill /PID 12345 /F
179
+ ✅ Frontend (port 5173): Port 5173 is available
180
+
181
+ ───────────────────────────────────────────────────────────
182
+
183
+ 📊 Summary:
184
+
185
+ Total Checks: 12
186
+ Passed: 8
187
+ Warnings: 1
188
+ Failed: 2
189
+ Skipped: 1
190
+
191
+ ✖ Found 2 critical issue(s) that need to be fixed.
192
+ ```
193
+
194
+ **Checks Performed:**
195
+
196
+ | Check | Description |
197
+ | -------------- | -------------------------------------------------- |
198
+ | 🟢 Node.js | Version against `.nvmrc` or `package.json` engines |
199
+ | 🟢 npm/pnpm | Package manager availability |
200
+ | 🟢 Environment | Missing variables from `.env.example` |
201
+ | 🟢 Database | PostgreSQL, MongoDB, MySQL, SQLite connectivity |
202
+ | 🟢 Prisma | Client generation, schema validation, migrations |
203
+ | 🟢 Docker | Installation, daemon status, Compose availability |
204
+ | 🟢 Ports | Backend (3000) and frontend (5173) availability |
205
+ | 🟢 ESLint | Linting issues (with `--lint`) |
206
+ | 🟢 TypeScript | Compile errors (with `--lint`) |
207
+
208
+ **CI/CD Integration:**
209
+
210
+ ```yaml
211
+ # GitHub Actions
212
+ - name: Validate Environment
213
+ run: |
214
+ npx forgestack-os-cli doctor --json > doctor-report.json
215
+ if [ $(jq '.summary.failed' doctor-report.json) -gt 0 ]; then
216
+ exit 1
217
+ fi
218
+ ```
219
+
220
+ ---
221
+
222
+ ### `organize` — File Organization Utility
223
+
224
+ Organize files by type or date with duplicate detection.
90
225
 
91
226
  ```bash
92
- npx forgestack-os-cli create my-saas
227
+ npx forgestack-os-cli organize <folder-path> [options]
93
228
  ```
94
229
 
95
- You'll be guided through selecting your stack options with interactive prompts.
230
+ <table>
231
+ <tr><th>Option</th><th>Description</th></tr>
232
+ <tr><td><code>--strategy &lt;type&gt;</code></td><td><code>type</code> (by extension) or <code>date</code> (by YYYY-MM)</td></tr>
233
+ <tr><td><code>--duplicates</code></td><td>Move duplicate files to <code>Duplicates/</code></td></tr>
234
+ </table>
96
235
 
97
- ### Using Presets
236
+ **File Categories:**
237
+
238
+ - 📷 **Images**: jpg, png, gif, svg, webp, bmp, ico
239
+ - 📄 **Documents**: pdf, doc, docx, txt, xlsx, csv, md
240
+ - 🎬 **Videos**: mp4, mkv, avi, mov, wmv, flv
241
+ - 🎵 **Audio**: mp3, wav, flac, aac, m4a, ogg
242
+ - 💻 **Code**: js, ts, py, java, cpp, go, rs, rb
243
+ - 📦 **Archives**: zip, rar, 7z, tar, gz, bz2
244
+ - 📊 **Data**: json, xml, yaml, sql, db, sqlite
245
+ - ⚙️ **Executables**: exe, msi, app, deb, rpm
246
+
247
+ **Example:**
98
248
 
99
- **Next.js + NestJS + Clerk + PostgreSQL (Full-featured):**
100
249
  ```bash
101
- npx forgestack-os-cli create my-enterprise --preset next-nest-clerk-pg
250
+ # Organize Downloads by file type with duplicate detection
251
+ npx forgestack-os-cli organize ~/Downloads --strategy type --duplicates
252
+
253
+ # Organize photos by month
254
+ npx forgestack-os-cli organize ~/Pictures --strategy date
255
+ ```
256
+
257
+ ---
258
+
259
+ ### `run-tasks` — Batch Task Runner
260
+
261
+ Execute shell commands from JSON config with parallel support.
262
+
263
+ ```bash
264
+ npx forgestack-os-cli run-tasks <config-path> [options]
265
+ ```
266
+
267
+ <table>
268
+ <tr><th>Option</th><th>Description</th></tr>
269
+ <tr><td><code>--parallel</code></td><td>Run tasks concurrently</td></tr>
270
+ <tr><td><code>--stop-on-error</code></td><td>Stop on first failure (default: true)</td></tr>
271
+ </table>
272
+
273
+ **Config Format (tasks.json):**
274
+
275
+ ```json
276
+ {
277
+ "tasks": [
278
+ {
279
+ "name": "Build Frontend",
280
+ "command": "npm run build",
281
+ "cwd": "./frontend"
282
+ },
283
+ { "name": "Build Backend", "command": "npm run build", "cwd": "./backend" },
284
+ { "name": "Run Tests", "command": "npm test" },
285
+ { "name": "Deploy", "command": "npm run deploy" }
286
+ ],
287
+ "parallel": false,
288
+ "stopOnError": true
289
+ }
102
290
  ```
103
291
 
104
- **React + Express + JWT + MongoDB (Simple SPA):**
292
+ **Example:**
293
+
294
+ ```bash
295
+ # Run sequentially
296
+ npx forgestack-os-cli run-tasks ./build-pipeline.json
297
+
298
+ # Run in parallel
299
+ npx forgestack-os-cli run-tasks ./build-pipeline.json --parallel
300
+
301
+ # Continue on errors
302
+ npx forgestack-os-cli run-tasks ./tasks.json --stop-on-error false
303
+ ```
304
+
305
+ ---
306
+
307
+ ## 📚 Examples
308
+
309
+ ### Interactive Mode (Recommended)
310
+
105
311
  ```bash
106
- npx forgestack-os-cli create my-app --preset react-express-jwt-mongo
312
+ npx forgestack-os-cli create my-saas
313
+ # Answer prompts to configure your perfect stack
107
314
  ```
108
315
 
109
- **Next.js + Fastify + Supabase + tRPC (Modern fullstack):**
316
+ ### Using Presets
317
+
110
318
  ```bash
111
- npx forgestack-os-cli create my-trpc-app --preset next-fastify-supabase-trpc
319
+ # Enterprise: Next.js + NestJS + Clerk + PostgreSQL
320
+ npx forgestack-os-cli create my-enterprise --preset next-nest-clerk-pg
321
+
322
+ # Startup: React + Express + JWT + MongoDB
323
+ npx forgestack-os-cli create my-startup --preset react-express-jwt-mongo
324
+
325
+ # Modern: Next.js + Fastify + Supabase + tRPC
326
+ npx forgestack-os-cli create my-modern --preset next-fastify-supabase-trpc
112
327
  ```
113
328
 
114
329
  ### Using Flags
115
330
 
116
- **RESTful API with React + Express:**
117
331
  ```bash
118
- npx forgestack-os-cli create my-rest-api \
332
+ # RESTful API with PostgreSQL
333
+ npx forgestack-os-cli create my-api \
119
334
  --frontend react-vite \
120
335
  --backend express \
121
336
  --auth jwt \
122
337
  --database postgresql \
123
- --api rest
124
- ```
338
+ --api rest \
339
+ --docker
125
340
 
126
- **GraphQL Backend with Vue:**
127
- ```bash
128
- npx forgestack-os-cli create my-graphql-app \
341
+ # GraphQL with MongoDB
342
+ npx forgestack-os-cli create my-graphql \
129
343
  --frontend vue-vite \
130
344
  --backend nestjs \
131
345
  --auth firebase \
132
346
  --database mongodb \
133
- --api graphql \
134
- --docker
135
- ```
347
+ --api graphql
136
348
 
137
- **Minimal Setup (SQLite + No Docker):**
138
- ```bash
139
- npx forgestack-os-cli create my-minimal-app \
140
- --frontend react-vite \
141
- --backend express \
142
- --auth jwt \
143
- --database sqlite \
144
- --no-docker
349
+ # Multi-tenant SaaS
350
+ npx forgestack-os-cli create my-saas \
351
+ --preset next-nest-clerk-pg \
352
+ --multi-tenant \
353
+ --docker
145
354
  ```
146
355
 
147
- ### Using JSON Stack Config
148
-
149
- Provide complete configuration as a JSON string:
356
+ ### JSON Stack Config
150
357
 
151
358
  ```bash
152
- npx forgestack-os-cli create my-custom-stack --stack '{
359
+ npx forgestack-os-cli create my-custom --stack '{
153
360
  "frontend": "nextjs",
154
361
  "backend": "fastify",
155
362
  "auth": "supabase",
156
- "database": "supabase-db",
363
+ "database": "postgresql",
157
364
  "apiStyle": "trpc",
158
365
  "docker": true,
159
366
  "multiTenant": true
160
367
  }'
161
368
  ```
162
369
 
163
- **Multi-tenancy with Docker:**
164
- ```bash
165
- npx forgestack-os-cli create my-multitenant-app \
166
- --preset next-nest-clerk-pg \
167
- --multi-tenant \
168
- --docker
169
- ```
170
-
171
- **Skip Dependency Installation:**
172
- ```bash
173
- npx forgestack-os-cli create my-app --preset next-nest-clerk-pg --skip-install
174
- cd my-app
175
- npm install # Install later when you're ready
176
- ```
370
+ ---
177
371
 
178
- ## Features
179
-
180
- - **150+ Stack Combinations** - Frontend (React, Next.js, Vue, Svelte) × Backend (Express, Fastify, NestJS, Bun, Go) × Auth × Database × API Style
181
- - **Multi-tenancy Ready** - Scaffolding support for SaaS applications
182
- - **Docker Compose** - Complete Docker setup with frontend and backend services
183
- - **Environment Templates** - Pre-configured `.env.example` files
184
- - **API Documentation** - Swagger/OpenAPI docs for REST APIs
185
- - **TypeScript First** - Full TypeScript support across all generated code
186
- - **Production Ready** - Best practices, security headers, error handling
187
-
188
- ## Generated Project Structure
372
+ ## 📁 Generated Project Structure
189
373
 
190
374
  ```
191
375
  my-app/
192
- ├── frontend/ # React+Vite, Next.js, Vue, or SvelteKit
193
- │ ├── src/
194
- │ ├── public/
195
- │ ├── package.json
196
- ├── tsconfig.json
197
- │ └── vite.config.ts (or next.config.js)
376
+ ├── 📁 frontend/ # React/Next.js/Vue/Svelte
377
+ │ ├── 📁 src/
378
+ │ ├── 📄 package.json
379
+ │ ├── 📄 tsconfig.json
380
+ └── 📄 vite.config.ts
198
381
 
199
- ├── backend/ # Express, Fastify, NestJS, Bun+Elysia, or Go
200
- │ ├── src/
201
- │ ├── dist/
202
- │ ├── package.json
203
- ├── tsconfig.json
204
- └── .env.example
382
+ ├── 📁 backend/ # Express/Fastify/NestJS/Bun
383
+ │ ├── 📁 src/
384
+ ├── 📁 auth/ # Authentication module
385
+ ├── 📁 users/ # User management
386
+ │ └── 📄 main.ts
387
+ ├── 📄 package.json
388
+ │ ├── 📄 tsconfig.json
389
+ │ └── 📄 .env.example
205
390
 
206
- ├── docker/ # Optional - if --docker enabled
207
- │ ├── docker-compose.yml
208
- │ ├── frontend.Dockerfile
209
- │ └── backend.Dockerfile
391
+ ├── 📁 docker/ # If --docker enabled
392
+ │ ├── 📄 docker-compose.yml
393
+ │ ├── 📄 frontend.Dockerfile
394
+ │ └── 📄 backend.Dockerfile
210
395
 
211
- ├── .env.example # Environment variables template
212
- ├── package.json # Workspace configuration (monorepo)
213
- ├── README.md # Per-project setup guide
214
- └── .gitignore
396
+ ├── 📄 .env.example # Environment template
397
+ ├── 📄 package.json # Monorepo workspace
398
+ └── 📄 README.md # Project-specific docs
215
399
  ```
216
400
 
217
- ## Troubleshooting
401
+ ---
402
+
403
+ ## ❓ Troubleshooting
218
404
 
219
- ### "command not found: forgestack-os-cli"
405
+ <details>
406
+ <summary><strong>"command not found: forgestack-os-cli"</strong></summary>
407
+
408
+ Using npx? Use the full package name:
220
409
 
221
- **Using npx?** Make sure you use the full package name:
222
410
  ```bash
223
411
  npx forgestack-os-cli create my-app
224
412
  ```
225
413
 
226
- **Installed globally?** Try:
227
- 1. Verify npm global bin is in PATH: `echo $PATH` (Unix) or `$env:Path` (Windows)
228
- 2. Reinstall: `npm install -g forgestack-os-cli@latest`
229
- 3. Check Node.js version: `node --version` (requires 18+)
414
+ Installed globally? Check your PATH includes npm's bin directory.
415
+
416
+ </details>
230
417
 
231
- ### "404 Not Found - forgestack"
418
+ <details>
419
+ <summary><strong>"404 Not Found - forgestack"</strong></summary>
232
420
 
233
- The package name is **`forgestack-os-cli`**, not `forgestack`:
421
+ The package name is `forgestack-os-cli`, not `forgestack`:
234
422
 
235
423
  ```bash
236
424
  # ✅ Correct
@@ -240,9 +428,12 @@ npx forgestack-os-cli create my-app
240
428
  npx forgestack create my-app
241
429
  ```
242
430
 
243
- ### "Unknown command"
431
+ </details>
244
432
 
245
- Ensure you're using `create`, not `init`:
433
+ <details>
434
+ <summary><strong>"Unknown command"</strong></summary>
435
+
436
+ Use `create`, not `init`:
246
437
 
247
438
  ```bash
248
439
  # ✅ Correct
@@ -252,28 +443,69 @@ npx forgestack-os-cli create my-app
252
443
  npx forgestack-os-cli init my-app
253
444
  ```
254
445
 
255
- ### Preset not found
446
+ </details>
447
+
448
+ <details>
449
+ <summary><strong>"Preset not found"</strong></summary>
256
450
 
257
- Available presets:
258
- - `next-nest-clerk-pg` - Next.js, NestJS, Clerk, PostgreSQL
259
- - `react-express-jwt-mongo` - React+Vite, Express, JWT, MongoDB
260
- - `next-fastify-supabase-trpc` - Next.js, Fastify, Supabase, tRPC
451
+ Available presets (case-sensitive):
261
452
 
262
- Use exact preset names (case-sensitive).
453
+ - `next-nest-clerk-pg`
454
+ - `react-express-jwt-mongo`
455
+ - `next-fastify-supabase-trpc`
263
456
 
264
- ### Node.js version error
457
+ </details>
265
458
 
266
- ForgeStack requires Node.js 18 or higher:
459
+ <details>
460
+ <summary><strong>Node.js version error</strong></summary>
461
+
462
+ ForgeStack requires Node.js 18+:
267
463
 
268
464
  ```bash
269
- node --version # Check your version
270
- nvm install 18 # Or use nvm/fnm to upgrade
465
+ node --version # Check version
466
+ nvm install 18 # Upgrade with nvm
271
467
  ```
272
468
 
273
- ## Author
469
+ </details>
470
+
471
+ ---
472
+
473
+ ## 🔗 Links
474
+
475
+ - 📚 [Documentation](https://github.com/halloffame12/forgestack-os#readme)
476
+ - 🐛 [Issues](https://github.com/halloffame12/forgestack-os/issues)
477
+ - 💬 [Discussions](https://github.com/halloffame12/forgestack-os/discussions)
478
+ - 📦 [npm Package](https://www.npmjs.com/package/forgestack-os-cli)
479
+
480
+ ---
481
+
482
+ ## 👨‍💻 Author
483
+
484
+ <table>
485
+ <tr>
486
+ <td>
487
+ <img src="https://github.com/halloffame12.png" width="60" style="border-radius: 50%;" alt="Sumit Chauhan" />
488
+ </td>
489
+ <td>
490
+ <strong>Sumit Chauhan</strong><br/>
491
+ <a href="https://github.com/halloffame12">GitHub</a> •
492
+ <a href="https://www.linkedin.com/in/sumit-chauhan-a4ba98325/">LinkedIn</a>
493
+ </td>
494
+ </tr>
495
+ </table>
496
+
497
+ ---
498
+
499
+ ## 📄 License
500
+
501
+ MIT License — see [LICENSE](./LICENSE) for details.
274
502
 
275
- Built and maintained by **Sumit Chauhan** ([halloffame12](https://github.com/halloffame12)).
503
+ ---
276
504
 
277
- ## License
505
+ <p align="center">
506
+ <strong>⭐ Star us on GitHub if this tool helped you!</strong>
507
+ </p>
278
508
 
279
- MIT
509
+ <p align="center">
510
+ <sub>Made with ❤️ by <a href="https://github.com/halloffame12">Sumit Chauhan</a></sub>
511
+ </p>
@@ -0,0 +1,12 @@
1
+ /**
2
+ * ForgeStack Doctor Command
3
+ *
4
+ * Validates the generated SaaS project environment and dev setup.
5
+ * Helps developers quickly detect missing dependencies, configuration issues,
6
+ * and common setup problems before running the app.
7
+ */
8
+ import { DoctorOptions } from '../utils/doctor/index.js';
9
+ /**
10
+ * Main doctor command implementation
11
+ */
12
+ export declare function doctorCommand(options?: DoctorOptions): Promise<void>;