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

@naybala/nest-code-generator

v1.0.2

Published

An interactive CLI tool for scaffolding complete NestJS feature modules. It streamlines the creation of boilerplate code including Controllers, Services, Repositories, DTOs (with Swagger and class-validator), and Response models.

Readme

@naybala/nest-code-generator

An interactive CLI tool for scaffolding complete NestJS feature modules. It streamlines the creation of boilerplate code including Controllers, Services, Repositories, DTOs (with Swagger and class-validator), and Response models.

It also includes interactive prompts to automatically gather entity fields and configure DTOs and Response properties for you.

Installation

You can install the package globally to use it anywhere:

npm install -g @naybala/nest-code-generator

Or you can use it directly via npx without installing:

npx @naybala/nest-code-generator

Usage

Simply run the command in the root directory of your NestJS project:

make-nest-feature

(If you installed locally or are running from package scripts, you can also use npm run make:feature if you add it to your package.json)

Interactive Prompts

The CLI will ask you a series of questions to configure your new feature:

  1. Feature name: The singular PascalCase name of your entity (e.g., Product, User, Order).
  2. Add fields: Whether you want to interactively add properties to your entity.
    • If yes, you will be prompted to enter the Field name, Field type (string, number, boolean, int, float, text), and whether it is optional.
  3. Permissions root prefix: A root name for your feature's permission checks (defaults to the lowercase feature name).

Generated Code Structure

The generator will create a new directory inside src/modules/ with the pluralized name of your feature and scaffold the following files:

src/modules/[plural-name]/
├── controller/[plural-name].controller.ts
├── dto/
│   ├── create-[kebab-singular].dto.ts
│   └── update-[kebab-singular].dto.ts
├── repository/[plural-name].repository.ts
├── responses/[kebab-singular].response.ts
├── service/[plural-name].service.ts
└── [plural-name].module.ts

Automatic Post-Generation Guidance

After successful generation, the CLI will output clear "Next Steps" providing the exact Prisma schema definition (based on the fields you collected) and the import statement needed to register your new module in your application.

Features

  • Interactive CLI: Easy-to-use prompts powered by inquirer.
  • Automatic DTO Validation: Automatically generates class-validator decorators (@IsString, @IsNumber, @IsOptional, etc.) based on your field types.
  • Swagger Integration: Automatically includes @ApiProperty() decorators in DTOs and Response objects.
  • Naming Conventions: Automatically handles pluralization, camelCase, PascalCase, and kebab-case conversions to keep your codebase consistent.
  • Prisma Ready: Provides the exact schema snippets required to update your database.