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

exp-cli-gen

v1.0.5

Published

[![npm version](https://img.shields.io/npm/v/exp-cli-gen.svg)](https://www.npmjs.com/package/exp-cli-gen) [![npm downloads](https://img.shields.io/npm/dw/exp-cli-gen.svg)](https://www.npmjs.com/package/exp-cli-gen) [![npm total downloads](https://img.shie

Readme

⚡ Express + Mongoose + TypeScript Module Generator

npm version npm downloads npm total downloads GitHub stars GitHub issues License GitHub last commit Made with TypeScript Node.js


🚀 Overview

exp-cli-gen is a powerful Express + TypeScript module generator that uses Mongoose for database interaction.
It automatically creates a complete module structure — including models, controllers, services, routes, Zod validations, and Swagger documentation — all in one command.

Ideal for developers who want to quickly scaffold modular Express APIs with clean architecture and ready-to-use integrations.


✨ Features

  • ⚙️ Generates full-featured Express + TypeScript modules
  • 🧩 Automatically integrates Mongoose models and Zod validations
  • 📘 Adds Swagger documentation automatically
  • 🚀 Clones and sets up a ready-to-run Express starter project
  • 🔁 Can add new modules anytime with a single command
  • 🧠 Skips redundant setup if the starter pack already exists
  • 💪 Built for scalability and maintainability

📦 Installation

Install globally:

npm install -g exp-cli-gen

Or run directly using npx (recommended):

npx exp-cli-gen <module-name>

Usage

🏗️ Generate your first module

Run:

npx exp-cli-gen test

First run example:

Need to install the following packages:
[email protected]
Ok to proceed? (y)

⠋ No Express project found. Cloning starter pack...
✔ Starter project cloned!

✔ Git logs removed!

📦 Installing dependencies...

🚀 Project setup complete.
🧩 Generating module: test...
✔ test.interface.ts created
✔ test.schema.ts created
✔ test.validation.ts created
✔ test.route.ts created
✔ test.controller.ts created
✔ test.service.ts created
✔ test.swagger.ts created

🔗 Route added to src/app/routes.ts
📘 Swagger doc added to src/swaggerOptions.ts
✨ Module 'test' created successfully!

📁 Generated Module Structure

Each generated module will contain the following files:

src/app/modules/<module-name>/
 ├── <module-name>.interface.ts
 ├── <module-name>.schema.ts
 ├── <module-name>.validation.ts
 ├── <module-name>.route.ts
 ├── <module-name>.controller.ts
 ├── <module-name>.service.ts
 └── <module-name>.swagger.ts

🔄 Add More Modules

Need another module? Just run:

npx exp-cli-gen products

If the starter project already exists, it will skip cloning and directly add the new module.

Example output:

ℹ 📦 Starter folder already exists. Skipping clone.
📦 Dependencies already installed. Skipping npm install.
🧩 Generating module: products...
✔ products files created
✨ Module 'products' created successfully!

src/app/modules/products/
 ├── products.interface.ts
 ├── products.schema.ts
 ├── products.validation.ts
 ├── products.route.ts
 ├── products.controller.ts
 ├── products.service.ts
 └── products.swagger.ts

Then, refresh your Swagger docs at:

http://localhost:5000/docs

You’ll see your new routes automatically added.


⚙️ Configuration

After setup, update your .env file following the .env.example file in the starter project.

To start the server:

npm run dev

Open Swagger documentation at:

http://localhost:5000/docs

🧠 Tech Stack

  • Express.js — Backend framework
  • TypeScript — Strongly typed JavaScript
  • Mongoose — MongoDB ORM
  • Zod — Runtime schema validation
  • Swagger — API documentation
  • CLI (Node.js) — Command-line automation

🧩 Starter Pack Repository

This CLI uses the following base project as a starter:

👉 mongo-server-stater-pack


💬 Author

Abu Mahid

🧠 GitHub Profile

💼 npm Profile


⭐ Star this project

If you like this CLI, please give it a ⭐ on GitHub — it helps others discover it too! Thank you!