一款用于快速生成 [cli 开发模版] 的 cli 工具
(A cli tool for quickly generating cli development template)
npm install cligetter -g
cligetter -h
Create a default cli development template
cligetter new <projectName>
cd <projectName>
npm install
npm run dev
You can specify the template type. Currently, blank and cac are supported.
For example, use cac:
cligetter new my-cli -t cac
cd my-cli
npm install
npm run dev
The cac template is packaged with rollup by default, after the builder starts, you can enter:
node ./bin/cli.js -h
or:
npm link
my-cli -h
Next, you can start developing your cli from scripts/index.ts
When creating a template, you can specify the directory through the path option
cligetter new <projectName> --path=<path>