caspian-utils 0.0.8 → 0.0.10

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/dist/docs/commands.md +557 -54
  2. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  title: Commands
3
- description: Use the Caspian CLI reference to scaffold projects, generate code, and update framework files without confusing first-time setup with existing-project maintenance.
3
+ description: Use the current Caspian CLI reference to choose the right scaffold, starter-kit, update, and Prisma regeneration workflow for the current workspace.
4
4
  related:
5
5
  title: Related docs
6
- description: Start with installation for new apps, then use the routing and structure guides to place generated files correctly.
6
+ description: Start with installation for new apps, then use database and structure docs when commands affect schema, generated ORM files, or project layout.
7
7
  links:
8
8
  - /docs/installation
9
9
  - /docs/database
@@ -12,55 +12,61 @@ related:
12
12
  - /docs/index
13
13
  ---
14
14
 
15
- This page summarizes the main Caspian CLI workflows for creating projects, generating code, and updating an existing app.
15
+ This page documents the current Caspian command families used with this workspace and the surrounding docs toolchain.
16
16
 
17
17
  ## Overview
18
18
 
19
- The current workspace includes a local `prisma` binary, but it does not include local `create-caspian-app`, `casp`, or `ppy` binaries under `node_modules/.bin`. Treat the scaffold and project-update commands below as external `npx` workflows rather than project-local executables.
19
+ The current workspace includes a local `prisma` binary, but it does not include local `create-caspian-app`, `casp`, or `ppy` binaries under `node_modules/.bin`. Treat project creation, project update, and Python ORM generation as external `npx` workflows rather than project-local executables.
20
20
 
21
- Use Caspian CLI commands for three main tasks:
21
+ Examples below use `npx create-caspian-app` for readability. If you want to force the latest published scaffold package explicitly, you can use `npx create-caspian-app@latest` instead.
22
22
 
23
- - Create a new application.
24
- - Regenerate Node and Python ORM code from your Prisma schema.
25
- - Update framework-managed project files.
23
+ This updated reference includes the newer updater behavior and the current scaffold behavior:
26
24
 
27
- Before running update commands, review `caspian.config.json` because it controls overwrite behavior.
25
+ - positional version or tag values such as `beta` or `1.2.3`
26
+ - named options such as `--tag beta`, `--tag=beta`, `--version 1.2.3`, and `--version=1.2.3`
27
+ - conflict detection when more than one version source is provided
28
+ - PowerShell-safe tagging syntax with `--tag beta`
29
+ - Windows-safe execution that resolves `npx.cmd` on Win32
30
+ - scaffold behavior that reuses an existing `.venv` instead of recreating it every time
28
31
 
29
- ## Project Creation
32
+ Before running update commands, read `caspian.config.json` because it controls feature flags and `excludeFiles` overwrite protection. In the current workspace that config shows `backendOnly: false`, `tailwindcss: true`, `mcp: false`, `prisma: true`, `typescript: false`, and `componentScanDirs: ["src"]`.
30
33
 
31
- Use the interactive scaffold when starting a new Caspian app:
34
+ ## 1. Main Command Families
35
+
36
+ ### Create a new project
32
37
 
33
38
  ```bash
34
- npx create-caspian-app@latest
39
+ npx create-caspian-app my-app
35
40
  ```
36
41
 
37
- You can also create a project with starter-kit flags:
42
+ Use when you want to scaffold a new Caspian project from scratch.
43
+
44
+ ### Create a project from a starter kit
38
45
 
39
46
  ```bash
40
47
  npx create-caspian-app my-app --starter-kit=fullstack
48
+ npx create-caspian-app my-app --starter-kit=custom --starter-kit-source=https://github.com/user/repo
41
49
  ```
42
50
 
43
- For a custom source setup, the CLI also supports a custom starter flow:
51
+ Use when you want a preset structure instead of the blank default scaffold.
52
+
53
+ ### List available starter kits
44
54
 
45
55
  ```bash
46
- npx create-caspian-app my-tool --starter-kit=custom ...
56
+ npx create-caspian-app --list-starter-kits
47
57
  ```
48
58
 
49
- After scaffolding, use `routing.md` to understand how Caspian maps `src/app` folders to URLs.
50
-
51
- ## Installation Flags
59
+ Use when you want to inspect the built-in starter kits before choosing one.
52
60
 
53
- Common scaffold flags include:
61
+ ### Update an existing project
54
62
 
55
- - `--backend-only` for API-only projects without frontend assets
56
- - `--tailwindcss` to install Tailwind CSS support
57
- - `--typescript` to add TypeScript support and any scaffold-specific TypeScript build/config files
58
- - `--mcp` to initialize a Model Context Protocol server for AI agents
59
- - `--prisma` to initialize Prisma ORM support
63
+ ```bash
64
+ npx casp update project
65
+ ```
60
66
 
61
- ## Code Generation
67
+ Use when you are inside an existing Caspian project and want to refresh framework-managed files using the project's `caspian.config.json`.
62
68
 
63
- When `prisma/schema.prisma` changes in this workspace, use this command flow:
69
+ ### Regenerate ORM after schema changes
64
70
 
65
71
  ```bash
66
72
  npx prisma migrate dev
@@ -72,59 +78,556 @@ npx prisma db seed
72
78
  npx ppy generate
73
79
  ```
74
80
 
75
- Use `npx prisma migrate dev` first so the development database and migration history stay aligned. If the updated schema affects seed data, run `npx prisma generate` before `npx prisma db seed` so Node-side tooling such as `prisma/seed.ts` uses the current generated client.
81
+ Use when `prisma/schema.prisma` changes and you need migrations, seed flow, and the generated Python ORM layer to stay aligned.
82
+
83
+ ## 2. Supported Flags And Options
84
+
85
+ ### For `create-caspian-app`
86
+
87
+ | Flag | Meaning | When to use |
88
+ | --- | --- | --- |
89
+ | `-y` | Non-interactive mode | Use in scripts, CI, or when you want to skip prompts. |
90
+ | `--backend-only` | Backend-only project | Use for APIs or services without frontend assets. |
91
+ | `--tailwindcss` | Enable Tailwind CSS | Use for frontend or full-stack UI styling. |
92
+ | `--typescript` | Enable TypeScript frontend tooling | Use when you want the scaffold's TypeScript frontend path. |
93
+ | `--mcp` | Enable MCP support | Use when the project needs Model Context Protocol support. |
94
+ | `--prisma` | Enable Prisma-related setup | Use when the project needs ORM and database tooling. |
95
+ | `--starter-kit=<kit>` | Select a starter kit | Use when you want a built-in preset or named kit. |
96
+ | `--starter-kit-source=<url>` | External starter kit source | Use when the starter kit lives in a Git repository. |
97
+ | `--list-starter-kits` | List built-in starter kits | Use when you want to inspect the starter catalog before scaffold. |
98
+
99
+ ### For `npx casp update project`
100
+
101
+ | Option | Meaning | When to use |
102
+ | --- | --- | --- |
103
+ | `-y` | Non-interactive mode | Use for automated updates without prompts. |
104
+ | positional tag | Example: `beta` | Use for a quick tag or channel update. |
105
+ | positional version | Example: `1.2.3` | Use for exact version pinning. |
106
+ | `--tag <value>` | Named tag option | Use especially in PowerShell or other shells where explicit spacing is safer. |
107
+ | `--tag=<value>` | Inline named tag option | Same as above in inline syntax. |
108
+ | `--version <value>` | Named version option | Use for explicit version selection. |
109
+ | `--version=<value>` | Inline named version option | Same as above in inline syntax. |
110
+
111
+ The updater throws an error if conflicting version sources are provided.
112
+
113
+ ## 3. Create Command Combinations
114
+
115
+ ### 3.1 Base create command
116
+
117
+ #### Interactive create
118
+
119
+ ```bash
120
+ npx create-caspian-app my-app
121
+ ```
122
+
123
+ Use when you want the standard guided setup.
124
+
125
+ #### Non-interactive create
126
+
127
+ ```bash
128
+ npx create-caspian-app my-app -y
129
+ ```
130
+
131
+ Use when you want a quick scaffold without prompts.
132
+
133
+ In skip-prompt mode, the default feature values are:
134
+
135
+ - `backendOnly: false`
136
+ - `tailwindcss: false`
137
+ - `typescript: false`
138
+ - `mcp: false`
139
+ - `prisma: false`
140
+
141
+ ### 3.2 Backend-only combinations
142
+
143
+ In backend-only mode, the main meaningful toggles are `--mcp` and `--prisma`. Frontend-oriented flags may still appear in raw CLI args, but they are not part of the normal backend-only feature flow.
144
+
145
+ #### Minimal backend-only
146
+
147
+ ```bash
148
+ npx create-caspian-app my-app --backend-only
149
+ npx create-caspian-app my-app --backend-only -y
150
+ ```
151
+
152
+ Use when you want a simple backend project without frontend assets.
153
+
154
+ #### Backend-only plus MCP
155
+
156
+ ```bash
157
+ npx create-caspian-app my-app --backend-only --mcp
158
+ npx create-caspian-app my-app --backend-only --mcp -y
159
+ ```
160
+
161
+ Use when you want a backend service with MCP enabled.
162
+
163
+ #### Backend-only plus Prisma
164
+
165
+ ```bash
166
+ npx create-caspian-app my-app --backend-only --prisma
167
+ npx create-caspian-app my-app --backend-only --prisma -y
168
+ ```
169
+
170
+ Use when you want a backend or API project with database tooling.
171
+
172
+ #### Backend-only plus MCP plus Prisma
173
+
174
+ ```bash
175
+ npx create-caspian-app my-app --backend-only --mcp --prisma
176
+ npx create-caspian-app my-app --backend-only --mcp --prisma -y
177
+ ```
178
+
179
+ Use when you want the fullest backend-only setup.
180
+
181
+ #### Accepted but usually not useful for backend-only mode
182
+
183
+ ```bash
184
+ npx create-caspian-app my-app --backend-only --tailwindcss
185
+ npx create-caspian-app my-app --backend-only --typescript
186
+ npx create-caspian-app my-app --backend-only --tailwindcss --typescript
187
+ ```
188
+
189
+ These flags can be present in raw CLI args, but backend-only mode removes frontend assets and disables the normal TypeScript and frontend path, so they are not practical combinations.
190
+
191
+ ### 3.3 Full-stack combinations
192
+
193
+ These apply when `--backend-only` is not used.
194
+
195
+ #### Minimal full-stack
196
+
197
+ ```bash
198
+ npx create-caspian-app my-app
199
+ npx create-caspian-app my-app -y
200
+ ```
201
+
202
+ Use when you want the default scaffold and will add features later.
203
+
204
+ #### Full-stack plus Tailwind CSS
205
+
206
+ ```bash
207
+ npx create-caspian-app my-app --tailwindcss
208
+ npx create-caspian-app my-app --tailwindcss -y
209
+ ```
210
+
211
+ Use when you want Tailwind-based UI styling.
212
+
213
+ #### Full-stack plus TypeScript
214
+
215
+ ```bash
216
+ npx create-caspian-app my-app --typescript
217
+ npx create-caspian-app my-app --typescript -y
218
+ ```
219
+
220
+ Use when you want the scaffold's TypeScript frontend tooling.
221
+
222
+ #### Full-stack plus MCP
223
+
224
+ ```bash
225
+ npx create-caspian-app my-app --mcp
226
+ npx create-caspian-app my-app --mcp -y
227
+ ```
228
+
229
+ Use when you want MCP support in a full-stack app.
230
+
231
+ #### Full-stack plus Prisma
232
+
233
+ ```bash
234
+ npx create-caspian-app my-app --prisma
235
+ npx create-caspian-app my-app --prisma -y
236
+ ```
237
+
238
+ Use when you want ORM and database support.
239
+
240
+ #### Full-stack plus Tailwind plus TypeScript
241
+
242
+ ```bash
243
+ npx create-caspian-app my-app --tailwindcss --typescript
244
+ npx create-caspian-app my-app --tailwindcss --typescript -y
245
+ ```
246
+
247
+ Use when you want the typical richer frontend setup.
248
+
249
+ #### Full-stack plus Tailwind plus MCP
250
+
251
+ ```bash
252
+ npx create-caspian-app my-app --tailwindcss --mcp
253
+ npx create-caspian-app my-app --tailwindcss --mcp -y
254
+ ```
255
+
256
+ Use when you want styled UI plus MCP.
257
+
258
+ #### Full-stack plus Tailwind plus Prisma
259
+
260
+ ```bash
261
+ npx create-caspian-app my-app --tailwindcss --prisma
262
+ npx create-caspian-app my-app --tailwindcss --prisma -y
263
+ ```
264
+
265
+ Use when you want styled UI plus database tooling.
266
+
267
+ #### Full-stack plus TypeScript plus MCP
268
+
269
+ ```bash
270
+ npx create-caspian-app my-app --typescript --mcp
271
+ npx create-caspian-app my-app --typescript --mcp -y
272
+ ```
273
+
274
+ Use when you want TypeScript assets plus MCP.
275
+
276
+ #### Full-stack plus TypeScript plus Prisma
277
+
278
+ ```bash
279
+ npx create-caspian-app my-app --typescript --prisma
280
+ npx create-caspian-app my-app --typescript --prisma -y
281
+ ```
282
+
283
+ Use when you want TypeScript assets plus database tooling.
284
+
285
+ #### Full-stack plus MCP plus Prisma
286
+
287
+ ```bash
288
+ npx create-caspian-app my-app --mcp --prisma
289
+ npx create-caspian-app my-app --mcp --prisma -y
290
+ ```
291
+
292
+ Use when you want both integration layers without forcing frontend preferences.
293
+
294
+ #### Full-stack plus Tailwind plus TypeScript plus MCP
295
+
296
+ ```bash
297
+ npx create-caspian-app my-app --tailwindcss --typescript --mcp
298
+ npx create-caspian-app my-app --tailwindcss --typescript --mcp -y
299
+ ```
300
+
301
+ Use when you want a rich frontend plus MCP.
302
+
303
+ #### Full-stack plus Tailwind plus TypeScript plus Prisma
304
+
305
+ ```bash
306
+ npx create-caspian-app my-app --tailwindcss --typescript --prisma
307
+ npx create-caspian-app my-app --tailwindcss --typescript --prisma -y
308
+ ```
309
+
310
+ Use when you want a rich frontend plus database tooling.
311
+
312
+ #### Full-stack plus Tailwind plus MCP plus Prisma
313
+
314
+ ```bash
315
+ npx create-caspian-app my-app --tailwindcss --mcp --prisma
316
+ npx create-caspian-app my-app --tailwindcss --mcp --prisma -y
317
+ ```
318
+
319
+ Use when you want styled UI and both integrations.
320
+
321
+ #### Full-stack plus TypeScript plus MCP plus Prisma
322
+
323
+ ```bash
324
+ npx create-caspian-app my-app --typescript --mcp --prisma
325
+ npx create-caspian-app my-app --typescript --mcp --prisma -y
326
+ ```
327
+
328
+ Use when you want TypeScript assets plus both integrations.
329
+
330
+ #### Full-stack plus Tailwind plus TypeScript plus MCP plus Prisma
331
+
332
+ ```bash
333
+ npx create-caspian-app my-app --tailwindcss --typescript --mcp --prisma
334
+ npx create-caspian-app my-app --tailwindcss --typescript --mcp --prisma -y
335
+ ```
336
+
337
+ Use when you want the most complete default full-stack configuration.
338
+
339
+ ## 4. Starter Kit Command Combinations
340
+
341
+ ### Built-in starter kits
342
+
343
+ #### Basic starter kit
344
+
345
+ ```bash
346
+ npx create-caspian-app my-app --starter-kit=basic
347
+ npx create-caspian-app my-app --starter-kit=basic -y
348
+ ```
349
+
350
+ Use when you want the minimal backend preset.
351
+
352
+ Preset features:
353
+
354
+ - `backendOnly = true`
355
+ - `tailwindcss = false`
356
+ - `prisma = false`
357
+ - `mcp = false`
358
+
359
+ #### Fullstack starter kit
360
+
361
+ ```bash
362
+ npx create-caspian-app my-app --starter-kit=fullstack
363
+ npx create-caspian-app my-app --starter-kit=fullstack -y
364
+ ```
365
+
366
+ Use when you want the built-in full-stack preset.
367
+
368
+ Preset features:
369
+
370
+ - `backendOnly = false`
371
+ - `tailwindcss = true`
372
+ - `prisma = true`
373
+ - `mcp = false`
374
+
375
+ #### API starter kit
376
+
377
+ ```bash
378
+ npx create-caspian-app my-app --starter-kit=api
379
+ npx create-caspian-app my-app --starter-kit=api -y
380
+ ```
381
+
382
+ Use when you want a backend API preset with ORM and database support.
383
+
384
+ Preset features:
385
+
386
+ - `backendOnly = true`
387
+ - `tailwindcss = false`
388
+ - `prisma = true`
389
+ - `mcp = false`
390
+
391
+ #### Realtime starter kit
392
+
393
+ ```bash
394
+ npx create-caspian-app my-app --starter-kit=realtime
395
+ npx create-caspian-app my-app --starter-kit=realtime -y
396
+ ```
397
+
398
+ Use when you want the built-in realtime preset.
399
+
400
+ Preset features:
401
+
402
+ - `backendOnly = false`
403
+ - `tailwindcss = true`
404
+ - `prisma = true`
405
+ - `mcp = true`
406
+
407
+ ### Starter kit with feature overrides
408
+
409
+ Starter kit defaults can still be overridden by explicit feature flags because the CLI reapplies raw args after loading starter kit defaults.
410
+
411
+ Examples:
412
+
413
+ ```bash
414
+ npx create-caspian-app my-app --starter-kit=basic --prisma
415
+ npx create-caspian-app my-app --starter-kit=fullstack --typescript
416
+ npx create-caspian-app my-app --starter-kit=api --mcp
417
+ npx create-caspian-app my-app --starter-kit=realtime --backend-only
418
+ ```
419
+
420
+ Use when a starter kit is close to what you want but still needs a few forced overrides.
421
+
422
+ ### Custom starter kit source
423
+
424
+ ```bash
425
+ npx create-caspian-app my-app --starter-kit=custom --starter-kit-source=https://github.com/user/repo
426
+ npx create-caspian-app my-app --starter-kit=custom --starter-kit-source=https://github.com/user/repo -y
427
+ ```
428
+
429
+ You can combine feature overrides too:
76
430
 
77
- Always finish with `npx ppy generate`. That is the required way to refresh the Python ORM classes used by the app after a schema change.
431
+ ```bash
432
+ npx create-caspian-app my-app --starter-kit=custom --starter-kit-source=https://github.com/user/repo --typescript --prisma
433
+ ```
78
434
 
79
- This workspace already includes an app-owned Python database layer in `src/lib/prisma/`, so reuse that package for Python-side database access instead of creating a second helper. Do not hand-edit generated ORM classes.
435
+ Use when the scaffold should come from an external Git repository. The CLI clones the repository, removes `.git`, and updates project config for the new project.
80
436
 
81
- See `database.md` for the full Prisma workflow, including `.env`, `prisma.config.ts`, migrations, and async usage patterns.
437
+ ## 5. Update Command Combinations
82
438
 
83
- ## Update Project
439
+ The updater recognizes only the `update project` command family. Anything outside that family is rejected by the wrapper.
84
440
 
85
- Use the project update command for existing Caspian apps:
441
+ ### Update to latest
86
442
 
87
443
  ```bash
88
444
  npx casp update project
89
445
  ```
90
446
 
91
- This command updates framework-managed project files and can overwrite entry points, styles, or configuration files if they are not protected. The `casp` binary is not bundled locally in this workspace, so verify the external CLI package before automating this command.
447
+ Use when you want the newest release and do not need a pinned tag or version.
448
+
449
+ ### Update to a specific tag using positional syntax
450
+
451
+ ```bash
452
+ npx casp update project beta
453
+ ```
454
+
455
+ Use when you want a named release channel such as `beta`.
456
+
457
+ ### Update to a specific version using positional syntax
458
+
459
+ ```bash
460
+ npx casp update project 1.2.3
461
+ ```
462
+
463
+ Use when you want an exact version.
464
+
465
+ ### Update using named tag option
466
+
467
+ ```bash
468
+ npx casp update project --tag beta
469
+ npx casp update project --tag=beta
470
+ ```
471
+
472
+ Use when you want clearer syntax or PowerShell-safe argument parsing.
473
+
474
+ ### Update using named version option
475
+
476
+ ```bash
477
+ npx casp update project --version 1.2.3
478
+ npx casp update project --version=1.2.3
479
+ ```
480
+
481
+ Use when you want explicit version selection with named syntax.
482
+
483
+ ### Non-interactive latest update
484
+
485
+ ```bash
486
+ npx casp update project -y
487
+ ```
488
+
489
+ Use for scripted or CI updates to latest.
490
+
491
+ ### Non-interactive tagged update
492
+
493
+ ```bash
494
+ npx casp update project beta -y
495
+ npx casp update project --tag beta -y
496
+ npx casp update project --tag=beta -y
497
+ ```
498
+
499
+ Use for scripted or shell-safe tag-based upgrades.
500
+
501
+ ### Non-interactive versioned update
502
+
503
+ ```bash
504
+ npx casp update project 1.2.3 -y
505
+ npx casp update project --version 1.2.3 -y
506
+ npx casp update project --version=1.2.3 -y
507
+ ```
508
+
509
+ Use for automated pinned upgrades.
510
+
511
+ ## 6. Invalid Or Conflicting Update Cases
512
+
513
+ These cases matter because the newer updater parsing is stricter.
514
+
515
+ ### Missing value
516
+
517
+ ```bash
518
+ npx casp update project --tag
519
+ npx casp update project --version
520
+ ```
521
+
522
+ Result: parsing error because the option is missing its value.
523
+
524
+ ### Too many positional arguments
525
+
526
+ ```bash
527
+ npx casp update project beta extra
528
+ ```
529
+
530
+ Result: parsing error because `update project` accepts at most one extra positional version or tag value.
531
+
532
+ ### Conflicting version sources
533
+
534
+ ```bash
535
+ npx casp update project beta --tag latest
536
+ npx casp update project 1.2.3 --version 2.0.0
537
+ ```
538
+
539
+ Result: parsing error because more than one version source was provided.
540
+
541
+ ## 7. Prisma And Python ORM Regeneration
542
+
543
+ The create and update commands above are not the whole maintenance story for this workspace. When `prisma/schema.prisma` changes, follow the ORM flow below so the TypeScript Prisma client, database state, and Python ORM layer stay aligned.
544
+
545
+ ### Required order after schema changes
546
+
547
+ ```bash
548
+ npx prisma migrate dev
549
+
550
+ # Only when seed flow or prisma/seed.ts depends on the new schema:
551
+ npx prisma generate
552
+ npx prisma db seed
553
+
554
+ npx ppy generate
555
+ ```
556
+
557
+ Use this order:
558
+
559
+ 1. Run `npx prisma migrate dev` first so migrations and the development database stay aligned.
560
+ 2. If `prisma/seed.ts` or seed data depends on the new schema, run `npx prisma generate` and then `npx prisma db seed`.
561
+ 3. Run `npx ppy generate` last so the generated Python ORM layer matches the updated Prisma schema.
562
+
563
+ Do not manually create or edit these generated files:
92
564
 
93
- ## Configuration
565
+ - `src/lib/prisma/__init__.py`
566
+ - `src/lib/prisma/db.py`
567
+ - `src/lib/prisma/models.py`
568
+ - `settings/prisma-schema.json`
569
+
570
+ `npx ppy generate` owns those files. Treat `src/lib/prisma/` as the app's generated Python database layer, not as a manual editing surface.
571
+
572
+ See [database.md](./database.md) for the full schema, migration, seed, and async usage guide.
573
+
574
+ ## 8. Practical Recommendation Matrix
575
+
576
+ | Goal | Recommended command |
577
+ | --- | --- |
578
+ | Minimal backend service | `npx create-caspian-app my-app --backend-only -y` |
579
+ | Backend API with database support | `npx create-caspian-app my-app --backend-only --prisma -y` |
580
+ | Full-stack app with styled UI and database support | `npx create-caspian-app my-app --tailwindcss --prisma -y` |
581
+ | Full-stack app with richer frontend tooling and Prisma | `npx create-caspian-app my-app --tailwindcss --typescript --prisma -y` |
582
+ | Full-stack app with everything enabled | `npx create-caspian-app my-app --tailwindcss --typescript --mcp --prisma -y` |
583
+ | Realtime preset | `npx create-caspian-app my-app --starter-kit=realtime -y` |
584
+ | Update current project to latest | `npx casp update project` |
585
+ | Update current project to beta safely in PowerShell | `npx casp update project --tag beta` |
586
+ | Update current project to an exact version | `npx casp update project --version 1.2.3 -y` |
587
+ | Regenerate Python ORM after schema changes | `npx prisma migrate dev` then optional seed commands, then `npx ppy generate` |
588
+
589
+ ## 9. Configuration Notes
94
590
 
95
591
  The CLI reads `caspian.config.json` to decide how it should interact with the project.
96
592
 
97
593
  Important configuration areas include:
98
594
 
99
- - Project identity and root path
100
- - Feature toggles such as backend-only, Tailwind, MCP, Prisma, and TypeScript
101
- - Component scan directories
102
- - `excludeFiles` rules for protecting local changes during updates
103
-
104
- ## `excludeFiles` Strategy
595
+ - project identity and root path
596
+ - feature toggles such as backend-only, Tailwind, MCP, Prisma, and TypeScript
597
+ - component scan directories
598
+ - `excludeFiles`, which protects customized files from overwrite during updates
105
599
 
106
600
  Use `excludeFiles` in `caspian.config.json` to prevent the update command from overwriting files you have customized.
107
601
 
108
602
  This is useful for protecting:
109
603
 
110
- - Stylesheets
111
- - Configuration files
112
- - Entry-point files
113
- - Other locally modified framework-managed files
604
+ - stylesheets
605
+ - configuration files
606
+ - entry-point files
607
+ - other locally modified framework-managed files
608
+
609
+ If you exclude a file, the updater preserves it, but you are responsible for merging future framework changes into that file manually.
610
+
611
+ ## 10. Operational Notes
114
612
 
115
- If you exclude a file, it will be preserved during updates, but you may need to merge future framework changes into that file manually.
613
+ 1. On Windows, the updater resolves `npx.cmd` instead of plain `npx`, which makes execution more reliable on Win32.
614
+ 2. The updater still requires `caspian.config.json` in the current directory before running an update.
615
+ 3. The creator reuses an existing `.venv` if one is already present instead of recreating it every time.
616
+ 4. Starter kits still support later overrides via explicit CLI flags.
617
+ 5. Frontend-oriented flags are only fully meaningful when `backendOnly` is false.
116
618
 
117
619
  ## AI Routing Notes
118
620
 
119
621
  If an AI agent is deciding which command flow to use, apply these rules first.
120
622
 
121
- - Use `npx create-caspian-app@latest` when the user is creating a new project.
122
- - Use `npx casp update project` only for an existing Caspian project.
623
+ - Use `npx create-caspian-app ...` only when the user is creating a new Caspian project.
624
+ - Use `npx casp update project ...` only when the user is already inside an existing Caspian project.
625
+ - Add `-y` when the user wants automation, CI, or a no-prompt flow.
626
+ - Treat `--tailwindcss` and `--typescript` as frontend-oriented flags. They are not meaningful in normal backend-only scaffolds.
627
+ - Treat starter kit defaults as a base layer that can be overridden by explicit flags.
123
628
  - Read `caspian.config.json` before running update commands.
124
- - When `prisma/schema.prisma` changes, run `npx prisma migrate dev` first.
125
- - If the change requires seed data, run `npx prisma generate` and then `npx prisma db seed`.
126
- - Run `npx ppy generate` after every Prisma schema change to refresh the Python ORM classes.
127
- - Never hand-edit generated Prisma or Python ORM classes.
128
- - Check `database.md` when the task involves Prisma setup, schema updates, or the current workspace's schema, migration, and seed tooling.
129
- - Check [routing.md](./routing.md) before generating or modifying route folders under `src/app/`.
130
- - Check [project-structure.md](./project-structure.md) before placing generated files into the project.
629
+ - When `prisma/schema.prisma` changes, run `npx prisma migrate dev` first, then any required seed refresh, then `npx ppy generate`.
630
+ - Never hand-edit generated Python ORM files under `src/lib/prisma/` or `settings/prisma-schema.json`.
631
+ - Read [database.md](./database.md) before generating Prisma schema, migration, seed, or ORM guidance.
632
+ - Read [routing.md](./routing.md) before generating or modifying route folders under `src/app/`.
633
+ - Read [project-structure.md](./project-structure.md) before placing generated files into the project.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "caspian-utils",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Caspian tooling",
5
5
  "main": "index.js",
6
6
  "scripts": {