forgestack-os-cli 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +238 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,69 +4,270 @@ Generate production-ready full-stack SaaS projects with one command.
4
4
 
5
5
  ## Installation
6
6
 
7
+ ### Option 1: Using npx (Recommended - No Installation Needed)
8
+
7
9
  ```bash
8
- # Recommended: npx (no install)
9
10
  npx forgestack-os-cli create my-app
11
+ ```
12
+
13
+ No setup required! The fastest way to get started. The CLI is downloaded and run on the fly.
10
14
 
11
- # Or install globally
15
+ ### Option 2: Install Globally
16
+
17
+ ```bash
12
18
  npm install -g forgestack-os-cli
13
- # then
14
- forgestack create my-app
19
+ ```
20
+
21
+ Then create projects using:
22
+
23
+ ```bash
24
+ forgestack-os-cli create my-app
25
+ ```
26
+
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:
28
+
29
+ 1. Verify your npm bin directory is in PATH:
30
+ ```bash
31
+ npm config get prefix
32
+ ```
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`
37
+
38
+ 3. Verify installation:
39
+ ```bash
40
+ forgestack-os-cli --version
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ **Fastest way to create a project:**
46
+
47
+ ```bash
48
+ # Interactive mode - we'll ask you questions
49
+ npx forgestack-os-cli create my-app
50
+
51
+ # With a preset - production-ready stack
52
+ npx forgestack-os-cli create my-enterprise --preset next-nest-clerk-pg
53
+
54
+ # With specific flags
55
+ npx forgestack-os-cli create my-api --frontend nextjs --backend nestjs --auth supabase --database postgresql --docker
15
56
  ```
16
57
 
17
58
  ## Usage
18
59
 
19
60
  ```bash
20
- forgestack create <project-name> [options]
61
+ forgestack-os-cli create <project-name> [options]
62
+ ```
63
+
64
+ Or with npx:
65
+
66
+ ```bash
67
+ npx forgestack-os-cli create <project-name> [options]
21
68
  ```
22
69
 
23
- **Common flags**
70
+ ### Available Options
24
71
 
25
- - `--frontend <framework>`: react-vite | nextjs
26
- - `--backend <framework>`: express | fastify | nestjs | bun-elysia | go-fiber
27
- - `--auth <provider>`: jwt | clerk | supabase | authjs | firebase
28
- - `--database <db>`: postgresql | mongodb | mysql | sqlite | supabase-db
29
- - `--api <style>`: rest | graphql | trpc
30
- - `--preset <name>`: use a predefined stack (e.g., next-nest-clerk-pg)
31
- - `--stack <json>`: provide full stack config as JSON
32
- - `--docker` / `--no-docker`: include or skip Docker config
33
- - `--multi-tenant`: enable multi-tenancy scaffolding
34
- - `--skip-install`: skip dependency installation
35
- - `--skip-git`: skip git init
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 |
36
86
 
37
- ### Examples
87
+ ## Examples
88
+
89
+ ### Interactive Mode (Recommended)
38
90
 
39
91
  ```bash
40
- # Interactive
41
- forgestack create my-saas
92
+ npx forgestack-os-cli create my-saas
93
+ ```
42
94
 
43
- # Preset
44
- forgestack create my-enterprise --preset next-nest-clerk-pg
95
+ You'll be guided through selecting your stack options with interactive prompts.
45
96
 
46
- # Full JSON config
47
- forgestack create my-app --stack '{"frontend":"nextjs","backend":"fastify","auth":"supabase","database":"supabase-db","apiStyle":"trpc","docker":true,"multiTenant":true}'
97
+ ### Using Presets
48
98
 
49
- # Minimal flags
50
- forgestack create api-only --frontend=react-vite --backend=express --auth=jwt --database=postgresql --api=rest --no-docker
99
+ **Next.js + NestJS + Clerk + PostgreSQL (Full-featured):**
100
+ ```bash
101
+ npx forgestack-os-cli create my-enterprise --preset next-nest-clerk-pg
102
+ ```
103
+
104
+ **React + Express + JWT + MongoDB (Simple SPA):**
105
+ ```bash
106
+ npx forgestack-os-cli create my-app --preset react-express-jwt-mongo
107
+ ```
108
+
109
+ **Next.js + Fastify + Supabase + tRPC (Modern fullstack):**
110
+ ```bash
111
+ npx forgestack-os-cli create my-trpc-app --preset next-fastify-supabase-trpc
112
+ ```
113
+
114
+ ### Using Flags
115
+
116
+ **RESTful API with React + Express:**
117
+ ```bash
118
+ npx forgestack-os-cli create my-rest-api \
119
+ --frontend react-vite \
120
+ --backend express \
121
+ --auth jwt \
122
+ --database postgresql \
123
+ --api rest
124
+ ```
125
+
126
+ **GraphQL Backend with Vue:**
127
+ ```bash
128
+ npx forgestack-os-cli create my-graphql-app \
129
+ --frontend vue-vite \
130
+ --backend nestjs \
131
+ --auth firebase \
132
+ --database mongodb \
133
+ --api graphql \
134
+ --docker
135
+ ```
136
+
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
145
+ ```
146
+
147
+ ### Using JSON Stack Config
148
+
149
+ Provide complete configuration as a JSON string:
150
+
151
+ ```bash
152
+ npx forgestack-os-cli create my-custom-stack --stack '{
153
+ "frontend": "nextjs",
154
+ "backend": "fastify",
155
+ "auth": "supabase",
156
+ "database": "supabase-db",
157
+ "apiStyle": "trpc",
158
+ "docker": true,
159
+ "multiTenant": true
160
+ }'
161
+ ```
162
+
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
51
176
  ```
52
177
 
53
178
  ## Features
54
179
 
55
- - 150+ stack combinations across frontend, backend, auth, database, and API styles
56
- - Multi-tenancy ready scaffolds
57
- - Docker Compose and env templates
58
- - API docs (Swagger) for REST backends
59
- - TypeScript-first across generated code
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
60
187
 
61
- ## Generated Project
188
+ ## Generated Project Structure
62
189
 
63
190
  ```
64
191
  my-app/
65
- ├─ frontend/ # Next.js or React+Vite
66
- ├─ backend/ # Express, Fastify, NestJS, Bun+Elysia, or Go+Fiber
67
- ├─ .env.example
68
- ├─ package.json (workspaces)
69
- └─ README.md (per-project runbook)
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)
198
+
199
+ ├── backend/ # Express, Fastify, NestJS, Bun+Elysia, or Go
200
+ │ ├── src/
201
+ │ ├── dist/
202
+ │ ├── package.json
203
+ │ ├── tsconfig.json
204
+ │ └── .env.example
205
+
206
+ ├── docker/ # Optional - if --docker enabled
207
+ │ ├── docker-compose.yml
208
+ │ ├── frontend.Dockerfile
209
+ │ └── backend.Dockerfile
210
+
211
+ ├── .env.example # Environment variables template
212
+ ├── package.json # Workspace configuration (monorepo)
213
+ ├── README.md # Per-project setup guide
214
+ └── .gitignore
215
+ ```
216
+
217
+ ## Troubleshooting
218
+
219
+ ### "command not found: forgestack-os-cli"
220
+
221
+ **Using npx?** Make sure you use the full package name:
222
+ ```bash
223
+ npx forgestack-os-cli create my-app
224
+ ```
225
+
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+)
230
+
231
+ ### "404 Not Found - forgestack"
232
+
233
+ The package name is **`forgestack-os-cli`**, not `forgestack`:
234
+
235
+ ```bash
236
+ # ✅ Correct
237
+ npx forgestack-os-cli create my-app
238
+
239
+ # ❌ Wrong
240
+ npx forgestack create my-app
241
+ ```
242
+
243
+ ### "Unknown command"
244
+
245
+ Ensure you're using `create`, not `init`:
246
+
247
+ ```bash
248
+ # ✅ Correct
249
+ npx forgestack-os-cli create my-app
250
+
251
+ # ❌ Wrong
252
+ npx forgestack-os-cli init my-app
253
+ ```
254
+
255
+ ### Preset not found
256
+
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
261
+
262
+ Use exact preset names (case-sensitive).
263
+
264
+ ### Node.js version error
265
+
266
+ ForgeStack requires Node.js 18 or higher:
267
+
268
+ ```bash
269
+ node --version # Check your version
270
+ nvm install 18 # Or use nvm/fnm to upgrade
70
271
  ```
71
272
 
72
273
  ## Author
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgestack-os-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "ForgeStack OS CLI - Generate production-ready full-stack SaaS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",