1.0.7 โ€ข Published 4 months ago

drizzle-start v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

๐Ÿงฑ drizzle-start

An interactive CLI tool for quick setup of Drizzle ORM in TypeScript projects. Supports PostgreSQL, MySQL, and SQLite with both Bun and Node.js runtimes.

โœจ Key Features

  • ๐Ÿš€ Interactive setup wizard
  • ๐Ÿ’พ Multi-database support (PostgreSQL, MySQL, SQLite)
  • ๐Ÿ“ Customizable project structure
  • ๐Ÿ”„ Automatic dependency installation
  • ๐Ÿงช Built-in connection testing
  • โšก Bun-first with Node.js support

๐Ÿš€ Quick Start

# Using bunx (recommended)
bunx drizzle-start

# Using npx
npx drizzle-start

Install in Project

# Bun (recommended)
bun add -D drizzle-start

# npm/yarn/pnpm
npm install -D drizzle-start
yarn add -D drizzle-start
pnpm add -D drizzle-start

Run from Project

bun drizzle-start    # Using Bun
npm exec drizzle-start
yarn drizzle-start
pnpm drizzle-start

๐Ÿ“ Project Structure

The CLI creates the following structure (customizable during setup):

your-project/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ database/
โ”‚       โ”œโ”€โ”€ db.ts           # Database client
โ”‚       โ”œโ”€โ”€ schema/         # Schema definitions
โ”‚       โ”‚   โ””โ”€โ”€ index.ts    
โ”‚       โ”œโ”€โ”€ migrations/     # Migration files
โ”‚       โ””โ”€โ”€ tests/          # Connection tests
โ”œโ”€โ”€ .env                    # Database config
โ””โ”€โ”€ drizzle.config.ts      # Drizzle config

โš™๏ธ Configuration

Environment Variables

DB_TYPE=pg|mysql|sqlite
DB_URL=your-connection-string

NPM Scripts

{
  "scripts": {
    "db:generate": "drizzle-kit generate",
    "db:push": "drizzle-kit push",
    "db:drop": "drizzle-kit drop",
    "db:check": "drizzle-kit check"
  }
}

๐Ÿ”ง Requirements

  • Bun (recommended) or Node.js 16+
  • TypeScript 4+

๐Ÿ› ๏ธ Development

# Clone repository
git clone https://github.com/yourusername/drizzle-start.git

# Install dependencies
bun install

# Development mode
bun dev

# Build project
bun run build

๐Ÿ“„ License

MIT ยฉ Hicham Jebara

๐Ÿ’– Credits

๐Ÿ”‘ Keywords

  • drizzle drizzle-orm typescript cli database
  • orm postgresql mysql sqlite bun
  • nodejs scaffolding boilerplate starter setup
  • wizard interactive migrations schema database-toolkit
  • development-tools