A lightweight TypeScript ORM wrapper for Drizzle ORM, currently at version 0.2.4 with an active development cadence. It simplifies Drizzle usage by providing auto-migrations, schema introspection, a CLI for database operations (including Drizzle Studio integration), and a plugin system for audit, validation, and transformation hooks. Unlike raw Drizzle, nanodb-orm offers zero-config migrations, seed data support, and a simplified API that reduces boilerplate. Supports local SQLite and remote Turso databases, with preview features for embedded replicas and concurrent write transactions. Ships with full TypeScript types and tree-shakeable imports.
npm install nanodb-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a users table schema, creates a database with auto-migration and seed data, then queries all users.
Set `preview: { deterministicPluginOrdering: true }` in createDatabase options when using multiple plugins.Import nanodb from 'nanodb-orm' and use nanodb.schema.table() instead of importing from 'drizzle-orm/sqlite-core'.
Use `await nanodb.createDatabase(...)` or `nanodb.createDatabase(...).then(...)` in v0.2+.
Run `npx nanodb studio` or set up a script: `"studio": "nanodb studio"`.
Use `npx nanodb reset` to drop and recreate tables with seed data, or manually insert seed data in your application code.
Run `npm install @libsql/client`
Use default import: `import nanodb from 'nanodb-orm'` and call `await nanodb.createDatabase(...)`
Add `preview: { deterministicPluginOrdering: true }` to createDatabase optionsRun `npm install nanodb-orm` and ensure the import is `'nanodb-orm'` not a subpath