If you build NestJS APIs on top of Prisma, you've probably felt the friction: your schema is the source of truth, but your DTOs, validation rules, and Swagger metadata live somewhere else — and they drift.
Most Prisma DTO generators solve the basics (Create / Update / Entity classes with decorators). That's useful, but the moment you need custom output — audit metadata, GraphQL types, RBAC manifests, your own validators — you're back to hand-written glue code.
@tommasomeli/prisma-generator-nestjs-dto is a Prisma generator built for that second phase. It emits the usual NestJS DTOs, then gets out of your way — with a plugin API , annotation-driven decorators , and a type-safe config file when the Prisma schema block isn't enough.
What you get out of the box
For every Prisma model User , run npx prisma generate and you get:
src/generated/nestjs-dto/ user/ user.entity.ts create-user.dto.ts update-user.dto.ts index.ts index.ts
Enter fullscreen mode
Exit fullscreen mode
Each file ships…