{"repo":"jmcdo29/nest-commander","free":true,"listed":false,"github":"https://github.com/jmcdo29/nest-commander","clone":"git clone https://github.com/jmcdo29/nest-commander.git","description":"A module for using NestJS to build up CLI applications","language":"TypeScript","stars":485,"topics":["nestjs","cli","cli-applications","nestjs-commander","cli-command","commander","hacktoberfest"],"license":"MIT","category":"cli-tools","readme_excerpt":"NestJS Commander Have you been building amazing applications with NestJS? Do you want that same structure for absolutely everything you're working with? Have you always wanted to build up some sweet CLI application but don't really know where to start? This is the solution. A package to bring building CLI applications to the Nest world with the same structure that you already know and love :heart: Built on top of the popular Commander package. Installation Before you get started, you'll need to install a few packages. First and foremost, this one: nest-commander (name pending). You'll also need to install @nestjs/common and @nestjs/core as this package makes use of them under the hood, but doesn't want to tie you down to a specific version, yay peerDependencies! A Command File nest-commander makes it easy to write new command line applications with decorators via the @Command() decorator for classes and the @Option() decorator for methods of that class. Every command file should implement the CommandRunner abstract class and should be decorated with a @Command() decorator. CommandRunner Every command is seen as an @Injectable() by Nest, so your normal Dependency Injection still works as you would expect it to (woohoo!). The only thing to take note of is the abstract class CommandRunner , which should be implemented by each command. The CommandRunner abstract class ensures that all commands have a run method that return a Promise and takes in the parameters string[], Record . ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jmcdo29","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jmcdo29/nest-commander/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}