zod-sqlite

JSON →
library 1.0.2 ·javascript
verified Jun 7, 2026

Generate type-safe SQLite table schemas from Zod validation schemas, v1.0.2. Requires Node >=24.4.0 and Zod v4 as a peer dependency. Provides a single createTable() function that produces SQL CREATE TABLE and INDEX statements plus a Zod object schema for runtime validation and TypeScript inference. Key differentiators: single source of truth for both database schema and validation, automatic CHECK constraints from Zod rules (min/max, enums, literals), foreign key support, and index management. Released as a new tool bridging Zod and SQLite, with active development.