TypeScript MIT

nestjs-console

A nestjs module that provide a cli to your application.

P

Pop-Code

Dernière activité 27 oct. 2025
Pop-Code/nestjs-console

581

étoiles

26

forks

5

issues ouvertes

clicommandcommanderconsolees6javascriptnestjsterminaltypescript

Ce README est souvent en anglais.

nestjs-console Actions Status codecov NPM Downloads npm (tag) npm peer dependency version (scoped) npm dependency version (scoped)

nestjs-console is a module that provide a cli. A ready to use service class for your modules that exposes methods to register commands and sub commands using the npm package commander

Why

The nestjs framework is missing a cli to access the application context.
Common use case : Headless application, cron task, export data, etc... nestjs-console provide a way to bind cli command and subcommands to providers's methods.

How it works

The console service works as a standalone process, like the classic entry point, and will initialize a NestApplicationContext (headless) instead a NestApplication. The console service will be accessible inside the container.

  1. Bootstrap (entry point e.g console.ts) is invoked by cli.
  2. Create a headless nest app, any module inside the app can create command and subcommands using nestjs-console with commander
  3. nestjs-console invoke commander
  4. commander will do the rest.

Documentation

Projets similaires

A module for using NestJS to build up CLI applications

TypeScriptclicli-applicationscli-command
Jjmcdo29
485 étoiles60

CLI tool for Nest applications 🍹

TypeScriptclihacktoberfestjavascript
Nnestjs
2,2 k étoiles471

Netlify Command Line Interface

TypeScriptclinetlify
Nnetlify
1,9 k étoiles476