Prisma Zod Generator
Prisma → Zod in one generate. Ship validated data everywhere.
input
· result
· pure
variants • comment rules • minimal mode • targeted filtering
📘 Docs: https://omar-dulaimi.github.io/prisma-zod-generator/
Prerequisites
- Node.js 18+ (or Bun / Deno with Prisma compatibility layer)
- Prisma (installed &
npx prisma init
done) - Zod (runtime dependency for the generated schemas)
- TypeScript recommended (strict mode ideal)
Quick Start ⚡
1. Install (pick one)
# npm
npm i -D prisma-zod-generator zod
# pnpm
pnpm add -D prisma-zod-generator zod
# yarn
yarn add -D prisma-zod-generator zod
# bun
bun add -d prisma-zod-generator zod
2. Add to schema.prisma
generator zod {
provider = "prisma-zod-generator"
}
3. Generate
npx prisma generate
4. Use
import { UserSchema } from './prisma/generated/zod';
Optional config: add prisma/zod-generator.config.json
only if you need tweaks.
❤️ Sponsor
If this generator saves you engineering hours or reduces production risk, sponsoring keeps it fast, stable, and evolving.
Your support helps:
- Prioritized issue triage & regression fixes
- New variant / edge‑case coverage (providers, previews)
- Performance & DX improvements (leaner outputs, smarter filtering)
- Continued compatibility as Prisma & Zod evolve
Monthly tiers (GitHub Sponsors) unlock:
Tier | Intended For | Perks |
---|---|---|
Solo | Indie devs | 💖 Listed in README (opt‑in) |
Team | Startups | Priority issues + roadmap influence |
Scale | Companies | Early feature previews + escalation channel |
➡️ Sponsor here: https://github.com/sponsors/omar-dulaimi
One‑off support also welcome (GitHub custom amount).
Contribute
PRs welcome. Keep diffs small; no unrelated refactors.
Before starting a feature or significant refactor: open an issue / feature request first (or discuss in an existing one) so we can:
- Confirm scope & fit
- Avoid duplicate / misaligned work
- Point you to internal patterns or existing WIP
Okay to skip issue for: typo fixes, tiny docs tweaks, test flake isolation.
See tests for coverage expectations.
License
Released under the MIT License – see LICENSE for full text.
Built & maintained by Omar Dulaimi with community contributors.