@supunkalharajayasinghe/project-cli 1.3.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.
- package/LICENSE +21 -0
- package/README.md +380 -0
- package/dist/commands/create.d.ts +3 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +48 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/greet.d.ts +3 -0
- package/dist/commands/greet.d.ts.map +1 -0
- package/dist/commands/greet.js +10 -0
- package/dist/commands/greet.js.map +1 -0
- package/dist/generators/applyAiPlan.d.ts +3 -0
- package/dist/generators/applyAiPlan.d.ts.map +1 -0
- package/dist/generators/applyAiPlan.js +426 -0
- package/dist/generators/applyAiPlan.js.map +1 -0
- package/dist/generators/applyFeatureModules.d.ts +4 -0
- package/dist/generators/applyFeatureModules.d.ts.map +1 -0
- package/dist/generators/applyFeatureModules.js +242 -0
- package/dist/generators/applyFeatureModules.js.map +1 -0
- package/dist/generators/applyFullstackPlan.d.ts +3 -0
- package/dist/generators/applyFullstackPlan.d.ts.map +1 -0
- package/dist/generators/applyFullstackPlan.js +413 -0
- package/dist/generators/applyFullstackPlan.js.map +1 -0
- package/dist/generators/applyPlan.d.ts +3 -0
- package/dist/generators/applyPlan.d.ts.map +1 -0
- package/dist/generators/applyPlan.js +22 -0
- package/dist/generators/applyPlan.js.map +1 -0
- package/dist/generators/applyWebsitePlan.d.ts +3 -0
- package/dist/generators/applyWebsitePlan.d.ts.map +1 -0
- package/dist/generators/applyWebsitePlan.js +1053 -0
- package/dist/generators/applyWebsitePlan.js.map +1 -0
- package/dist/generators/createNextBase.d.ts +3 -0
- package/dist/generators/createNextBase.d.ts.map +1 -0
- package/dist/generators/createNextBase.js +20 -0
- package/dist/generators/createNextBase.js.map +1 -0
- package/dist/generators/generateBasicProject.d.ts +3 -0
- package/dist/generators/generateBasicProject.d.ts.map +1 -0
- package/dist/generators/generateBasicProject.js +65 -0
- package/dist/generators/generateBasicProject.js.map +1 -0
- package/dist/generators/starterBranding.d.ts +9 -0
- package/dist/generators/starterBranding.d.ts.map +1 -0
- package/dist/generators/starterBranding.js +48 -0
- package/dist/generators/starterBranding.js.map +1 -0
- package/dist/generators/writeGeneratedReadme.d.ts +3 -0
- package/dist/generators/writeGeneratedReadme.d.ts.map +1 -0
- package/dist/generators/writeGeneratedReadme.js +99 -0
- package/dist/generators/writeGeneratedReadme.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/askBasicScaffoldOptions.d.ts +3 -0
- package/dist/prompts/askBasicScaffoldOptions.d.ts.map +1 -0
- package/dist/prompts/askBasicScaffoldOptions.js +36 -0
- package/dist/prompts/askBasicScaffoldOptions.js.map +1 -0
- package/dist/prompts/askCreatePlan.d.ts +3 -0
- package/dist/prompts/askCreatePlan.d.ts.map +1 -0
- package/dist/prompts/askCreatePlan.js +232 -0
- package/dist/prompts/askCreatePlan.js.map +1 -0
- package/dist/types.d.ts +64 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/files.d.ts +14 -0
- package/dist/utils/files.d.ts.map +1 -0
- package/dist/utils/files.js +47 -0
- package/dist/utils/files.js.map +1 -0
- package/dist/utils/generateSecret.d.ts +2 -0
- package/dist/utils/generateSecret.d.ts.map +1 -0
- package/dist/utils/generateSecret.js +5 -0
- package/dist/utils/generateSecret.js.map +1 -0
- package/dist/utils/pathExists.d.ts +2 -0
- package/dist/utils/pathExists.d.ts.map +1 -0
- package/dist/utils/pathExists.js +11 -0
- package/dist/utils/pathExists.js.map +1 -0
- package/dist/utils/runCommand.d.ts +8 -0
- package/dist/utils/runCommand.d.ts.map +1 -0
- package/dist/utils/runCommand.js +59 -0
- package/dist/utils/runCommand.js.map +1 -0
- package/dist/utils/strings.d.ts +3 -0
- package/dist/utils/strings.d.ts.map +1 -0
- package/dist/utils/strings.js +15 -0
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/validateFreeText.d.ts +13 -0
- package/dist/utils/validateFreeText.d.ts.map +1 -0
- package/dist/utils/validateFreeText.js +19 -0
- package/dist/utils/validateFreeText.js.map +1 -0
- package/dist/utils/validateProjectName.d.ts +7 -0
- package/dist/utils/validateProjectName.d.ts.map +1 -0
- package/dist/utils/validateProjectName.js +42 -0
- package/dist/utils/validateProjectName.js.map +1 -0
- package/dist/utils/writeJson.d.ts +2 -0
- package/dist/utils/writeJson.d.ts.map +1 -0
- package/dist/utils/writeJson.js +2 -0
- package/dist/utils/writeJson.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Supun Kalhara Jayasinghe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# ts-cli-tool
|
|
2
|
+
|
|
3
|
+
An intent-based TypeScript project scaffolder for generating production-shaped Next.js starter projects. Generated projects feature premium, light-themed starter layouts (v1.3.0 - Premium Blueprint Starters) with customized styles, responsive cards, interactive state indicators, built-in `lucide-react` icons, and central documentation links.
|
|
4
|
+
|
|
5
|
+
Instead of only asking low-level setup questions, `ts-cli-tool` asks what kind of project you want to build, creates an official Next.js base project, and then applies a tailored blueprint structure.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
`ts-cli-tool` helps generate practical starter projects from developer intent.
|
|
10
|
+
|
|
11
|
+
Current supported blueprints:
|
|
12
|
+
|
|
13
|
+
- Website
|
|
14
|
+
- Full-stack Product
|
|
15
|
+
- AI App
|
|
16
|
+
|
|
17
|
+
The CLI flow:
|
|
18
|
+
|
|
19
|
+
```txt
|
|
20
|
+
project-cli create
|
|
21
|
+
↓
|
|
22
|
+
Project name
|
|
23
|
+
↓
|
|
24
|
+
Choose project blueprint
|
|
25
|
+
↓
|
|
26
|
+
Choose blueprint-specific shape
|
|
27
|
+
↓
|
|
28
|
+
Choose relevant modules
|
|
29
|
+
↓
|
|
30
|
+
Create Next.js base project
|
|
31
|
+
↓
|
|
32
|
+
Apply custom blueprint files
|
|
33
|
+
↓
|
|
34
|
+
Apply optional feature modules
|
|
35
|
+
↓
|
|
36
|
+
Optionally install dependencies
|
|
37
|
+
↓
|
|
38
|
+
Print next steps
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Why this exists
|
|
42
|
+
|
|
43
|
+
Traditional project scaffolding usually starts with framework configuration.
|
|
44
|
+
|
|
45
|
+
This tool starts with project intent.
|
|
46
|
+
|
|
47
|
+
For example, instead of only creating a blank Next.js app, the CLI can generate:
|
|
48
|
+
|
|
49
|
+
- A multi-page website with pages, layout components, contact form placeholder, and SEO files
|
|
50
|
+
- A full-stack product starter with dashboard structure, API route placeholders, Prisma/PostgreSQL, Redis, Docker, and GitHub Actions
|
|
51
|
+
- An AI app starter with chat UI, API route placeholder, AI configuration, and optional persistence modules
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
### Global install (recommended)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install -g @supunkalharajayasinghe/project-cli
|
|
59
|
+
project-cli create
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Run without installing
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx @supunkalharajayasinghe/project-cli create
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### From source (for contributors)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/SupunKalharaJayasinghe/ts-cli-tool.git
|
|
72
|
+
cd ts-cli-tool
|
|
73
|
+
npm install
|
|
74
|
+
npm run build
|
|
75
|
+
npm link
|
|
76
|
+
project-cli create
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Commands
|
|
80
|
+
|
|
81
|
+
### `project-cli greet <name>`
|
|
82
|
+
|
|
83
|
+
Prints a test greeting.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
project-cli greet Supun
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### `project-cli create`
|
|
90
|
+
|
|
91
|
+
Starts the project scaffolding flow.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
project-cli create
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Blueprint: Website
|
|
98
|
+
|
|
99
|
+
Use this for public-facing websites.
|
|
100
|
+
|
|
101
|
+
Examples:
|
|
102
|
+
|
|
103
|
+
- Landing page
|
|
104
|
+
- Portfolio
|
|
105
|
+
- Business website
|
|
106
|
+
- Documentation-style website
|
|
107
|
+
|
|
108
|
+
Website options include:
|
|
109
|
+
|
|
110
|
+
- One-page landing page
|
|
111
|
+
- Multi-page website
|
|
112
|
+
- Selected sections
|
|
113
|
+
- Selected pages
|
|
114
|
+
- SEO starter files
|
|
115
|
+
- Contact form placeholder
|
|
116
|
+
- GitHub Actions CI
|
|
117
|
+
- Optional Docker files
|
|
118
|
+
|
|
119
|
+
Example generated structure:
|
|
120
|
+
|
|
121
|
+
```txt
|
|
122
|
+
src/
|
|
123
|
+
├── app/
|
|
124
|
+
│ ├── page.tsx
|
|
125
|
+
│ ├── about/page.tsx
|
|
126
|
+
│ ├── services/page.tsx
|
|
127
|
+
│ ├── contact/page.tsx
|
|
128
|
+
│ ├── layout.tsx
|
|
129
|
+
│ ├── robots.ts
|
|
130
|
+
│ └── sitemap.ts
|
|
131
|
+
├── components/
|
|
132
|
+
│ ├── forms/
|
|
133
|
+
│ │ └── ContactForm.tsx
|
|
134
|
+
│ ├── layout/
|
|
135
|
+
│ │ ├── Navbar.tsx
|
|
136
|
+
│ │ └── Footer.tsx
|
|
137
|
+
│ └── sections/
|
|
138
|
+
├── lib/
|
|
139
|
+
│ └── site-config.ts
|
|
140
|
+
└── types/
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Blueprint: Full-stack Product
|
|
144
|
+
|
|
145
|
+
Use this for production-style apps with backend logic.
|
|
146
|
+
|
|
147
|
+
Examples:
|
|
148
|
+
|
|
149
|
+
- SaaS starter
|
|
150
|
+
- Dashboard app
|
|
151
|
+
- Admin-style app
|
|
152
|
+
- Custom full-stack product
|
|
153
|
+
|
|
154
|
+
Full-stack options include:
|
|
155
|
+
|
|
156
|
+
- SaaS starter
|
|
157
|
+
- Dashboard with database
|
|
158
|
+
- Custom full-stack app
|
|
159
|
+
- Prisma + PostgreSQL
|
|
160
|
+
- Redis
|
|
161
|
+
- Docker files
|
|
162
|
+
- GitHub Actions CI
|
|
163
|
+
- Environment example file
|
|
164
|
+
|
|
165
|
+
Example generated structure:
|
|
166
|
+
|
|
167
|
+
```txt
|
|
168
|
+
src/
|
|
169
|
+
├── app/
|
|
170
|
+
│ ├── page.tsx
|
|
171
|
+
│ ├── dashboard/
|
|
172
|
+
│ │ └── page.tsx
|
|
173
|
+
│ ├── api/
|
|
174
|
+
│ │ └── health/
|
|
175
|
+
│ │ └── route.ts
|
|
176
|
+
│ └── layout.tsx
|
|
177
|
+
├── components/
|
|
178
|
+
│ └── dashboard/
|
|
179
|
+
├── lib/
|
|
180
|
+
│ ├── db.ts
|
|
181
|
+
│ ├── env.ts
|
|
182
|
+
│ ├── redis.ts
|
|
183
|
+
│ └── utils.ts
|
|
184
|
+
├── server/
|
|
185
|
+
│ ├── actions/
|
|
186
|
+
│ └── services/
|
|
187
|
+
└── types/
|
|
188
|
+
|
|
189
|
+
prisma/
|
|
190
|
+
└── schema.prisma
|
|
191
|
+
|
|
192
|
+
.env.example
|
|
193
|
+
Dockerfile
|
|
194
|
+
docker-compose.yml
|
|
195
|
+
.github/workflows/ci.yml
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Blueprint: AI App
|
|
199
|
+
|
|
200
|
+
Use this for AI-first applications.
|
|
201
|
+
|
|
202
|
+
Examples:
|
|
203
|
+
|
|
204
|
+
- Chat app
|
|
205
|
+
- AI assistant
|
|
206
|
+
- Content generator
|
|
207
|
+
|
|
208
|
+
AI options include:
|
|
209
|
+
|
|
210
|
+
- Chat app
|
|
211
|
+
- AI assistant
|
|
212
|
+
- Content generator
|
|
213
|
+
- AI API route placeholder
|
|
214
|
+
- Chat UI components
|
|
215
|
+
- AI config helper
|
|
216
|
+
- Optional database support
|
|
217
|
+
- Optional Redis support
|
|
218
|
+
- GitHub Actions CI
|
|
219
|
+
|
|
220
|
+
Example generated structure:
|
|
221
|
+
|
|
222
|
+
```txt
|
|
223
|
+
src/
|
|
224
|
+
├── app/
|
|
225
|
+
│ ├── page.tsx
|
|
226
|
+
│ ├── api/
|
|
227
|
+
│ │ └── chat/
|
|
228
|
+
│ │ └── route.ts
|
|
229
|
+
│ └── layout.tsx
|
|
230
|
+
├── components/
|
|
231
|
+
│ └── chat/
|
|
232
|
+
│ ├── Chat.tsx
|
|
233
|
+
│ ├── ChatInput.tsx
|
|
234
|
+
│ └── MessageList.tsx
|
|
235
|
+
├── lib/
|
|
236
|
+
│ └── ai.ts
|
|
237
|
+
└── types/
|
|
238
|
+
└── ai.ts
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Feature modules
|
|
242
|
+
|
|
243
|
+
The scaffolder can apply optional modules based on the selected blueprint.
|
|
244
|
+
|
|
245
|
+
### Prisma + PostgreSQL
|
|
246
|
+
|
|
247
|
+
Adds:
|
|
248
|
+
|
|
249
|
+
```txt
|
|
250
|
+
prisma/schema.prisma
|
|
251
|
+
src/lib/db.ts
|
|
252
|
+
.env.example
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Also updates `package.json` with Prisma dependencies and scripts:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
npm run db
|
|
259
|
+
npm run db:push
|
|
260
|
+
npm run db:generate
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Redis
|
|
264
|
+
|
|
265
|
+
Adds:
|
|
266
|
+
|
|
267
|
+
```txt
|
|
268
|
+
src/lib/redis.ts
|
|
269
|
+
REDIS_URL in .env.example
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Docker
|
|
273
|
+
|
|
274
|
+
Adds:
|
|
275
|
+
|
|
276
|
+
```txt
|
|
277
|
+
Dockerfile
|
|
278
|
+
docker-compose.yml
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
For projects using PostgreSQL or Redis, Docker Compose includes matching services.
|
|
282
|
+
|
|
283
|
+
### GitHub Actions
|
|
284
|
+
|
|
285
|
+
Adds:
|
|
286
|
+
|
|
287
|
+
```txt
|
|
288
|
+
.github/workflows/ci.yml
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The generated workflow runs install, lint, typecheck, and build steps.
|
|
292
|
+
|
|
293
|
+
## Generated project next steps
|
|
294
|
+
|
|
295
|
+
After generating a project:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
cd your-project-name
|
|
299
|
+
npm install
|
|
300
|
+
npm run dev
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
If `.env.example` is generated:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
cp .env.example .env
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
On Windows PowerShell:
|
|
310
|
+
|
|
311
|
+
```powershell
|
|
312
|
+
Copy-Item .env.example .env
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
If Prisma is enabled:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
npm run db:push
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Local development
|
|
322
|
+
|
|
323
|
+
Install dependencies:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
npm install
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Run the CLI in development mode:
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
npm run dev
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Build:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
npm run build
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Run the built CLI:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
node dist/index.js create
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Manual verification
|
|
348
|
+
|
|
349
|
+
Generated projects have been manually verified for:
|
|
350
|
+
|
|
351
|
+
- Website blueprint
|
|
352
|
+
- Full-stack Product blueprint
|
|
353
|
+
- AI App blueprint
|
|
354
|
+
|
|
355
|
+
See:
|
|
356
|
+
|
|
357
|
+
```txt
|
|
358
|
+
docs/generated-project-verification.md
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Current limitations
|
|
362
|
+
|
|
363
|
+
This version focuses on the first stable intent-based scaffolder flow.
|
|
364
|
+
|
|
365
|
+
Not included yet:
|
|
366
|
+
|
|
367
|
+
- Authentication implementation
|
|
368
|
+
- Payment integration
|
|
369
|
+
- Full UI component library
|
|
370
|
+
- Deployment automation
|
|
371
|
+
- Backend API blueprint
|
|
372
|
+
- TypeScript package / CLI blueprint
|
|
373
|
+
- Plugin system
|
|
374
|
+
- Dry-run mode
|
|
375
|
+
|
|
376
|
+
These can be added in future versions.
|
|
377
|
+
|
|
378
|
+
## License
|
|
379
|
+
|
|
380
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsD5D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { applyPlan } from '../generators/applyPlan.js';
|
|
2
|
+
import { createNextBase } from '../generators/createNextBase.js';
|
|
3
|
+
import { askCreatePlan } from '../prompts/askCreatePlan.js';
|
|
4
|
+
import { pathExists } from '../utils/pathExists.js';
|
|
5
|
+
import { runCommand } from '../utils/runCommand.js';
|
|
6
|
+
export function registerCreateCommand(program) {
|
|
7
|
+
program
|
|
8
|
+
.command('create')
|
|
9
|
+
.description('Create an intent-based project scaffold')
|
|
10
|
+
.action(async () => {
|
|
11
|
+
console.log('\n🚀 Let’s create a new project.\n');
|
|
12
|
+
try {
|
|
13
|
+
const plan = await askCreatePlan();
|
|
14
|
+
if (await pathExists(plan.targetPath)) {
|
|
15
|
+
console.error(`\n❌ A folder named "${plan.projectName}" already exists. Please choose a different name.`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
console.log('\n📦 Creating Next.js base project...\n');
|
|
19
|
+
await createNextBase(plan);
|
|
20
|
+
console.log('\n🧱 Applying project blueprint...\n');
|
|
21
|
+
await applyPlan(plan);
|
|
22
|
+
if (plan.installDependencies) {
|
|
23
|
+
console.log('\n📥 Installing dependencies...\n');
|
|
24
|
+
await runCommand('npm', ['install'], plan.targetPath);
|
|
25
|
+
}
|
|
26
|
+
console.log('\n✅ Project successfully created!\n');
|
|
27
|
+
console.log('Next steps:');
|
|
28
|
+
console.log(` cd ${plan.projectName}`);
|
|
29
|
+
if (!plan.installDependencies) {
|
|
30
|
+
console.log(' npm install');
|
|
31
|
+
}
|
|
32
|
+
if (plan.modules.includes('env-example')) {
|
|
33
|
+
console.log(' cp .env.example .env');
|
|
34
|
+
console.log(' # Windows PowerShell: Copy-Item .env.example .env');
|
|
35
|
+
}
|
|
36
|
+
if (plan.modules.includes('prisma')) {
|
|
37
|
+
console.log(' npm run db:push');
|
|
38
|
+
}
|
|
39
|
+
console.log(' npm run dev\n');
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error('\n❌ Failed to create project.');
|
|
43
|
+
console.error(error);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,yCAAyC,CAAC;SACtD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAElD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,aAAa,EAAE,CAAC;YAEnC,IAAI,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACtC,OAAO,CAAC,KAAK,CACX,uBAAuB,IAAI,CAAC,WAAW,mDAAmD,CAC3F,CAAC;gBAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;YACvD,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;YAE3B,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;YACpD,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;YAEtB,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;gBAEjD,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YACxD,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YAExC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC9B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YAC/B,CAAC;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;YACrE,CAAC;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACnC,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YAC/C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greet.d.ts","sourceRoot":"","sources":["../../src/commands/greet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAU3D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function registerGreetCommand(program) {
|
|
2
|
+
program
|
|
3
|
+
.command('greet')
|
|
4
|
+
.description('Greets the user by name')
|
|
5
|
+
.argument('<name>', 'The name of the person to greet')
|
|
6
|
+
.action((name) => {
|
|
7
|
+
console.log(`🚀 Hello, ${name}! Your TypeScript CLI is officially alive.`);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=greet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greet.js","sourceRoot":"","sources":["../../src/commands/greet.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,yBAAyB,CAAC;SACtC,QAAQ,CAAC,QAAQ,EAAE,iCAAiC,CAAC;SACrD,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE;QACvB,OAAO,CAAC,GAAG,CACT,aAAa,IAAI,4CAA4C,CAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyAiPlan.d.ts","sourceRoot":"","sources":["../../src/generators/applyAiPlan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjE"}
|