A plugin for Drizzle ORM that auto-generates Arktype validation schemas from Drizzle table schemas, ensuring runtime validation aligns exactly with your database definitions. Version 0.1.3 is stable; release cadence is monthly. Key differentiator: eliminates manual duplication of validation logic when using Arktype with Drizzle, supporting PostgreSQL, MySQL, SQLite. Requires arktype >=2.0.0 and drizzle-orm >=0.36.0. Ships TypeScript types.
npm install drizzle-arktypeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates Arktype schemas from a Drizzle table definition and validates data.
Call drizzleArk() separately for each table.
Use insertSchema for insert operations; do not provide generated fields.
Use import { type } from 'arktype' instead of legacy imports.Replace createDrizzleArk() with drizzleArk().
Ensure drizzle-orm >=0.36.0 and arktype >=2.0.0 are installed: npm install drizzle-arktype arktype drizzle-orm
Change require() to import { drizzleArk } from 'drizzle-arktype'. If using CommonJS, use dynamic import: const { drizzleArk } = await import('drizzle-arktype').Check if result is a string: if (typeof parsed === 'string') { console.log('Error:', parsed); } else { console.log(parsed); }