@donotdev/cli 0.0.25 → 0.0.27

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 (32) hide show
  1. package/README.md +7 -295
  2. package/dependencies-matrix.json +49 -21
  3. package/dist/bin/commands/agent-setup.js +1 -1
  4. package/dist/bin/commands/build.js +143 -142
  5. package/dist/bin/commands/bump.js +145 -144
  6. package/dist/bin/commands/cacheout.js +142 -141
  7. package/dist/bin/commands/coach.js +156 -151
  8. package/dist/bin/commands/create-app.js +22 -22
  9. package/dist/bin/commands/create-project.js +165 -164
  10. package/dist/bin/commands/db.js +46704 -46703
  11. package/dist/bin/commands/deploy.js +674 -575
  12. package/dist/bin/commands/dev.js +179 -159
  13. package/dist/bin/commands/doctor.js +152 -151
  14. package/dist/bin/commands/emu.js +186 -176
  15. package/dist/bin/commands/format.js +142 -141
  16. package/dist/bin/commands/get-demo.js +1 -1
  17. package/dist/bin/commands/make-admin.js +64133 -64040
  18. package/dist/bin/commands/preview.js +178 -159
  19. package/dist/bin/commands/seed.js +46704 -46703
  20. package/dist/bin/commands/setup-cicd.js +164 -158
  21. package/dist/bin/commands/setup.js +409 -209
  22. package/dist/bin/commands/staging.js +674 -575
  23. package/dist/bin/commands/sync-secrets.js +142 -141
  24. package/dist/bin/commands/type-check.js +142 -141
  25. package/dist/bin/dndev.js +93 -1
  26. package/dist/bin/donotdev.js +93 -1
  27. package/dist/index.js +713 -605
  28. package/package.json +1 -1
  29. package/templates/app-next/postcss.config.js.example +3 -54
  30. package/templates/root-consumer/bunfig.toml.example +6 -49
  31. package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +19 -0
  32. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +50 -9
package/README.md CHANGED
@@ -1,307 +1,19 @@
1
1
  # @donotdev/cli
2
2
 
3
- Command-line interface for the DoNotDev Framework - scaffold projects, manage deployments, and maintain code quality.
3
+ Your companion CLI for getting started with the [DoNotDev Framework](https://donotdev.com) and the WAI-WAY development protocol. It helps you scaffold projects, manage deployments, and maintain code quality throughout the journey.
4
4
 
5
- ## Installation
6
-
7
- ### Global Installation (Recommended for consumers)
8
-
9
- ```bash
10
- npm install -g @donotdev/cli
11
- # or
12
- bun install -g @donotdev/cli
13
- ```
14
-
15
- ### Project-local Installation
16
-
17
- ```bash
18
- npm install --save-dev @donotdev/cli
19
- # or
20
- bun add -d @donotdev/cli
21
- ```
22
-
23
- ## License
24
-
25
- This package requires a DoNotDev Framework license. Applications will display a watermark without a valid license key.
26
-
27
- **View pricing:** [donotdev.com/pricing](https://donotdev.com/pricing)
28
- **Purchase license:** [donotdev.com/purchase](https://donotdev.com/purchase)
29
-
30
- **Configure your license key:**
31
-
32
- ```bash
33
- # In .env file (Vite projects)
34
- VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here
35
-
36
- # In .env file (Next.js projects)
37
- NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here
38
-
39
- # Or in code (before framework initialization)
40
- globalThis.__DONOTDEV_LICENSE_KEY__ = 'dndev_your_key_here';
41
- ```
42
-
43
- For detailed setup instructions, see [License Key Setup Guide](../../docs/guides/LICENSE_KEY_SETUP.md).
44
-
45
- ## Usage
46
-
47
- ```bash
48
- dndev <command> [options]
49
- ```
50
-
51
- ## Commands
52
-
53
- ### `dndev init [name]`
54
-
55
- Create a new DoNotDev project. Alias for `create-project`.
56
-
57
- ```bash
58
- dndev init my-app
59
- ```
60
-
61
- Scaffolds a complete project with:
62
-
63
- - Monorepo structure (Turbo)
64
- - Vite or Next.js apps
65
- - Framework packages configured
66
- - CLAUDE.md for AI-assisted development
67
- - Ready-to-use auth, billing, i18n features
68
-
69
- **Options:**
70
-
71
- - Interactive prompts guide you through setup
72
- - Choose Vite or Next.js
73
- - Configure features (auth, billing, OAuth)
74
- - Select deployment platform (Firebase, Vercel, both)
75
-
76
- ### `dndev create-project [name]`
77
-
78
- Full form of `init`. Creates a new DoNotDev project.
79
-
80
- ```bash
81
- dndev create-project my-saas-app
82
- ```
83
-
84
- ### `dndev create-app [name]`
85
-
86
- Add a new app to an existing project.
87
-
88
- ```bash
89
- cd my-project
90
- dndev create-app admin-panel
91
- ```
92
-
93
- **Options:**
94
-
95
- - Choose app type (Vite or Next.js)
96
- - Configure routing
97
- - Set up i18n
98
- - Enable features per app
99
-
100
- ### `dndev deploy`
101
-
102
- Deploy your application to Firebase or Vercel.
103
-
104
- ```bash
105
- dndev deploy
106
- ```
107
-
108
- **Features:**
109
-
110
- - Auto-detects deployment platform
111
- - Validates service accounts (Firebase)
112
- - Deploys functions and hosting
113
- - Handles package.json dependencies
114
- - Creates backups before deployment
115
- - Rollback support on failure
116
-
117
- **Options:**
118
-
119
- - `--project <id>` - Specify Firebase project
120
- - `--only functions` - Deploy only functions
121
- - `--only hosting` - Deploy only hosting
122
- - `--dry-run` - Show what would be deployed
123
-
124
- ### `dndev sync-secrets`
125
-
126
- Sync environment variables from `.env` to Firebase Functions or Vercel.
127
-
128
- ```bash
129
- dndev sync-secrets
130
- ```
131
-
132
- **Features:**
133
-
134
- - Parses `.env` files
135
- - Filters public vars (VITE*\*, NEXT_PUBLIC*\*)
136
- - Skips Firebase reserved prefixes
137
- - Supports both Firebase and Vercel
138
- - Cross-platform secret input
139
-
140
- **Options:**
141
-
142
- - `--env-file <path>` - Path to .env file (default: .env)
143
- - `--platform <platform>` - Target platform: firebase or vercel
144
- - `--project <id>` - Firebase project ID
145
- - `--vercel-project <id>` - Vercel project ID
146
- - `--dry-run` - Show what would be synced
147
- - `--verbose` - Detailed output
148
-
149
- **Examples:**
5
+ ## Getting Started
150
6
 
151
7
  ```bash
152
- dndev sync-secrets --platform=firebase
153
- dndev sync-secrets --env-file .env.production --project my-firebase-project
154
- dndev sync-secrets --platform=vercel --vercel-project my-vercel-app
155
- dndev sync-secrets --dry-run
156
- ```
8
+ bunx create-donotdev
157
9
 
158
- ### `dndev setup-cicd`
10
+ OR
159
11
 
160
- Set up CI/CD: detect providers, upload GitHub secrets, and generate GitHub Actions workflow YAML.
161
-
162
- ```bash
163
- dndev setup-cicd
12
+ npm i -g @donotdev/cli@latest
164
13
  ```
165
14
 
166
- **Features:**
167
-
168
- - Auto-detects providers (Firebase, Vercel, Supabase) from app config
169
- - Collects all required secrets and uploads to GitHub
170
- - Generates `ci.yml`, `deploy.yml`, and optionally `deploy-staging.yml`
171
- - Handles service account files (base64-encoded)
172
- - Reads secrets from `.dndev.secrets` (GH_PAT, VERCEL_TOKEN, etc.)
173
- - Staging support via `.firebaserc` staging alias
174
-
175
- **Options:**
176
-
177
- - `--app <app>` - Target app (auto-detected if single app)
178
- - `--staging` - Include staging workflow generation
179
- - `--dry-run` - Preview secrets and YAML without uploading or writing
180
-
181
- **Examples:**
182
-
183
- ```bash
184
- dndev setup-cicd # auto-detect app and providers
185
- dndev setup-cicd --app web # target specific app
186
- dndev setup-cicd --dry-run # preview only
187
- ```
188
-
189
- ### `dndev format [files]`
190
-
191
- Format code using Prettier.
192
-
193
- ```bash
194
- dndev format
195
- dndev format src/**/*.ts
196
- ```
197
-
198
- **Features:**
199
-
200
- - Auto-formats code with Prettier
201
- - Consistent code style
202
-
203
- ### `dndev clean`
204
-
205
- Remove build artifacts and caches.
206
-
207
- ```bash
208
- dndev clean
209
- dndev clean --cache
210
- dndev clean --all
211
- ```
212
-
213
- **Options:**
214
-
215
- - `--cache` - Also remove .turbo, .next, .vite caches
216
- - `--all` - Also remove node_modules and lock files
217
-
218
- **What gets cleaned:**
219
-
220
- - Always: `dist/` directories
221
- - `--cache`: `.turbo/`, `.next/`, `.vite/`, `tsconfig.tsbuildinfo`
222
- - `--all`: `node_modules/`, lock files (package-lock.json, yarn.lock, bun.lockb)
223
-
224
- ## Programmatic Usage
225
-
226
- You can also use CLI commands programmatically:
227
-
228
- ```typescript
229
- import { createProject, createApp } from '@donotdev/cli';
230
-
231
- await createProject('my-app', {
232
- type: 'vite',
233
- features: ['auth', 'billing'],
234
- deployment: 'firebase',
235
- });
236
-
237
- await createApp('admin-panel', {
238
- type: 'nextjs',
239
- });
240
- ```
241
-
242
- ## Development Mode vs Consumer Mode
243
-
244
- The CLI automatically detects execution context:
245
-
246
- **Consumer Mode** (default when installed from npm):
247
-
248
- - Creates projects in current directory
249
- - Uses published @donotdev/\* packages
250
- - Includes CLAUDE.md for AI assistance
251
- - Standard npm dependency resolution
252
-
253
- **Development Mode** (when run in dndev monorepo):
254
-
255
- - Creates projects adjacent to monorepo
256
- - Uses workspace:\* dependencies
257
- - Links to local framework packages
258
-
259
- ## Architecture
260
-
261
- ```
262
- packages/cli/
263
- ├── src/
264
- │ ├── bin/
265
- │ │ └── dndev.mjs # CLI entry point
266
- │ ├── commands/
267
- │ │ ├── init.ts # Alias for create-project
268
- │ │ ├── create-project.ts # Project scaffolding
269
- │ │ ├── create-app.ts # App creation
270
- │ │ ├── deploy.ts # Deployment automation
271
- │ │ ├── sync-secrets.ts # Secret management
272
- │ │ ├── format.ts # Code formatting
273
- │ │ └── clean.ts # Cleanup utilities
274
- │ ├── utils/
275
- │ │ ├── pathResolver.ts # Cross-platform paths
276
- │ │ ├── logger.ts # Colored output
277
- │ │ └── errors.ts # Error handling
278
- │ └── index.ts # Programmatic API
279
- ├── templates/ # Scaffolding templates
280
- ├── configs/ # Bundled configs
281
- └── package.json
282
- ```
283
-
284
- ## Requirements
285
-
286
- - Node.js >= 18
287
- - Bun >= 1.0 (recommended) or npm
288
- - Git (for project initialization)
289
-
290
- For deployment:
291
-
292
- - Firebase CLI (for Firebase deployment)
293
- - Vercel CLI (for Vercel deployment)
15
+ This installs the `dndev` CLI globally and scaffolds your project. Run `dndev` to see all available commands.
294
16
 
295
17
  ## License
296
18
 
297
- MIT
298
-
299
- ## Links
300
-
301
- - [DoNotDev Framework](https://donotdev.com)
302
- - [Documentation](https://github.com/rodolpheapc/dndev/tree/main/docs)
303
- - [GitHub](https://github.com/rodolpheapc/dndev)
304
-
305
- ---
306
-
307
- Built by AMBROISE PARK Consulting
19
+ See [LICENSE.md](./LICENSE.md) — Built by [AMBROISE PARK Consulting](https://donotdev.com)
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./dependencies-matrix.schema.json",
3
3
  "version": "0.0.6",
4
- "description": "Centralized dependency versions for DoNotDev framework. Single source of truth for all external dependencies. ⚠️ SYNC REQUIRED: When adding/removing @donotdev/* feature packages (auth, billing, crud, oauth), also update packages/core/config/constants.js BUNDLING.optionalFeatures array.",
5
- "lastUpdated": "2026-03-04",
4
+ "description": "Centralized dependency versions for DoNotDev framework. Single source of truth for all external dependencies. Third-party optional deps are auto-detected from peerDependenciesMeta via scanInstalledPackageOptionals() — no manual constants update needed.",
5
+ "lastUpdated": "2026-03-05",
6
6
  "migrationGuides": {
7
7
  "0.0→0.1": {
8
8
  "path": "docs/migration/v0.0-to-v0.1.md",
@@ -17,73 +17,73 @@
17
17
  "@donotdev/auth": {
18
18
  "description": "Authentication package",
19
19
  "packages": {
20
- "@donotdev/auth": "^0.0.15"
20
+ "@donotdev/auth": "^0.0.17"
21
21
  }
22
22
  },
23
23
  "@donotdev/billing": {
24
24
  "description": "Billing package",
25
25
  "packages": {
26
- "@donotdev/billing": "^0.0.13"
26
+ "@donotdev/billing": "^0.0.15"
27
27
  }
28
28
  },
29
29
  "@donotdev/components": {
30
30
  "description": "UI components package",
31
31
  "packages": {
32
- "@donotdev/components": "^0.0.24"
32
+ "@donotdev/components": "^0.0.26"
33
33
  }
34
34
  },
35
35
  "@donotdev/core": {
36
36
  "description": "Core framework package",
37
37
  "packages": {
38
- "@donotdev/core": "^0.0.32"
38
+ "@donotdev/core": "^0.0.36"
39
39
  }
40
40
  },
41
41
  "@donotdev/crud": {
42
42
  "description": "CRUD operations package",
43
43
  "packages": {
44
- "@donotdev/crud": "^0.0.21"
44
+ "@donotdev/crud": "^0.0.23"
45
45
  }
46
46
  },
47
47
  "@donotdev/firebase": {
48
48
  "description": "Firebase provider package",
49
49
  "packages": {
50
- "@donotdev/firebase": "^0.0.17"
50
+ "@donotdev/firebase": "^0.0.19"
51
51
  }
52
52
  },
53
53
  "@donotdev/functions": {
54
54
  "description": "Firebase Functions package",
55
55
  "packages": {
56
- "@donotdev/functions": "^0.0.17"
56
+ "@donotdev/functions": "^0.0.19"
57
57
  }
58
58
  },
59
59
  "@donotdev/oauth": {
60
60
  "description": "OAuth package",
61
61
  "packages": {
62
- "@donotdev/oauth": "^0.0.13"
62
+ "@donotdev/oauth": "^0.0.15"
63
63
  }
64
64
  },
65
65
  "@donotdev/templates": {
66
66
  "description": "Page templates package",
67
67
  "packages": {
68
- "@donotdev/templates": "^0.0.16"
68
+ "@donotdev/templates": "^0.0.18"
69
69
  }
70
70
  },
71
71
  "@donotdev/ui": {
72
72
  "description": "UI and routing package",
73
73
  "packages": {
74
- "@donotdev/ui": "^0.0.21"
74
+ "@donotdev/ui": "^0.0.23"
75
75
  }
76
76
  },
77
77
  "@donotdev/expo": {
78
78
  "description": "Expo/React Native components package",
79
79
  "packages": {
80
- "@donotdev/expo": "^0.0.7"
80
+ "@donotdev/expo": "^0.0.9"
81
81
  }
82
82
  },
83
83
  "@donotdev/supabase": {
84
84
  "description": "Supabase provider package",
85
85
  "packages": {
86
- "@donotdev/supabase": "^0.0.6"
86
+ "@donotdev/supabase": "^0.0.8"
87
87
  }
88
88
  },
89
89
  "supabase-js": {
@@ -418,13 +418,13 @@
418
418
  "@donotdev/cli": {
419
419
  "description": "Cli package",
420
420
  "packages": {
421
- "@donotdev/cli": "^0.0.25"
421
+ "@donotdev/cli": "^0.0.27"
422
422
  }
423
423
  },
424
424
  "@donotdev/mcp-server": {
425
425
  "description": "MCP server for component type lookups",
426
426
  "packages": {
427
- "@donotdev/mcp-server": "^0.0.12"
427
+ "@donotdev/mcp-server": "^0.0.14"
428
428
  }
429
429
  },
430
430
  "mcp-sdk": {
@@ -450,7 +450,7 @@
450
450
  "@donotdev/security": {
451
451
  "description": "Security package",
452
452
  "packages": {
453
- "@donotdev/security": "^0.0.7"
453
+ "@donotdev/security": "^0.0.9"
454
454
  }
455
455
  },
456
456
  "xterm": {
@@ -541,8 +541,11 @@
541
541
  "peerDependencies": [
542
542
  "react",
543
543
  "lucide-react",
544
- "firebase",
544
+ "@donotdev/auth",
545
+ "@donotdev/billing",
545
546
  "@donotdev/crud",
547
+ "@donotdev/firebase",
548
+ "@donotdev/oauth",
546
549
  "routing",
547
550
  "validation"
548
551
  ],
@@ -552,22 +555,47 @@
552
555
  "seo"
553
556
  ],
554
557
  "peerDependenciesMeta": {
558
+ "@donotdev/auth": {
559
+ "optional": true
560
+ },
561
+ "@donotdev/billing": {
562
+ "optional": true
563
+ },
555
564
  "@donotdev/crud": {
556
565
  "optional": true
566
+ },
567
+ "@donotdev/firebase": {
568
+ "optional": true
569
+ },
570
+ "@donotdev/oauth": {
571
+ "optional": true
572
+ },
573
+ "routing": {
574
+ "optional": true
557
575
  }
558
576
  }
559
577
  },
560
578
  "@donotdev/auth": {
561
579
  "peerDependencies": [
562
580
  "react",
563
- "firebase"
564
- ]
581
+ "@donotdev/firebase",
582
+ "@donotdev/supabase"
583
+ ],
584
+ "peerDependenciesMeta": {
585
+ "@donotdev/firebase": {
586
+ "optional": true
587
+ },
588
+ "@donotdev/supabase": {
589
+ "optional": true
590
+ }
591
+ }
565
592
  },
566
593
  "@donotdev/billing": {
567
594
  "peerDependencies": [
568
595
  "react",
569
596
  "lucide-react",
570
- "stripe"
597
+ "stripe",
598
+ "@donotdev/auth"
571
599
  ]
572
600
  },
573
601
  "@donotdev/crud": {
@@ -529,8 +529,8 @@ init_utils();
529
529
  // packages/tooling/src/cli/agent-setup.ts
530
530
  init_utils();
531
531
  init_cli_output();
532
- import { join } from "path";
533
532
  import { existsSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
533
+ import { join } from "path";
534
534
  var mcpConfig = {
535
535
  command: "bunx",
536
536
  args: ["@donotdev/mcp-server@latest"]