Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Pop-Code/nestjs-console
A nestjs module that provide a cli to your application.
https://github.com/Pop-Code/nestjs-console
cli command commander console es6 javascript nestjs terminal typescript typescript3
Last synced: 14 days ago
JSON representation
A nestjs module that provide a cli to your application.
- Host: GitHub
- URL: https://github.com/Pop-Code/nestjs-console
- Owner: Pop-Code
- License: mit
- Created: 2019-03-06T13:03:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T04:29:38.000Z (11 months ago)
- Last Synced: 2024-05-28T15:35:24.530Z (6 months ago)
- Topics: cli, command, commander, console, es6, javascript, nestjs, terminal, typescript, typescript3
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/nestjs-console
- Size: 2.31 MB
- Stars: 543
- Watchers: 3
- Forks: 25
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-nestjs - Nestjs Console - 一个为应用程序提供 cli 的 Nestjs 模块。 (资源 / 运行)
README
[![nestjs-console](https://raw.githubusercontent.com/Pop-Code/nestjs-console/master/resources/logo-frame.png)][npm]
[![Actions Status](https://github.com/Pop-Code/nestjs-console/workflows/Test/badge.svg)](https://github.com/Pop-Code/nestjs-console/actions)
[![codecov](https://codecov.io/gh/Pop-Code/nestjs-console/branch/master/graph/badge.svg)][codecov]
[![NPM Downloads](https://img.shields.io/npm/dm/nestjs-console.svg?style=flat)][npmchart]
![npm (tag)](https://img.shields.io/npm/v/nestjs-console/latest)
![npm peer dependency version (scoped)](https://img.shields.io/npm/dependency-version/nestjs-console/peer/@nestjs/core)
![npm dependency version (scoped)](https://img.shields.io/npm/dependency-version/nestjs-console/commander)[nestjs-console][npm] 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][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][npm] 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][commander]
3. nestjs-console invoke commander
4. commander will do the rest.# Documentation
- [Wiki](https://github.com/Pop-Code/nestjs-console/wiki)
- [API](https://pop-code.github.io/nestjs-console)
- [Changelog](https://github.com/Pop-Code/nestjs-console/blob/master/CHANGELOG.md)
- [Upgrade from v4 to v5](https://github.com/Pop-Code/nestjs-console/wiki/Upgrade-from-v4-to-v5)[npm]: https://www.npmjs.com/package/nestjs-console
[npmchart]: https://npmcharts.com/compare/nestjs-console?minimal=true
[ci]: https://circleci.com/gh/Pop-Code/nestjs-console
[codecov]: https://codecov.io/gh/Pop-Code/nestjs-console
[commander]: https://www.npmjs.com/package/commander
[changelog]: https://github.com/Pop-Code/nestjs-console/blob/master/CHANGELOG.md