Skip to main content

Command Palette

Search for a command to run...

I Built a CLI Tool That Scaffolds a Production Ready NestJS Project in Seconds

Updated
2 min read
I Built a CLI Tool That Scaffolds a Production Ready NestJS Project in Seconds
P
Backend Software Engineer with a deep focus on server side architecture, security and scalable system engineering. I build with NestJS, Node.js, TypeScript and PostgreSQL and I write about the engineering decisions that separate systems that work from systems that last.

I built a CLI tool that scaffolds a fully production ready NestJS project instantly with one command.

When you are starting a new NestJS project, the setup is always the same. Database configuration, Docker setup, Swagger, environment variables, linting, formatting, testing. Every single time, before you write one line of real business logic, you are wiring the same things together. That is the problem create-nest-pro solves.

The tool is built with Commander.js and Inquirer.js. No bloated framework. No unnecessary abstractions. Just a focused CLI that knows exactly what a production NestJS project needs and builds it for you.

The database layer is handled through TypeORM for PostgreSQL and MySQL, and Mongoose for MongoDB. Whichever you choose, the module is fully configured, the connection is wired through ConfigService, and the environment variables are generated automatically. You do not touch any of that manually.

Docker is not an afterthought. If you choose Docker, the tool generates a Dockerfile and a docker-compose file built specifically for your chosen database. The containers are pre-wired, the volumes are configured, and the service dependencies are set. One command and your entire stack is running.

Swagger is configured in main.ts and live at /api the moment your server starts. No extra setup.

Every project also gets ESLint, Prettier, Jest unit testing, e2e testing with Supertest, environment configuration with dotenv wired through @nestjs/config, and a clean modular folder structure that scales.

The tool also hits the npm registry at the moment you run it and fetches the latest stable version of every single package. Your project never starts with outdated dependencies.

npx create-nest-pro

That is the entire command. Five questions. Seconds later your production ready NestJS project is scaffolded and dependencies are installed.

npm: https://www.npmjs.com/package/create-nest-pro

GitHub: https://github.com/PeaceMelodi/create-nest-pro