caspian-utils 0.0.9 → 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.
- package/dist/docs/commands.md +453 -112
- package/dist/docs/index.md +1 -1
- package/package.json +1 -1
package/dist/docs/commands.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Commands
|
|
3
|
-
description: Use
|
|
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
6
|
description: Start with installation for new apps, then use database and structure docs when commands affect schema, generated ORM files, or project layout.
|
|
@@ -18,56 +18,119 @@ This page documents the current Caspian command families used with this workspac
|
|
|
18
18
|
|
|
19
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
|
-
Examples below use
|
|
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
|
-
|
|
23
|
+
This updated reference includes the newer updater behavior and the current scaffold behavior:
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
31
|
+
|
|
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"]`.
|
|
33
|
+
|
|
34
|
+
## 1. Main Command Families
|
|
35
|
+
|
|
36
|
+
### Create a new project
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx create-caspian-app my-app
|
|
40
|
+
```
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
Use when you want to scaffold a new Caspian project from scratch.
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
### Create a project from a starter kit
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
```bash
|
|
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
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use when you want a preset structure instead of the blank default scaffold.
|
|
52
|
+
|
|
53
|
+
### List available starter kits
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx create-caspian-app --list-starter-kits
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use when you want to inspect the built-in starter kits before choosing one.
|
|
60
|
+
|
|
61
|
+
### Update an existing project
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx casp update project
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use when you are inside an existing Caspian project and want to refresh framework-managed files using the project's `caspian.config.json`.
|
|
68
|
+
|
|
69
|
+
### Regenerate ORM after schema changes
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx prisma migrate dev
|
|
73
|
+
|
|
74
|
+
# If the change requires refreshed seed data:
|
|
75
|
+
npx prisma generate
|
|
76
|
+
npx prisma db seed
|
|
77
|
+
|
|
78
|
+
npx ppy generate
|
|
79
|
+
```
|
|
80
|
+
|
|
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`
|
|
38
86
|
|
|
39
87
|
| Flag | Meaning | When to use |
|
|
40
88
|
| --- | --- | --- |
|
|
41
|
-
| `-y` | Non-interactive mode | Use in
|
|
42
|
-
| `--backend-only` | Backend-only project | Use for APIs
|
|
43
|
-
| `--tailwindcss` | Enable Tailwind CSS | Use for frontend or full-stack styling. |
|
|
44
|
-
| `--typescript` | Enable TypeScript frontend tooling | Use when you want
|
|
45
|
-
| `--mcp` | Enable MCP support | Use when the
|
|
46
|
-
| `--prisma` | Enable Prisma setup | Use when the
|
|
47
|
-
| `--starter-kit=<kit>` |
|
|
48
|
-
| `--starter-kit-source=<url>` |
|
|
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.
|
|
49
112
|
|
|
50
|
-
|
|
113
|
+
## 3. Create Command Combinations
|
|
51
114
|
|
|
52
|
-
|
|
115
|
+
### 3.1 Base create command
|
|
53
116
|
|
|
54
|
-
|
|
117
|
+
#### Interactive create
|
|
55
118
|
|
|
56
119
|
```bash
|
|
57
120
|
npx create-caspian-app my-app
|
|
58
121
|
```
|
|
59
122
|
|
|
60
|
-
Use when you want the
|
|
123
|
+
Use when you want the standard guided setup.
|
|
61
124
|
|
|
62
|
-
|
|
125
|
+
#### Non-interactive create
|
|
63
126
|
|
|
64
127
|
```bash
|
|
65
128
|
npx create-caspian-app my-app -y
|
|
66
129
|
```
|
|
67
130
|
|
|
68
|
-
Use when you
|
|
131
|
+
Use when you want a quick scaffold without prompts.
|
|
69
132
|
|
|
70
|
-
|
|
133
|
+
In skip-prompt mode, the default feature values are:
|
|
71
134
|
|
|
72
135
|
- `backendOnly: false`
|
|
73
136
|
- `tailwindcss: false`
|
|
@@ -75,20 +138,47 @@ Without extra flags, the non-interactive default behaves like this:
|
|
|
75
138
|
- `mcp: false`
|
|
76
139
|
- `prisma: false`
|
|
77
140
|
|
|
78
|
-
|
|
141
|
+
### 3.2 Backend-only combinations
|
|
79
142
|
|
|
80
|
-
|
|
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.
|
|
81
144
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
+
```
|
|
88
169
|
|
|
89
|
-
|
|
170
|
+
Use when you want a backend or API project with database tooling.
|
|
90
171
|
|
|
91
|
-
|
|
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
|
|
92
182
|
|
|
93
183
|
```bash
|
|
94
184
|
npx create-caspian-app my-app --backend-only --tailwindcss
|
|
@@ -96,59 +186,229 @@ npx create-caspian-app my-app --backend-only --typescript
|
|
|
96
186
|
npx create-caspian-app my-app --backend-only --tailwindcss --typescript
|
|
97
187
|
```
|
|
98
188
|
|
|
99
|
-
|
|
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.
|
|
100
190
|
|
|
101
|
-
|
|
191
|
+
### 3.3 Full-stack combinations
|
|
102
192
|
|
|
103
|
-
|
|
193
|
+
These apply when `--backend-only` is not used.
|
|
104
194
|
|
|
105
|
-
|
|
106
|
-
| --- | --- | --- |
|
|
107
|
-
| none | `npx create-caspian-app my-app` | Default full-stack scaffold. |
|
|
108
|
-
| `--tailwindcss` | `npx create-caspian-app my-app --tailwindcss` | Styled frontend with Tailwind. |
|
|
109
|
-
| `--typescript` | `npx create-caspian-app my-app --typescript` | Frontend TypeScript assets. |
|
|
110
|
-
| `--mcp` | `npx create-caspian-app my-app --mcp` | Full-stack app with MCP support. |
|
|
111
|
-
| `--prisma` | `npx create-caspian-app my-app --prisma` | Full-stack app with Prisma support. |
|
|
112
|
-
| `--tailwindcss --typescript` | `npx create-caspian-app my-app --tailwindcss --typescript` | Styled frontend with TypeScript. |
|
|
113
|
-
| `--tailwindcss --mcp` | `npx create-caspian-app my-app --tailwindcss --mcp` | Styled UI plus MCP support. |
|
|
114
|
-
| `--tailwindcss --prisma` | `npx create-caspian-app my-app --tailwindcss --prisma` | Styled UI plus database tooling. |
|
|
115
|
-
| `--typescript --mcp` | `npx create-caspian-app my-app --typescript --mcp` | Frontend TypeScript plus MCP. |
|
|
116
|
-
| `--typescript --prisma` | `npx create-caspian-app my-app --typescript --prisma` | Frontend TypeScript plus Prisma. |
|
|
117
|
-
| `--mcp --prisma` | `npx create-caspian-app my-app --mcp --prisma` | Both major backend integrations without forcing frontend styling choices. |
|
|
118
|
-
| `--tailwindcss --typescript --mcp` | `npx create-caspian-app my-app --tailwindcss --typescript --mcp` | Rich frontend plus MCP. |
|
|
119
|
-
| `--tailwindcss --typescript --prisma` | `npx create-caspian-app my-app --tailwindcss --typescript --prisma` | Rich frontend plus Prisma. |
|
|
120
|
-
| `--tailwindcss --mcp --prisma` | `npx create-caspian-app my-app --tailwindcss --mcp --prisma` | Styled UI plus both major integrations. |
|
|
121
|
-
| `--typescript --mcp --prisma` | `npx create-caspian-app my-app --typescript --mcp --prisma` | Frontend TypeScript plus both major integrations. |
|
|
122
|
-
| `--tailwindcss --typescript --mcp --prisma` | `npx create-caspian-app my-app --tailwindcss --typescript --mcp --prisma` | Most feature-complete default full-stack setup. |
|
|
123
|
-
|
|
124
|
-
You can append `-y` to any frontend-enabled example above.
|
|
125
|
-
|
|
126
|
-
## Starter Kit Commands
|
|
195
|
+
#### Minimal full-stack
|
|
127
196
|
|
|
128
|
-
|
|
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
|
|
129
205
|
|
|
130
206
|
```bash
|
|
131
|
-
npx create-caspian-app --
|
|
207
|
+
npx create-caspian-app my-app --tailwindcss
|
|
208
|
+
npx create-caspian-app my-app --tailwindcss -y
|
|
132
209
|
```
|
|
133
210
|
|
|
134
|
-
Use when you want
|
|
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
|
|
135
340
|
|
|
136
341
|
### Built-in starter kits
|
|
137
342
|
|
|
138
|
-
|
|
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
|
|
139
360
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| `api` | `npx create-caspian-app my-app --starter-kit=api` | `backendOnly=true`, `tailwindcss=false`, `prisma=true`, `mcp=false` | Backend API preset with Prisma. |
|
|
145
|
-
| `realtime` | `npx create-caspian-app my-app --starter-kit=realtime` | `backendOnly=false`, `tailwindcss=true`, `prisma=true`, `mcp=true` | Realtime-oriented preset with both UI and integration support. |
|
|
361
|
+
```bash
|
|
362
|
+
npx create-caspian-app my-app --starter-kit=fullstack
|
|
363
|
+
npx create-caspian-app my-app --starter-kit=fullstack -y
|
|
364
|
+
```
|
|
146
365
|
|
|
147
|
-
|
|
366
|
+
Use when you want the built-in full-stack preset.
|
|
148
367
|
|
|
149
|
-
|
|
368
|
+
Preset features:
|
|
150
369
|
|
|
151
|
-
|
|
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:
|
|
152
412
|
|
|
153
413
|
```bash
|
|
154
414
|
npx create-caspian-app my-app --starter-kit=basic --prisma
|
|
@@ -157,83 +417,132 @@ npx create-caspian-app my-app --starter-kit=api --mcp
|
|
|
157
417
|
npx create-caspian-app my-app --starter-kit=realtime --backend-only
|
|
158
418
|
```
|
|
159
419
|
|
|
160
|
-
Use
|
|
420
|
+
Use when a starter kit is close to what you want but still needs a few forced overrides.
|
|
161
421
|
|
|
162
422
|
### Custom starter kit source
|
|
163
423
|
|
|
164
424
|
```bash
|
|
165
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
|
|
166
427
|
```
|
|
167
428
|
|
|
168
|
-
You can combine
|
|
429
|
+
You can combine feature overrides too:
|
|
169
430
|
|
|
170
431
|
```bash
|
|
171
432
|
npx create-caspian-app my-app --starter-kit=custom --starter-kit-source=https://github.com/user/repo --typescript --prisma
|
|
172
433
|
```
|
|
173
434
|
|
|
174
|
-
Use
|
|
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.
|
|
175
436
|
|
|
176
|
-
## Update
|
|
437
|
+
## 5. Update Command Combinations
|
|
177
438
|
|
|
178
|
-
The updater
|
|
439
|
+
The updater recognizes only the `update project` command family. Anything outside that family is rejected by the wrapper.
|
|
440
|
+
|
|
441
|
+
### Update to latest
|
|
179
442
|
|
|
180
443
|
```bash
|
|
181
444
|
npx casp update project
|
|
182
445
|
```
|
|
183
446
|
|
|
184
|
-
Use
|
|
447
|
+
Use when you want the newest release and do not need a pinned tag or version.
|
|
185
448
|
|
|
186
|
-
### Update to
|
|
449
|
+
### Update to a specific tag using positional syntax
|
|
187
450
|
|
|
188
451
|
```bash
|
|
189
|
-
npx casp update project
|
|
452
|
+
npx casp update project beta
|
|
190
453
|
```
|
|
191
454
|
|
|
192
|
-
Use when you want
|
|
455
|
+
Use when you want a named release channel such as `beta`.
|
|
193
456
|
|
|
194
|
-
### Update to a specific
|
|
457
|
+
### Update to a specific version using positional syntax
|
|
195
458
|
|
|
196
459
|
```bash
|
|
197
|
-
npx casp update project
|
|
460
|
+
npx casp update project 1.2.3
|
|
198
461
|
```
|
|
199
462
|
|
|
200
|
-
Use when you want
|
|
463
|
+
Use when you want an exact version.
|
|
201
464
|
|
|
202
|
-
### Update
|
|
465
|
+
### Update using named tag option
|
|
203
466
|
|
|
204
467
|
```bash
|
|
205
|
-
npx casp update project
|
|
206
|
-
npx casp update project
|
|
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
|
|
207
479
|
```
|
|
208
480
|
|
|
209
|
-
Use when you want
|
|
481
|
+
Use when you want explicit version selection with named syntax.
|
|
210
482
|
|
|
211
|
-
### Non-interactive update
|
|
483
|
+
### Non-interactive latest update
|
|
212
484
|
|
|
213
485
|
```bash
|
|
214
486
|
npx casp update project -y
|
|
215
|
-
|
|
216
|
-
|
|
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
|
|
217
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
|
|
218
507
|
```
|
|
219
508
|
|
|
220
|
-
Use
|
|
509
|
+
Use for automated pinned upgrades.
|
|
221
510
|
|
|
222
|
-
|
|
511
|
+
## 6. Invalid Or Conflicting Update Cases
|
|
223
512
|
|
|
224
|
-
|
|
513
|
+
These cases matter because the newer updater parsing is stricter.
|
|
225
514
|
|
|
226
|
-
|
|
227
|
-
- `componentScanDirs`
|
|
228
|
-
- `excludeFiles`, which protects customized files from overwrite
|
|
515
|
+
### Missing value
|
|
229
516
|
|
|
230
|
-
|
|
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.
|
|
231
540
|
|
|
232
|
-
## Prisma
|
|
541
|
+
## 7. Prisma And Python ORM Regeneration
|
|
233
542
|
|
|
234
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.
|
|
235
544
|
|
|
236
|
-
### Required order after
|
|
545
|
+
### Required order after schema changes
|
|
237
546
|
|
|
238
547
|
```bash
|
|
239
548
|
npx prisma migrate dev
|
|
@@ -249,7 +558,7 @@ Use this order:
|
|
|
249
558
|
|
|
250
559
|
1. Run `npx prisma migrate dev` first so migrations and the development database stay aligned.
|
|
251
560
|
2. If `prisma/seed.ts` or seed data depends on the new schema, run `npx prisma generate` and then `npx prisma db seed`.
|
|
252
|
-
3. Run `npx ppy generate` last so the Python ORM layer matches the updated Prisma schema.
|
|
561
|
+
3. Run `npx ppy generate` last so the generated Python ORM layer matches the updated Prisma schema.
|
|
253
562
|
|
|
254
563
|
Do not manually create or edit these generated files:
|
|
255
564
|
|
|
@@ -262,19 +571,50 @@ Do not manually create or edit these generated files:
|
|
|
262
571
|
|
|
263
572
|
See [database.md](./database.md) for the full schema, migration, seed, and async usage guide.
|
|
264
573
|
|
|
265
|
-
## Practical Recommendation Matrix
|
|
574
|
+
## 8. Practical Recommendation Matrix
|
|
266
575
|
|
|
267
576
|
| Goal | Recommended command |
|
|
268
577
|
| --- | --- |
|
|
269
|
-
| Minimal backend
|
|
270
|
-
|
|
|
271
|
-
| Full-stack app with styled UI and
|
|
272
|
-
|
|
|
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` |
|
|
273
582
|
| Full-stack app with everything enabled | `npx create-caspian-app my-app --tailwindcss --typescript --mcp --prisma -y` |
|
|
274
583
|
| Realtime preset | `npx create-caspian-app my-app --starter-kit=realtime -y` |
|
|
275
584
|
| Update current project to latest | `npx casp update project` |
|
|
276
|
-
| Update current project in
|
|
277
|
-
| Update current project to an exact version | `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
|
|
590
|
+
|
|
591
|
+
The CLI reads `caspian.config.json` to decide how it should interact with the project.
|
|
592
|
+
|
|
593
|
+
Important configuration areas include:
|
|
594
|
+
|
|
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
|
|
599
|
+
|
|
600
|
+
Use `excludeFiles` in `caspian.config.json` to prevent the update command from overwriting files you have customized.
|
|
601
|
+
|
|
602
|
+
This is useful for protecting:
|
|
603
|
+
|
|
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
|
|
612
|
+
|
|
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.
|
|
278
618
|
|
|
279
619
|
## AI Routing Notes
|
|
280
620
|
|
|
@@ -285,6 +625,7 @@ If an AI agent is deciding which command flow to use, apply these rules first.
|
|
|
285
625
|
- Add `-y` when the user wants automation, CI, or a no-prompt flow.
|
|
286
626
|
- Treat `--tailwindcss` and `--typescript` as frontend-oriented flags. They are not meaningful in normal backend-only scaffolds.
|
|
287
627
|
- Treat starter kit defaults as a base layer that can be overridden by explicit flags.
|
|
628
|
+
- Read `caspian.config.json` before running update commands.
|
|
288
629
|
- When `prisma/schema.prisma` changes, run `npx prisma migrate dev` first, then any required seed refresh, then `npx ppy generate`.
|
|
289
630
|
- Never hand-edit generated Python ORM files under `src/lib/prisma/` or `settings/prisma-schema.json`.
|
|
290
631
|
- Read [database.md](./database.md) before generating Prisma schema, migration, seed, or ORM guidance.
|
package/dist/docs/index.md
CHANGED
|
@@ -36,7 +36,7 @@ The packaged Caspian docs distributed by the current toolchain also live here:
|
|
|
36
36
|
## Available Documents
|
|
37
37
|
|
|
38
38
|
- `installation.md` - First-time setup flow for creating a new Caspian application
|
|
39
|
-
- `commands.md` - Main Caspian CLI workflows for project creation,
|
|
39
|
+
- `commands.md` - Main Caspian CLI workflows for project creation, generation, updates, and config-aware maintenance
|
|
40
40
|
- `database.md` - Prisma schema, migration, seed, and client-generation workflow for the current workspace, plus Python-side helper caveats
|
|
41
41
|
- `auth.md` - Session-backed authentication with `casp.auth`, centralized `auth_config.py`, decorators, RBAC, and OAuth provider helpers
|
|
42
42
|
- `components.md` - Create reusable Python components, template-backed UI, JSX-style imports, and the single-parent root rule for component HTML files
|