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

wts-nest-cli

v1.0.6

Published

NestJS module generator CLI

Downloads

18

Readme

🚀 WTS Nest CLI

A simple and powerful CLI tool to generate NestJS modules quickly with all the required files (controller, service, repository, model, resolver, DTO, entity/schema) using interactive prompts.

📦 Installation

You can install globally using npm or yarn:

# Using npm
npm install -g wts-nest-cli

# Using yarn
yarn global add wts-nest-cli

🛠 Usage

Run the following command to generate a new NestJS module:

wts g module

The CLI will ask you:

  1. Module name (e.g., user, blog, category)
  2. Database type (TypeORM or Mongoose)

Example:

$ wts g module
? Module name (e.g., user, blog, category): user
? Select database type: (Use arrow keys)
❯ TypeORM
  Mongoose

📂 Generated Files

For example, if you enter user and choose TypeORM, the following files will be created in: src/modules/user/

user.module.ts
user.service.ts
user.controller.ts
user.resolver.ts
user.repository.ts
user.model.ts
user.dto.ts
user.entity.ts

If you choose Mongoose, the user.entity.ts will be replaced with:

user.schema.ts

📋 Example Command Output

$ wts g module
? Module name (e.g., user, blog, category): product
? Select database type: TypeORM

✅ Generating NestJS module: product
✅ Created: src/modules/product/product.module.ts
✅ Created: src/modules/product/product.service.ts
✅ Created: src/modules/product/product.controller.ts
✅ Created: src/modules/product/product.resolver.ts
✅ Created: src/modules/product/product.repository.ts
✅ Created: src/modules/product/product.model.ts
✅ Created: src/modules/product/product.dto.ts
✅ Created: src/modules/product/product.entity.ts

🎉 Module 'product' generated successfully!

⚡ Features

  • Interactive prompts for module name and database type
  • 🗄️ Supports TypeORM and Mongoose
  • 📁 Generates all common NestJS files in the correct folder structure
  • 📦 Works with npm and yarn
  • 🚀 Fast and lightweight - no unnecessary dependencies
  • 💻 Cross-platform support (Windows, macOS, Linux)
  • 🎯 Zero configuration - works out of the box

🏗️ Generated File Structure

src/
└── modules/
    └── {module-name}/
        ├── {module-name}.module.ts      # Module definition
        ├── {module-name}.service.ts     # Business logic
        ├── {module-name}.controller.ts  # HTTP endpoints
        ├── {module-name}.resolver.ts    # GraphQL resolver
        ├── {module-name}.repository.ts  # Data access layer
        ├── {module-name}.model.ts       # Data model interface
        ├── {module-name}.dto.ts         # Data transfer objects
        └── {module-name}.entity.ts      # TypeORM entity
        └── {module-name}.schema.ts      # Mongoose schema (if selected)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License © 2025 WTS Team

📞 Support

If you encounter any issues or have questions, please open an issue on GitHub.


Made with ❤️ by the WTS Team