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
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.
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.
- Bootstrap (entry point e.g console.ts) is invoked by cli.
- Create a headless nest app, any module inside the app can create command and subcommands using nestjs-console with commander
- nestjs-console invoke commander
- commander will do the rest.