Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Drizzle ORM

TypeScript ORM for SQL databases with type safety and zero-runtime overhead.

Databases, ORMs and clientsNPM

GitHubWebsite

1. License

License from npm.

github.com/drizzle-team/drizzle-orm

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Drizzle ORM does

Drizzle puts two query styles in one zero-dependency TypeScript package: a builder that mirrors SQL, and a relational Queries API that the docs say always compiles to exactly one SQL query.

Drizzle ORM popularity

86 / 100
Gid Score, #28 overall
49.6M
downloads a week, npm
36.4K
GitHub stars
253
agent projects use it
Drizzle ORM: downloads per weeknpm, drizzle-orm 49,635,806
Drizzle ORM: GitHub starsdrizzle-team/drizzle-orm 36,369

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Drizzle ORM is used

  • Drizzle ORM is a dependency in 253 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (5.2% of the 4,867 JavaScript/TypeScript ones), #2 of 120 in databases, orms and clients.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 831; those are left out of every share on this page.
  • The most used alternative in our scan is Prisma (247 projects).
  • Projects that use it most often also use Drizzle Kit (94.5%), Zod (75.5%), tsx (52.6%).
  • It is more common in projects set up for OpenCode (7.9%) than for Gemini CLI (3.6%).

By coding agent

152 projects, 4.6%
112 projects, 4.6%
112 projects, 3.7%
27 projects, 7.9%
19 projects, 4.1%
17 projects, 3.6%
12 projects, 3.6%
12 projects, 4.3%

Often used with

In 94.5% of its projects
In 75.5% of its projects
In 52.6% of its projects
In 53.4% of its projects
In 57.3% of its projects
In 51.8% of its projects
In 74.3% of its projects
In 56.9% of its projects

Drizzle ORM in practice

Strengths

Queries that read like SQL

The docs argue that other ORMs force a "double learning curve" of SQL plus the framework's API. Drizzle's core builder is meant to map closely onto SQL, so joins and filters look like the SQL they produce.

Nested reads in a single query

For relational data there is a separate Queries API that returns nested results without hand-written joins. The docs say it "always outputs exactly 1 SQL query". They pitch this as a fit for serverless databases where round trips cost money.

Runs wherever JavaScript runs

The README lists Node.js, Bun, Deno, Cloudflare Workers, Supabase functions, edge runtimes and browsers. It names serverless databases such as Turso, Neon, PlanetScale and Cloudflare D1 as supported.

A library, not a framework

The maintainers call Drizzle "headless". It is a library plus opt-in tools, and it is meant to fit an existing project layout rather than impose one. It talks to databases through their standard drivers.

Watch out for

Still on 0.x, with breaking changes in minor releases

The latest release is 0.45.4. The site's changelog flags breaking changes in minor versions. For example, ORM v0.33.0 changed how <code>jsonb</code> is inserted with <code>postgres-js</code>.

A v1 migration is coming

The docs navigation includes an upgrade guide from v0 to v1. A separate section covers moving the relational queries API from v1 to v2. Expect code changes when you upgrade.

Team migration workflow is undocumented

The "Migrations for teams" page has no content yet. It says it is waiting on a new migrations folder structure and points to a GitHub discussion.

Declare a schema, then query it two ways

// manage your schema
export const countries = pgTable ( 'countries' , {
id : serial () .primaryKey () ,
name : varchar ({ length : 256 }) ,
});
export const cities = pgTable ( 'cities' , {
id : serial () .primaryKey () ,
name : varchar ({ length : 256 }) ,
countryId : integer ( 'country_id' ) .references (() => countries .id) ,
});

// Access your data
await db
.select ()
.from (countries)
.leftJoin (cities , eq ( cities .countryId , countries .id))
.where ( eq ( countries .id , 10 ))

const result = await db . query . users .findMany ({
with : { posts : true } ,
});

More about Drizzle ORM

Funding
  • GitHub Sponsors: https://github.com/drizzle-team
  • 68 GitHub sponsors

See all

Head to head
Packages around it
  • drizzle-kit: Drizzle migrations CLI
  • zod: Schema validation
  • tsx: TypeScript runner
  • class-variance-authority: Component class variants
  • clsx: Class name builder
  • tailwind-merge: Tailwind class merging
More in Databases, ORMs and clients

Alternatives

Drizzle ORM This page

Apache-2.0Gid 8649.6M/wk

Prisma

Modern ORM with intuitive schema, migrations, and type-safe database queries.

Apache-2.0Gid 6426M/wk

Compare Drizzle ORM with another tool

Get started

Install it.

npm install drizzle-orm

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Drizzle ORM
- Define and manage the database schema in TypeScript with the dialect's table helper, for example `pgTable` from `drizzle-orm/pg-core`.
- For flat reads, joins and filters, use the SQL-like builder (`db.select().from(...).leftJoin(...).where(...)`).
- For nested relational data, use `db.query.&lt;table&gt;.findMany({ with: { ... } })` instead of hand-built joins. The docs say it outputs exactly one SQL query.
- Run schema changes through Drizzle Kit, which either generates SQL migration files or applies changes directly to the database.
- For Expo SQLite, OP SQLite and React Native migrations, follow the Get Started guide. The dedicated web and mobile page is not written yet.
- Check the installed version first. The project is on 0.x, minor releases have shipped breaking changes, and the docs have separate v0 to v1 and Relational Queries v1 to v2 guides.
- For runtime validation, use the integrations listed under Validations in the docs (zod, valibot, typebox, arktype, effect-schema).