Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Drizzle Kit

$ drizzle-kit Official Med Risk
Drizzle Team · Database & Data · Apache-2.0 / MIT · macos / linux / windows

Drizzle Kit is the companion CLI for Drizzle ORM, generating versioned SQL migrations (generate), checking migration history (check), introspecting databases (pull), and pushing schemas (push --explain) across PostgreSQL, MySQL, and SQLite.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
npm install -D drizzle-kit
CLI vs MCP Decision CLI Preferred vs MCP

drizzle-kit generate and drizzle-kit push --explain operate directly on local TypeScript schema files and SQL snapshots, making CLI execution essential.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Clean subcommands (check, generate, push --explain, pull), though generate can prompt interactively on column renames vs drop+add.

  • Supports push --explain and check; rename disambiguation can prompt
Trust & Safety 21 / 25

push --explain offers a true SQL preview mode and data-loss statements require --force or interactive confirmation.

  • drizzle-kit push --explain dry-runs DDL changes safely
Setup & Portability 14 / 15

Zero-hassle npm devDependency (npx drizzle-kit) across macOS, Linux, and Windows.

  • Distributed via npm as drizzle-kit
Utility & Efficiency 14 / 15

Directly bridges TypeScript schema definitions and raw SQL migration files.

  • Generates clean SQL diffs directly from TypeScript schemas
Maintenance & Lineage 7 / 10

Maintained by Drizzle Team (drizzle-team/drizzle-orm), though drizzle-kit's source-visibility history drew community scrutiny.

  • Official drizzle-team/drizzle-orm ecosystem; minor licensing/source caveats
Docs & Verifiability 7 / 10

Clear command guides at orm.drizzle.team, though some flags vary between 0.x releases.

  • Official docs at orm.drizzle.team/docs/kit-overview

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Database URLs and dialect settings configured in drizzle.config.ts (typically reading DATABASE_URL from .env).

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

Free to use via npm; part of the Drizzle ORM TypeScript ecosystem.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Drizzle Kit Agent Rules
- Run `npx drizzle-kit push --explain` before `npx drizzle-kit push`.
- Prefer `npx drizzle-kit generate --name <name>` for reviewable SQL migrations over direct `push` in prod.
- NEVER pass `--force` to `drizzle-kit push` without inspecting the `--explain` output first.

Agent-Ready Command Recipes

Safe Read-Only Queries

Verify migration snapshot consistency
npx drizzle-kit check

Validates local migration journal and snapshot history for branch conflicts without touching any database.

Preview schema push SQL with --explain
npx drizzle-kit push --explain

Prints planned DDL statements against the configured database without executing them.

Controlled Writes & Previews

Generate a named SQL migration locally
npx drizzle-kit generate --name add_audit_log

Diffs TypeScript schema changes against snapshots and writes a versioned SQL migration file.

Strengths for Agents

  • + drizzle-kit push --explain prints exact planned SQL statements without mutating the DB.
  • + drizzle-kit check catches migration history conflicts offline in CI.
  • + Lightweight npm tooling with zero external binary setup.

Caveats & Pitfalls

  • ! drizzle-kit generate may open an interactive prompt to disambiguate column renames vs drop-and-create.
  • ! Rapid minor version changes occasionally adjust drizzle.config.ts fields.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI