# Drizzle Kit — card for AI agents

CLI migration tool for Drizzle ORM that auto-generates SQL migrations intelligently.

Category: Databases, ORMs and clients · npm package `drizzle-kit` · latest version 0.31.11 (checked 2026-11-01)
Install: `npm install drizzle-kit`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Drizzle Kit
- Make structural changes in the TypeScript schema, then run `drizzle-kit generate` to write the SQL migration. Do not hand-write DDL for schema changes.
- Put data changes (seeds, back-fills, row copies) in files from `drizzle-kit generate --custom`. Never mix DDL and DML in one migration.
- Read every generated SQL file before committing. Watch for a column being recreated where you expected an in-place alteration.
- Write custom migration SQL so it is safe to re-run, for example with `ON CONFLICT DO NOTHING`.
- On Supabase, set `entities.roles.provider: "supabase"` in `drizzle.config.ts`, and declare RLS in the schema with `.enableRLS()` so policies generate with the table.
- There is no migrate-down command. Use `drizzle-kit drop` only for generated files that have not been applied. Fix applied migrations with a new forward migration.
- For Expo SQLite, OP SQLite or React Native, follow the Get Started guide for migrations.

## Docs written for agents
- [llms.txt (index of the docs)](https://orm.drizzle.team/llms.txt)

## What it is
- Drizzle Kit is the CLI that ships alongside Drizzle ORM, a TypeScript ORM. The README calls it a "CLI companion" that "can generate SQL migration files for you or apply schema changes directly to the database."
- You describe tables in TypeScript. Storyie, a team running it in production, explains the mechanism: "Drizzle Kit diffs the schema against the previous state and generates the SQL." The docs group the Kit's commands under Migrations: `generate`, `migrate`, `push`, `pull`, `export`, `check`, `up` and `studio`. The same section covers custom migrations and a `drizzle.config.ts` file.
- The README's pitch to Drizzle users is a CLI "for you to have hassle-free migrations". The project site's 2024 release log notes that Drizzle Kit went open-source and added programmatic access in the same update.

## Caveats
- No migrate-down command: Storyie notes that Kit has no way to migrate down. Their fallbacks: `drizzle-kit drop` for files that have been generated but not applied, a forward fix for applied ones, and Supabase point-in-time recovery for data loss.
- Supabase needs the roles provider flag: Storyie calls `entities.roles.provider: "supabase"` in the config "not optional". Without it, they write, the generated SQL can clash with Supabase's roles or produce malformed policy statements.
- Generated SQL still needs a read: Storyie reviews every auto-generated file before committing. Their reason: the diff can produce something unexpected, such as recreating a column where you expected an in-place change.
- Minor versions broke things in 2024: The site's 2024 release log lists breaking changes in minor Kit releases. For example, v0.25.0 added a Turso dialect that needs a newer libsql. This log is historical: the site now links a v1.0 upgrade guide, so check current release notes.
- Team workflow page is a placeholder: The "Migrations for teams" docs page has no guidance yet. It says it will be filled in after a new migrations folder structure ships.

## Numbers (AgentGid data)
- Gid Score: 85.8 (#35 of all tools, 2 of 120 in its category)
- Used in 244 public projects set up for AI coding agents (3.9%)
- Downloads last week: 41,642,549 (as of 2026-11-24), +77.9% over 4 weeks
- GitHub stars: 36,369 (as of 2026-11-24)
- Last push: 2026-11-20

## Often used with
Drizzle ORM 98.0%, Zod 78.3%, Class Variance Authority 55.3%, tsx 52.9%, clsx 59.4%, Tailwind CSS 76.6%

## Links
- AgentGid page: https://agentgid.com/tools/drizzle-kit/
- Homepage: https://orm.drizzle.team
- Repository: https://github.com/drizzle-team/drizzle-orm
- Source: https://github.com/drizzle-team/drizzle-orm#readme
- Source: https://github.com/drizzle-team/drizzle-orm
- Source: https://github.com/drizzle-team/drizzle-orm/releases
- Source: https://orm.drizzle.team
- Source: https://orm.drizzle.team/docs/overview
- Source: https://orm.drizzle.team/docs/kit-migrations-for-teams
- Source: https://orm.drizzle.team/docs/kit-web-mobile

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
