Guide
The psk CLI
Create a project that already runs, and add entities to it without touching a registration file.
Commands
| Command | Does |
|---|---|
psk new <name> | Create a project that boots and serves |
psk g resource <Name> | Add a model and five CRUD endpoints |
psk g model <Name> | Add a model only |
psk ai [targets] | Write AI assistant instructions into this project |
psk --version / --help |
generate abbreviates to g; -y accepts defaults, -f overwrites existing files. new installs the generated project's dependencies for you — pass --no-install to skip that, for CI or a different package manager. Before installing anything, npx parse-server-kit works in place of psk.
Creating a project
npx parse-server-kit new my-api
cd my-api
npm run db:up
npm run dev
Fifteen files, and every one of them removes a trap that is otherwise easy to hit:
| What it sets | What that avoids |
|---|---|
experimentalDecorators | Decorators quietly doing nothing |
declare fields | Values never reaching the database |
| The boot order | Models not registering, empty schema |
A replica set in docker-compose.yml | Transactions failing on a default MongoDB install |
| A seeded user, token printed at startup | The first write answering 400 |
Keys from crypto.randomBytes | Placeholder secrets reaching production |
It asks which assistant you use
Before writing anything, because the same traps in that table are the ones a language
model walks into by default — title!: string is correct in every other
library and silently breaks a model here:
Which AI coding assistants do you use?
• 1 Claude Code CLAUDE.md, plus two skills and a review agent
2 Cursor .cursor/rules/parse-server-kit.mdc
3 GitHub Copilot .github/copilot-instructions.md
4 Windsurf .windsurf/rules/parse-server-kit.md
5 Gemini CLI GEMINI.md
6 AGENTS.md the cross-tool convention
0 none
Numbers, comma separated (6)
Pick several, or none. Already have a project? psk ai claude cursor adds
them later without touching anything else. Unattended:
--ai=claude,agents or --ai=none.
The full page on AI assistants →
Adding an entity
psk g resource Product
✓ src/models/Product.ts
✓ src/functions/product.ts
Routes now available:
POST /api/products/createProduct
GET /api/products/listProducts
GET /api/products/getProduct
POST /api/products/updateProduct
POST /api/products/deleteProduct
The generated files are a working skeleton with the edit points marked — one real field, and the rest commented and ready to uncomment. Fill in your own fields; the wiring is already correct.
importFiles discovers models and functions at boot, so there is no module
to register into and no file to patch. psk g only ever creates, and
refuses when a file already exists.
It follows your layout
The generator looks for where your models already live and writes alongside them, including a per-entity modules/{Name}/functions.ts arrangement. A fresh project gets models/ and functions/.
| Existing layout | Where it writes |
|---|---|
src/models/ + src/functions/ | models/Product.ts, functions/product.ts |
src/cloudCode/models/ + modules/ | models/Product.ts, modules/Product/functions.ts |
Route prefixes come from the same function @Route uses, so Category yields listCategories and /api/categories/ — the generated comments cannot drift from what the server serves.