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

crud-npm

v1.0.0

Published

> A powerful Gii-style CLI and GUI for scaffolding production-ready NestJS CRUD resources with TypeORM and Swagger.

Readme

🚀 NestJS CRUD Generator

A powerful Gii-style CLI and GUI for scaffolding production-ready NestJS CRUD resources with TypeORM and Swagger.

License Version

Features

  • 🖥️ Gii-Style Visual Designer: A local web interface to visually design your entities.
  • ✨ Zero-Config: Runs immediately without complex setup.
  • 🔌 Swagger Ready: Generated DTOs and Controllers come pre-decorated with @ApiProperty, @ApiOperation, etc.
  • 🛠️ Advanced Entity Modeling:
    • Define Relationships (OneToOne, OneToMany, ManyToOne, ManyToMany).
    • Set Primary Keys, Field Lengths, and Uniqueness.
  • 📂 Flexible Output: Override destination paths per resource (e.g., separate modules folder).
  • 🐘 TypeORM & MySQL: Built-in support for generating .env and DatabaseModule.

Installation

Install globally or as a dev dependency:

# Global
npm install -g crud-npm
# OR
pnpm add -g crud-npm

# Dev Dependency (Recommended)
pnpm add -D crud-npm

Quick Start (GUI)

The easiest way to use the generator is via the visual interface.

  1. Run the UI command:

    crud-gen ui
    # OR if installed locally
    npx crud-gen ui

    This will open http://localhost:4000 in your browser.

  2. Database Setup:

    • Go to the Database Setup tab.
    • Enter your MySQL credentials.
    • Click Generate Configuration.
    • This creates a .env file and src/database/database.module.ts.
  3. Generate a Resource:

    • Go to CRUD Resource.
    • Resource Name: Enter the PascalCase name (e.g., Product).
    • Table Name: (Optional) e.g., shop_products.
    • Fields: Add fields like name, price, description.
      • Tick 'PK' for Primary Key.
      • Tick 'Len' to set varchar length (e.g., 255).
      • Use 'Relation' dropdown to define relations (e.g., ManyToOne to User).
    • Paths: (Optional) Override where files are generated.
    • Click Generate All Files.

CLI Usage

You can also use the command line directly.

# Initialize Config (Optional)
crud-gen init

# Generate Database Config
crud-gen db:setup

# Launch UI
crud-gen ui

Generated Structure

A typical resource generation creates:

src/
├── entities/
│   └── product.entity.ts      # TypeORM Entity with Swagger & Relations
├── dto/
│   └── product/
│       ├── create-product.dto.ts # DTO with Validation & Swagger
│       └── update-product.dto.ts
├── controllers/
│   └── product.controller.ts  # Standard CRUD Headers + Swagger
├── services/
│   └── product.service.ts     # TypeORM Repository Logic
└── modules/
    └── product.module.ts      # Module wiring

Peer Dependencies

This package relies on the following being installed in your host project:

  • @nestjs/common
  • @nestjs/core
  • @nestjs/typeorm
  • @nestjs/swagger
  • typeorm
  • class-validator

License

Cross-Platform & Docker Support

  • Windows/Linux/Mac: Fully supported. Path handling is normalized for all operating systems.
  • Docker: Works out of the box. Ensure to expose port 4000 if using the GUI:
    docker run -p 4000:4000 -v $(pwd):/app -w /app node:18 npx crud-npm ui

License

MIT © Anjan