Command-line interface tool for initializing, developing, and maintaining NestJS applications
npx @tessl/cli install tessl/npm-nestjs--cli@11.0.0The NestJS CLI is a command-line interface tool that helps you initialize, develop, and maintain NestJS applications. It assists in multiple ways, including scaffolding the project, serving it in development mode, and building and bundling the application for production distribution. It embodies best-practice architectural patterns to encourage well-structured apps.
npm install -g @nestjs/clinest <command> [options]The CLI works with schematics and provides built-in support from the schematics collection at @nestjs/schematics.
# Create a new NestJS application
nest new my-app
# Generate a controller
nest generate controller users
# Build the application
nest build
# Start in development mode
nest start --watch
# Display project information
nest infoThe NestJS CLI is built around several key components:
Create new NestJS applications with customizable options including language selection, package manager, and project structure.
nest new [name] [options]
nest n [name] [options]Generate NestJS components, services, controllers, and other elements using schematics.
nest generate <schematic> [name] [path] [options]
nest g <schematic> [name] [path] [options]Build applications for production with support for multiple build systems and watch mode.
nest build [apps...] [options]Start applications in development mode with hot reloading, debugging, and asset watching.
nest start [app] [options]Add external libraries to your project with automated setup and configuration.
nest add <library> [options]Display comprehensive information about your NestJS project including dependencies, versions, and configuration.
nest info [options]
nest i [options]All commands support the following help options:
-h, --help # Output usage information
-v, --version # Output the current versionThe CLI uses a nest-cli.json configuration file in your project root to define build settings, project structure, and default options.