Reputation: 38177
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
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