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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@excli/orm-init

v1.1.2

Published

A CLI tool for setting up popular SQL and NoSQL ORMs/ODMs in Node.js projects, with support for both JavaScript and TypeScript.

Downloads

311

Readme

ORM Init CLI Tool

A CLI tool for setting up popular SQL and NoSQL ORMs/ODMs in Node.js projects, with support for both JavaScript and TypeScript.

npm version License: ISC Node.js TypeScript

Part of the excli ecosystem.


Why Choose This Tool?

Stop wiring ORM boilerplate manually. @excli/orm-init gets your database layer production-ready in seconds, whether you're starting fresh or dropping into an existing project.

Built for modern development:

  • 🗄️ SQL — MySQL, MariaDB, PostgreSQL, SQLite
  • 🍃 NoSQL — MongoDB
  • 🔗 ORMs/ODMs — Prisma, Sequelize, TypeORM, Drizzle, Mongoose
  • 🚀 TypeScript & JavaScript support
  • 📦 Works with npm, yarn, pnpm, and bun
  • ⚡ Interactive and flag-based modes

Getting Started

No installation needed! Just run:

npx @excli/orm-init

Or install globally:

npm install -g @excli/orm-init
excli-orm-init [flags]

Requirements

  • Node.js 20 or higher
  • A running database (local or via @excli/docker)

Usage

Interactive Mode

Run the CLI and follow the prompts:

npx @excli/orm-init

You'll be asked about:

  1. Language — TypeScript or JavaScript
  2. Database — MySQL, MariaDB, PostgreSQL, SQLite, or MongoDB
  3. ORM/ODM — Your preferred ORM for the chosen database
  4. Package Manager — npm, yarn, pnpm, or bun

Flag-Based Mode

Skip the prompts and pass everything directly:

# TypeScript + PostgreSQL + Prisma + pnpm
npx @excli/orm-init --ts --pnpm --postgres --prisma

# JavaScript + MongoDB + Mongoose + npm
npx @excli/orm-init --js --npm --mongodb --mongoose

# TypeScript + MySQL + TypeORM + yarn
npx @excli/orm-init --ts --yarn --mysql --typeorm

# TypeScript + PostgreSQL + Drizzle + bun
npx @excli/orm-init --ts --bun --postgres --drizzle

# JavaScript + MySQL + Sequelize + pnpm
npx @excli/orm-init --js --pnpm --mysql --sequelize

# TypeScript + SQLite + Drizzle + pnpm
npx @excli/orm-init --ts --pnpm --sqlite --drizzle

Flags

| Category | Flag | Description | | ------------------- | ------------------------------------------------------------- | ------------------------ | | Language | --ts / --js | TypeScript or JavaScript | | Database | --mysql --mariadb --postgres --mongodb --sqlite | Target database | | ORM/ODM | --prisma --sequelize --typeorm --drizzle --mongoose | ORM/ODM to configure | | Package Manager | --npm --yarn --pnpm --bun | Package manager to use |


What's Included

Generated Files

After running the CLI, you get:

  • ORM config file — pre-configured database connection
  • Schema / Model file — starter schema or model for your chosen ORM

Note: .env, .env.example, and .gitignore are not generated. This is intentional so the tool integrates safely into both new and existing projects. Use @excli/docker to auto-generate a complete .env, or create one manually.

Compatibility Matrix

| ORM / ODM | MySQL | MariaDB | PostgreSQL | SQLite | MongoDB | | ------------- | :---: | :-----: | :--------: | :----: | :-----: | | Prisma | ✅ | ✅ | ✅ | ✅ | ✅ | | Sequelize | ✅ | ✅ | ✅ | ✅ | ❌ | | TypeORM | ✅ | ✅ | ✅ | ✅ | ✅ | | Drizzle | ✅ | ✅ | ✅ | ✅ | ❌ | | Mongoose | ❌ | ❌ | ❌ | ❌ | ✅ |

Incompatible combinations are caught at runtime — the CLI will prompt you to correct them.


Known Issues & Gotchas

Sequelize + MariaDB — Connection String Prefix

The DATABASE_URL must use the mariadb:// prefix, not mysql://. Using the wrong prefix causes Sequelize to load the wrong driver.

# ❌ Wrong
DATABASE_URL="mysql://root:password@localhost:3306/mydb"

# ✅ Correct
DATABASE_URL="mariadb://root:password@localhost:3306/mydb"

Prisma — Shadow Database Error

During prisma migrate dev, Prisma requires a shadow database and needs CREATE DATABASE privileges. Use root credentials for local development.

# ✅ Use root credentials for migrations
DATABASE_URL="mysql://root:rootpassword@localhost:3306/mydb"

This only applies to prisma migrate dev. Production deployments use prisma migrate deploy, which does not require shadow database creation.

TypeORM — synchronize: true in Production

Never enable synchronize: true in production — it can drop or alter columns on startup. Always use migrations instead.

// ❌ Development only
synchronize: true;

// ✅ Production
synchronize: false;

Drizzle — Migration Folder

Drizzle outputs SQL migrations to a drizzle/ folder. Commit this folder to version control — it serves as your migration history.

Mongoose — No Migrations

MongoDB is schemaless; existing documents are not updated when your Mongoose schema changes. Handle data migrations manually.


Troubleshooting

| Problem | Solution | | -------------------------------- | ------------------------------------------------------- | | Prisma shadow database error | Use root credentials in DATABASE_URL | | Incompatible ORM + database | Check the compatibility matrix | | .env not generated | Expected — create manually or use @excli/docker | | TypeORM decorators failing in JS | Use TypeScript; JS decorator support is limited | | Prisma Client not found | Run npx prisma generate after setup | | Connection refused | Ensure your database is running before testing |


excli Ecosystem

| Package | Description | | ---------------------------------------------------------------- | --------------------------------- | | @excli/express | Express app generator for JS/TS | | @excli/docker | Docker Compose + .env generator | | @excli/orm-init | ORM/ODM setup (this package) |

Full project setup in one command:

npx @excli/express

Scaffolds a complete Express app with Docker, a running database, and a configured ORM.


Contributing

Bug reports, feature requests, and pull requests are welcome. Please read the Contributing Guide before opening a PR.


License

ISC License — see LICENSE for details.

Author

Noman
📧 [email protected]
🐙 @pxycknomdictator


Happy coding! Built with ❤️ for developers who value productivity.