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

mastermind-db

v0.0.8

Published

A CLI to manage database structures and ORM integrations with precision.

Readme

MasterMind-DB is a versatile and extensible CLI tool designed for managing databases and ORM-based projects. It supports multiple ORMs, including Sequelize, and integrates seamlessly with Docker for containerized database management.


Features

  • Generate database structures, models, migrations, and seeders.
  • Supports multiple ORMs (Sequelize, Prisma, TypeORM).
  • Docker integration for starting and stopping containers.
  • Dynamic configuration management stored in .mastermindrc.
  • Interactive CLI with prompts and spinners for a smooth user experience.
  • Handles volumes and services directly in docker-compose.yml.
  • Allows custom configuration and project settings.

Prerequisites

  1. Node.js (v16 or later)

    sudo apt update
    sudo apt install nodejs npm
    node -v
    npm -v
  2. Docker (Latest Version)

    sudo apt update
    sudo apt install docker.io
    sudo systemctl start docker
    sudo systemctl enable docker
    docker --version
  3. Docker Compose (V2 recommended)

    sudo apt install docker-compose
    docker-compose --version

Installation

Global Installation

npm install -g mastermind-db

Project-Specific Installation

npm install mastermind-db

Commands and Usage

1. Initialize a Project Configuration

mastermind-db init
  • Prompts for:
    • Root directory for projects.
    • Service name.
    • ORM type.

2. Create a New Service

mastermind-db create
  • Guides through creating a database service.
  • Asks for database type (MySQL/PostgreSQL).
  • Prompts for ORM (Sequelize/Prisma/TypeORM).
  • Optionally generates a Docker Compose setup.
  • Optionally starts Docker containers if available.

3. Manage Existing Service

mastermind-db manage
  • Allows updating configurations or generating files (models, migrations, seeders) for existing services.

4. Delete a Service

mastermind-db delete
  • Selects and deletes a service.
  • Removes folders, updates .mastermindrc, and edits docker-compose.yml.
  • Stops and removes running Docker containers and volumes.

5. Configuration Settings

mastermind-db config
  • Allows managing root directories and ORM configurations.

Docker Integration

  • Automatically adds services to docker-compose.yml.
  • Handles starting and stopping Docker containers.
  • Ensures volume mappings for persistent storage.

Docker Commands

Check Docker Dependencies

mastermind-db check-docker
  • Verifies Docker and Docker Compose installation.

Start Docker Containers

mastermind-db start-docker <service-name>

Stop and Remove Docker Containers

mastermind-db delete
  • Deletes services, containers, and volumes.

Example Workflow

1. Initialize Project

mastermind-db init

2. Create a Service

mastermind-db create

Choose:

  • Database: MySQL
  • ORM: Sequelize
  • Generate Docker Compose: Yes
  • Start Docker Container: Yes

3. Generate Files

mastermind-db manage
  • Generate models, migrations, and seeders interactively.

4. Delete a Service

mastermind-db delete
  • Select service to delete.
  • Deletes files, config, and Docker containers/volumes.

Configuration File (.mastermindrc)

Example:

{
  "rootDir": "./src",
  "services": {
    "auth-service": {
      "orm": "Sequelize",
      "migrationsDir": "./src/auth-service/sequelize/migrations",
      "modelsDir": "./src/auth-service/sequelize/models",
      "seedersDir": "./src/auth-service/sequelize/seeders"
    }
  }
}

Troubleshooting

  1. Docker Not Installed:

    • Install Docker and Docker Compose as mentioned in prerequisites.
  2. Permission Denied for Docker Commands:

    • Add the user to the docker group.
    sudo usermod -aG docker $USER
    newgrp docker
  3. Configuration File Issues:

    • Run mastermind-db config to update settings.

Contributing

Contributions are welcome! Feel free to fork this repository and submit pull requests.


License

This project is licensed under the MIT License.


Contact

For any questions or feedback, please reach out to the repository maintainer.