Type-safe SQLite ORM for Bun runtime, current stable version 3.27.0. Released frequently (multiple updates per month). Uses Zod schemas to define models, provides a fluent query builder with automatic join inference and relationship handling. Differentiators: tightly integrated with Bun's native SQLite, eliminates raw SQL entirely, auto-generates typed relationships from Zod schemas, and supports migrations. Compared to Drizzle ORM (SQL-first) or Prisma (separate schema), it uses Zod for both validation and schema definition, reducing boilerplate.
npm install sqlite-zod-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a User table with Zod schema, creates a model, and performs a typed query.
Use ES modules (import/export) and Bun runtime.
Replace 'Table' with 'defineTable' in all imports.
Always use 'await' or '.then()' on query results.
Ensure foreign key columns follow naming convention 'tableId'.
Use object format: { column: 'asc' | 'desc' }.Install with 'bun add sqlite-zod-orm' and set 'type': 'module' in tsconfig.json.
Run migration or manually create table using '.create()' on model.
Ensure 'query' is imported from 'sqlite-zod-orm' and use as shown in quickstart.
Check input data matches the defined Zod schema; adjust schema if needed.