1.0.0 • Published 1 year ago

diff-adviser v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

cli-starter

A command line tool template.

Try it now!

$ pnpm create un
# or
$ pnpm create un [my-cli] -t cli-starter

Link your cli tool to global

$ pnpm stub
$ pnpm link --global

Example

This command will help you understand how cli tool works:

$ my-cli -h # show help
$ my-cli -v # show version
$ my-cli lint one two --name peterroe # demo usage

And then you can rewrite src/index.ts to what you want

Here are some projects that use cli-starter: renamestind

More usage about cac please see cac

Build && Publish

Build it:

$ pnpm build

Publish to npm:

$ git remote add origin xxx # make sure you have bound a repo
$ git push origin main 
$ pnpm release # or npm publish directly
$ npm publish

Try yourself!

Install your own command line tool:

$ npm install -g xxx
$ xxx -h
$ xxx -v

Then use it...