NestJS CLI
nestjs.com
What it is
NestJS CLI is a command-line tool for creating, developing, and maintaining Nest applications. Its `nest new` command scaffolds a project with boilerplate files and lets you choose ESM or CommonJS. The `nest generate` command creates or changes files according to a schematic, while other commands compile an application or workspace, or compile and run an application. The CLI supports standard and monorepo modes, including built-in library support for monorepos, and its commands are designed to encourage well-structured applications. You can install a Nest-packaged library with `add`, which runs its install schematic, or use `deploy` to deploy an application to the cloud powered by Mau. The CLI is free and open source under the MIT license. It supports TypeScript and JavaScript. Global npm installation and running through npx are both documented options. The CLI binary requires Node.js v20.11 or later; the `new`, `generate`, and `upgrade` schematics require Node.js v22.22.3+, v24.15+, or v26+. The Node.js binary must include ICU internationalization support.
Spec sheet
- Purpose
- Nest CLI initializes, develops, and maintains Nest applications by scaffolding projects and building and bundling them for production.Read 9 Oct 2026 · docs.nestjs.com
- Deployment
- The `deploy` command deploys an application to the cloud powered by Mau.Read 4 Oct 2026 · docs.nestjs.com
- Integrations
- The `add` command imports a library packaged as a Nest library by running its install schematic.Read 4 Oct 2026 · docs.nestjs.com
- Security
- NestJS documents built-in CSRF protection and security headers for applications running on Express and Fastify.Read 9 Oct 2026 · docs.nestjs.com
- Support
- The Nest homepage offers enterprise support covering technical guidance, architectural reviews, mentoring, security and performance concerns, code reviews, and long-term support and upgrade assistance.Read 9 Oct 2026 · nestjs.com
- License
- Nest is an MIT-licensed open-source project supported by the community.Read 9 Oct 2026 · docs.nestjs.com
- Maker
- The NestJS documentation credits Kamil Mysliwiec.Read 9 Oct 2026 · docs.nestjs.com
- Architecture
- The CLI provides commands that encourage well-structured applications and supports Nest schematics.Read 4 Oct 2026 · docs.nestjs.com
- Build and run
- The CLI provides commands to compile applications or workspaces and to compile and run an application.Read 9 Oct 2026 · docs.nestjs.com
- Build integrations
- The CLI build command uses tsc or SWC for standard projects and Rspack for monorepos.Read 9 Oct 2026 · docs.nestjs.com
- Code generation
- The `nest generate` command generates or modifies files based on a schematic.Read 4 Oct 2026 · docs.nestjs.com
- Development workflow
- The generated application can recompile and reload automatically when a source file changes, and the CLI documentation recommends SWC for faster builds.Read 9 Oct 2026 · docs.nestjs.com
- Installation options
- The documentation shows global installation with npm and also describes running the CLI through npx without a global install.Read 4 Oct 2026 · docs.nestjs.com
- Monorepos
- Nest CLI supports monorepo mode for managing multiple projects and libraries in one file system structure, with built-in library support.Read 9 Oct 2026 · docs.nestjs.com
- Package managers
- The `nest new` command supports npm, yarn, or pnpm when the selected package manager is installed globally.Read 9 Oct 2026 · docs.nestjs.com
- Project generation
- The `nest new` command creates a standard-mode application with boilerplate files, and `nest generate` creates or modifies files from schematics.Read 9 Oct 2026 · docs.nestjs.com
- Requirements
- The CLI binary requires Node.js v20.11 or later, while schematics for `new`, `generate`, and `upgrade` require Node.js v22.22.3+, v24.15+, or v26+.Read 4 Oct 2026 · docs.nestjs.com
- Runtime dependency
- The CLI requires a Node.js binary built with internationalization support (ICU).Read 4 Oct 2026 · docs.nestjs.com
- Runtime requirements
- The CLI binary requires Node.js v20.11 or later, while schematics for `nest new`, `nest generate`, and `nest upgrade` require Node.js v22.22.3+, v24.15+, or v26+.Read 9 Oct 2026 · docs.nestjs.com
Plans and prices
Strong points and limits
Strong points
- Free, MIT-licensed open-source CLI
- Scaffolds projects with ESM or CommonJS choices
- Supports standard and monorepo modes
- Offers global npm and npx installation
Limits
- Requires Node.js v20.11 or later
- Some schematics need newer Node.js versions
- Node.js must include ICU support
Who it suits
It suits TypeScript or JavaScript developers building Nest applications who want command-line scaffolding, code generation, and build workflows. Monorepo support and built-in library support may suit teams organizing multiple projects together.
NestJS CLI in depth
Read the full write-up
NestJS CLI is a command-line toolkit for developers building applications with Nest. It suits teams that want a shared project structure and repeatable code generation; its value is strongest inside the Nest ecosystem.
Overview
The CLI covers the working cycle from creating an application to developing, compiling, and deploying it. Its commands use Nest schematics to encourage a structured codebase, which can reduce repeated setup across projects. That focus is an advantage for Nest teams, but it makes the tool a poor fit for projects built around other frameworks.
You can install it globally with npm or run it through npx without a global installation. The project is MIT-licensed, and the CLI is available at no cost.
Key features
Scaffolding and generation
nest new creates an application with boilerplate files and lets you choose ESM or CommonJS. It supports npm, yarn, or pnpm when the chosen package manager is installed globally. nest generate creates or modifies files according to a schematic; custom templates are supported. This is useful when a team wants repeatable starting points, though the generated results depend on the schematic being used.
Development and builds
The CLI can serve an application in development, compile an application or workspace, and compile and run an application. Generated applications can recompile and reload when source files change. For standard projects, the build command uses tsc or SWC; monorepos use Rspack. The documentation recommends SWC for faster builds, giving teams a performance-oriented option without changing the CLI’s role as the project workflow tool.
Monorepos, integrations, and deployment
Standard and monorepo modes accommodate different project layouts, and monorepo mode includes built-in library support. The add command installs a library packaged for Nest by running its install schematic. The deploy command deploys an application to the cloud powered by Mau. These capabilities make the CLI broader than a project generator, but its integrations remain tied to Nest’s conventions.
Pricing
NestJS CLI is free. The Free plan is free and provides the MIT-licensed CLI, installable from npm. The Nest CLI plan is also free; it describes the MIT-licensed project running from the OS command line and requiring Node.js. There is no paid CLI tier to weigh against those options.
Nest separately offers enterprise support, including technical guidance, architectural reviews, security and performance advice, code reviews, and long-term support and upgrade assistance. That service is for organizations seeking expert help; it does not change the free, open-source nature of the CLI.
Platforms
The CLI runs from the operating system command line and requires Node.js v20.11 or later. The schematics for new, generate, and upgrade have a higher requirement: Node.js v22.22.3+, v24.15+, or v26+. The Node.js binary must also be built with internationalization support (ICU). These prerequisites are worth checking before adopting the tool, since meeting the CLI’s baseline does not necessarily meet the requirements for its main generation commands.
Supported languages are TypeScript and JavaScript. Nest also documents built-in CSRF protection and security headers for applications running on Express and Fastify.
Who it's for
NestJS CLI is a strong fit for developers and teams creating Nest applications who want schematics, consistent project structure, and a command-line route through development and builds. Its monorepo mode is especially relevant when a Nest workspace needs built-in library support. Developers working outside Nest should choose a framework-specific tool instead of treating this as a general JavaScript generator.
Pros and cons
Pro: Scaffolding, schematic-based generation, builds, and deployment share one Nest-focused command-line workflow.
Pro: ESM and CommonJS choices, custom templates, and npm, yarn, or pnpm support provide flexibility at project creation.
Pro: Monorepo mode includes library support, while standard projects can build with tsc or SWC.
Con: Schematics have stricter Node.js version requirements than the CLI binary, so older supported installations may not run key generation commands.
Con: Nest-specific commands and integrations offer little reason to adopt the tool for unrelated frameworks.
Alternatives
Choose Laravel Vapor when the priority is deploying Laravel applications to AWS: its Sandbox plan includes one project and 10 deployments, while Unlimited Monthly costs $39 a month, with AWS cloud costs not included. For an in-browser Svelte workspace, Svelte REPL is a free, MIT-licensed playground. Astro Starlight is a free option for web or self-hosted use.
For Symfony projects, Symfony MakerBundle is a free, open-source development dependency installed with Composer. Buffalo is another free option for Linux, macOS, Windows, and web platforms. If you want a free framework available on Linux, macOS, and Windows, consider Express or Echo. SmartClient offers an LGPL open-source edition with its core framework and a commercial Pro edition with additional enterprise capabilities.
Browse Web Frameworks or Code Generators for more options.
Verdict
Choose NestJS CLI if you are building Nest applications and want a free, schematic-driven workflow from scaffolding through builds and deployment. Its main reason to choose it is the way its generation and project conventions keep common Nest tasks in one tool; its main reason to look elsewhere is the same specialization. Check the Node.js and ICU prerequisites, particularly the higher versions required for schematics, before making it part of your workflow.
Verdict
NestJS CLI covers project setup, schematic-based code generation, compilation, and deployment in one command-line tool. Check the Node.js and ICU requirements before using it.
Where Specifiction places it
- Web Frameworks#4 of 317.8
- Frameworks#7 of 287.7
- Code Generators#20 of 337.8