ProofKit

Typegen

How to use the ProofKit typegen to generate types and Zod schemas

When your database changes, you'll need to update the types and Zod schemas used in your project. Type generation now lives in the @proofkit/typegen package rather than the main ProofKit CLI.

npx @proofkit/typegen@beta 
pnpm dlx @proofkit/typegen@beta 
yarn dlx @proofkit/typegen@beta 
bunx @proofkit/typegen@beta 

If your project includes a typegen script, it should call npx @proofkit/typegen. Re-run it after layout or table metadata changes.

The typegen command may expose other errors in your codebase. For example, if you remove a field from your table or layout that was used in your web app, you'll see an error in your app after running the command.

To find all places in your codebase that need to be updated, run the TypeScript compiler manually:

npm run tsc
pnpm tsc
yarn tsc
bun tsc