cli-starter
A command line tool template.
Try it now!
Create repo from this template on Github
Or:
$ npx degit peterroe/cli-starter my-cli
$ cd my-cli
$ pnpm i # npm install -g pnpm
Development
$ npx esno src/index.ts
Example
$ npx esno src/index.ts -h
$ npx esno src/index.ts -v
$ npx esno src/index.ts lint one two
Build
$ pnpm build
Publish
Update the name
:
{
- "name": "cli-starter",
+ "name": "xxx",
"bin": {
- "cli-starter": "./dist/index.mjs"
+ "xxx": "./dist/index.mjs"
},
Publish to npm:
$ pnpm release # or npm publish directly
Install your own command line tool:
$ npm install -g xxx
Then use it...