Generates Zero schemas from Drizzle ORM table definitions, enabling local-first sync via Zero. Current version 0.18.0 requires drizzle-orm >=0.36.0 and @rocicorp/zero. Automatically maps Drizzle column types to Zero schema types, handling primary keys, references, and indexes. Useful for projects using PostgreSQL with local-first sync without manual schema translation.
npm install drizzle-zeroNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Define Drizzle schema for users table, then generate Zero schema using drizzleZeroSchema.
Install required peer deps: npm install drizzle-orm@>=0.36.0 @rocicorp/zero
Use import syntax or set type: module in package.json.
Pass schema as an object: { users, posts } instead of [users, posts].Replace generateZeroSchema with drizzleZeroSchema and update parameters.
npm install drizzle-zero
Use import { drizzleZeroSchema } from 'drizzle-zero'Use drizzleZeroSchema instead of generateZeroSchema.