
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
supabase-to-zod
Advanced tools
Generate Zod schemas (v3) from Typescript types generated by the Supabase CLI.
Generate Zod schemas (v3) from Typescript types generated by the Supabase CLI.
$ pnpm add --D supabase-to-zod
$ supabase gen types typescript --local > types.ts
$ pnpm supabase-to-zod --input types.ts --output schemas.ts
That's it, go to schemas.ts file, you should have a schema for all tables, views, enums and functions.
This project was created in a few hours during the Launchweek VI hackathon and the approach is very hacky: It transforms the nested Database type generated by the Supabase CLI into flat types, and passes them through ts-to-zod to generate zod schemas. A proper solution would be using the pg-meta API to generate zod schemas directly from the source of truth, similar to how the Typescript types are generated.
FAQs
Generate Zod schemas (v3) from Typescript types generated by the Supabase CLI.
The npm package supabase-to-zod receives a total of 661 weekly downloads. As such, supabase-to-zod popularity was classified as not popular.
We found that supabase-to-zod demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.