Installing the NestJS CLI

Install the NestJS CLI globally using npm.

NestJS provides a command-line interface (CLI) tool that helps to create, manage, and build NestJS applications. The CLI offers a set of useful commands to create new projects, start our application, and generate modules, controllers, and services.

Prerequisites

Before installing and utilizing the NestJS CLI, confirm if Node.js and npm exist on our system. Node.js is a JavaScript runtime that allows running JavaScript code outside of a web browser, while npm is a package manager for Node.js that enables the installation and management of packages and dependencies.

To check the versions of Node.js and npm, open a terminal and execute the following commands:

Get hands-on with 1400+ tech skills courses.