← Back to CLIs
Melvynx

drizzle-kit

Drizzle ORM toolkit CLI - generate migrations, push schema, introspect databases, run studio. Use when user mentions 'drizzle', 'drizzle-kit', or wants to manage database schema with Drizzle ORM.

Install

$ npx api2cli install drizzle-kit

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

drizzle-kit

Setup

npm i -g drizzle-kit

Or use as a dev dependency:

npm i -D drizzle-kit
npx drizzle-kit

Verify installation:

drizzle-kit --version

Requires a drizzle.config.ts file in the project root.

Resources

Migrations

CommandDescription
drizzle-kit generateGenerate SQL migration files from schema changes
drizzle-kit generate --name initGenerate a named migration
drizzle-kit migrateApply pending migrations
drizzle-kit dropDrop a previously generated migration
drizzle-kit upUpgrade previously generated migrations to a newer format
drizzle-kit checkCheck for consistency between schema and migration files

Database Operations

CommandDescription
drizzle-kit pushPush schema changes directly to the database without generating migrations
drizzle-kit pullIntrospect the database and generate schema files

Studio

CommandDescription
drizzle-kit studioOpen Drizzle Studio GUI for database browsing
drizzle-kit studio --port 3001Open studio on a custom port

Global Flags

FlagDescription
--config <path>Path to drizzle config file
--dialect <dialect>Database dialect (postgresql, mysql, sqlite)
--verboseEnable verbose output
Sponsors