Damat

18. CLI reference

damat — dev & modules (docs)

CommandDescription
damat devStart the dev server with hot reload
damat buildType-check the whole app (tsc --noEmit), then bundle for production. Fails on any type error; --no-typecheck skips the check
damat startStart the production server
damat codegen <module> | --allTypes + zod + registry, and scaffold-once CRUD. Name a module, or pass --all for every module in the config
damat barrel [dir]Recursively (re)write index.ts barrels so one bare import (@workflows) re-exports a whole tree (default src/workflows)
damat module add <src>Install a module (registry/path/git); splits routes/workflows/tests under <moduleId>, and splits any shipped link files into src/links/<moduleId>/ (ensuring links: in damat.config.ts)
damat module listList installed modules
damat module init <name>Scaffold a standalone module package
damat module devRun a module package as a live app
damat module migration:createDiff models → migration (in a module)
damat module migration:runApply this module's migrations to DATABASE_URL (scoped to the module)
damat module migration:statusShow this module's applied vs pending migrations
damat module codegenTypes + zod + registry, and scaffold-once CRUD (in a module)
damat module validateContract + registry-readiness check
damat module buildRelease gate for a module: type-check (tsc --noEmit) + contract validate. --no-typecheck / --no-validate skip a step

damat-orm — migrations & codegen (docs)

CommandDescription
damat-orm migrate:upApply pending migrations
damat-orm migrate:statusShow applied vs pending
damat-orm migrate:create <name>Create a migration
damat-orm migrate:listList modules with migrations

Type generation moved out of damat-orm — use damat codegen <module> (in an app) or damat module codegen (in a module package). damat-orm is migrations-only.

create-damat-app — scaffolding (docs)

bunx create-damat-app@latest my-app           # new project (clones the starter)
bunx create-damat-app@latest my-mod --module  # new standalone module (scaffolds locally)