serv-inc
serv-inc

Reputation: 38177

Writing a CLI with NestJS

In the course NestJS Fundamentals (3:29), Kamil Myśliwiec mentions that you can use NestJS to build CLI tools.

Is there any documentation on how to do this ? Any example that is available ? (I could not find anything on SO, searching the web for NestJS CLI yielded mostly links related to the built-in CLI).

Upvotes: 1

Views: 1108

Answers (1)

Jay McDoniel
Jay McDoniel

Reputation: 70131

You could follow the general setup in the Standalone Application docs. You'd take in values from process.argv and pass it to your services as necessary


Expanding on this, there's also nest-commander which is a wrapper around the commander package with Nest's DI syntax and capabilities

Upvotes: 3

Related Questions