๐ Supercharge Your Drizzle ORM Workflow with drizzle-setup
CLI
Setting up a modern ORM for your project should be fast, reliable, and flexible. Thatโs where drizzle-setup
cli comes in โ a powerful utility to automatically scaffold your Drizzle ORM setup for PostgreSQL, SQLite, MySQL, and more.
Whether youโre working on a side project or spinning up a production-ready stack, drizzle-setup
ensures a frictionless experience from zero to fully-configured.
โจ Why Use drizzle-setup
?
Hereโs what makes this CLI a game-changer:
๐ฆ Zero Config Setup โ Get started with just a few prompts.
๐ Drizzle Scripts โ Automatically populates your
package.json
with useful Drizzle CLI commands.๐ง .env Auto Update โ Adds all essential environment variables without manual hassle.
๐งฉ Multi-DB Support โ Works with PostgreSQL, SQLite, MySQL, and more.
๐ Template Copying โ Sets up your
schema.ts
andindex.ts
instantly.
๐ฆ Installation
You can install globally using your favorite package manager:
npm install -g drizzle-setup
# or use npx for one-time setup
npx drizzle-setup
๐ Quick Start
In your project root, run:
drizzle-setup
Youโll be guided through:
Selecting a database (PostgreSQL, SQLite, etc.)
Choosing a preset config
Setting the target folder
Copying boilerplate files
Generating
drizzle.config.ts
Updating
.env
andpackage.json
Installing required dependencies
๐งช Supported Databases
PostgreSQL: Default, Neon, PlanetScale and more.
SQLite: Default, Turso, Bun SQLite and more.
MySQL: Default, Turso, Bun SQLite and more.
Each choice is tailored with optimal templates and .env
configs.
๐งฑ Resulting Directory Structure
Once setup completes, your project might look like this:
project-root/
โโโ drizzle.config.ts
โโโ .env
โโโ [target-folder]/
โ โโโ schema.ts
โ โโโ index.ts
๐ Try it Now
Ready to skip the boilerplate and get building?
npx drizzle-setup
๐ฌ Have Feedback?
Drop your suggestions or issues in the GitHub repo or tweet with the hashtag #DrizzleSetupCLI.
Top comments (3)
Zero-config for Drizzle ORM is something Iโve definitely been wishing for. How does it hold up when switching between multiple DB environments in the same project?
v0.0.5
โจ feat(env): add support for multiple .env files
.env*
files.env
file if none existnpmjs.com/package/drizzle-setup
Some comments may only be visible to logged-in visitors. Sign in to view all comments.