npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

drizzle-init

v0.0.14

Published

minimalist starter template to get started with drizzle-orm

Downloads

21

Readme

drizzle-init

Naeemgg

drizzle-init is a CLI tool designed to initialize a Drizzle ORM setup with various database configurations, including PostgreSQL, SQLite, and MySQL. This tool simplifies the process of creating the necessary configuration files and folders for your Drizzle-based project.

TODOs

  • [ ] Add support for env variables
  • [ ] Implement unit tests
  • [ ] Improve error handling and logging
  • [ ] Add more customization options for the generated configuration
  • [ ] Write detailed documentation for each command and option
  • [ ] Add a feature to check for existing files before overwriting

Features

  • Database Support: Configure your project for PostgreSQL, SQLite, or MySQL.
  • Automated Setup: Automatically creates necessary directories and files, including drizzle.config.ts, schema.ts, and db.ts.
  • Custom Configuration: Choose from various database providers and customize the generated configuration based on your project requirements.
  • Custom Scripts: automatically adds useful database management scripts to your package.json.

Installation

To install drizzle-init, you can clone the repository and install dependencies:

npx drizzle-init
    # OR
git clone https://github.com/naeem-gg/drizzle-init.git
cd drizzle-init
npm install

You can also install it globally:

npm install -g drizzle-init

Usage

After installing, you can use the CLI by running:

drizzle-init

This will prompt you to choose your database and provider, and automatically generate the necessary files.

Example

$ npx drizzle-init

Choose your database?
> postgresql
> sqlite
> mysql

What are you using?
> Neon
> Xata
> PostgresJS
> node-postgres
> Vercel Postgres
> Supabase
> AWS Data API
> HTTP Proxy

Directory 'drizzle' has been created successfully.
Directory 'migrations' has been created successfully.
schema.ts has been created successfully.
db.ts has been created successfully.
drizzle.config.ts has been written successfully.

File Structure

After running the CLI, your project structure will look like this:

/your-project/
  ├── drizzle/
  │   ├── schema.ts
  │   ├── db.ts
  │   └── migrations/
  └── drizzle.config.ts

Configuration Files

  • drizzle.config.ts: Contains the configuration for Drizzle ORM based on the database and provider you selected.
  • schema.ts: Placeholder for your database schema.
  • db.ts: Contains the setup for connecting to your database.

Scripts

The drizzle-init tool automatically adds useful database management scripts to your package.json:

  • db:pull: Introspect the database schema.
  • db:push: Apply the latest changes to the database.
  • db:migrate: Run pending migrations.
  • db:generate: Generate types and migrations based on your schema.
  • db:drop: Drop the current database schema.
  • db:up: Apply all migrations to bring the database up to date.
  • db:check: Verify the database state against the schema.
  • db:studio: Launch a database management studio for interaction.

These scripts help streamline database operations and ensure consistency across your development workflow.

Contributing

Contributions are welcome! If you have any ideas, issues, or suggestions, feel free to open an issue or create a pull request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

License

This project is licensed under the ISC License.

Acknowledgments

Special thanks to the developers of Drizzle ORM and the open-source community for their contributions.