Skip to content

jsorm gen

jsorm gen analyzes your models and generates types + runtime files.

Terminal window
pnpm jsorm gen
File Location Content
types.ts .jsorm/ Record interfaces, query types, DB, DBClient
jsorm.server.ts src/models/ Server instance with createJsorm<DB>
jsorm.client.ts src/models/ Client instance (only if client models exist)
Flag Description
--dry-run Shows what would be generated without writing files
Terminal window
pnpm jsorm gen --dry-run

Uses tree-sitter-typescript to parse models. Does not depend on the TypeScript Compiler API.