使用 NestJS 编写 CLI

Writing a CLI with NestJS

在课程中 NestJS Fundamentals (3:29), Kamil Myśliwiec 提到您可以使用 NestJS 构建 CLI 工具。

是否有关于如何执行此操作的文档?任何可用的例子? (我在 SO 上找不到任何东西,在网上搜索 NestJS CLI 得到的主要是与内置 CLI 相关的链接)。

您可以按照 Standalone Application 文档中的一般设置进行操作。您将从 process.argv 获取值并根据需要将其传递给您的服务