Skip to content
/ cli-template Public template

Modern Node.js Command Line Tool Project Template.

License

Notifications You must be signed in to change notification settings

emosheeep/cli-template

Repository files navigation

Cli Template

This is a modern Command-Line-Tool template repository base on Node.js. You can quickly set up your cli apps with this project.

Quick Start

# development
pnpm install
pnpm watch
pnpm ln -g # link your command globally so that you can debug easier.

# execute your global-linked command.
command-name -h

# publish your package to npm.
pnpm changeset
pnpm versions
# manually trigger publish action(.github/workflows/publish.yml).

Attention

Please read the documentations of these useful tools before developing, which avoids making repetitive wheels and helps you building your cli apps.

  • zx - Execute shell command conveniently in Node.js workflow.
  • commander - Node.js command-line interfaces.
  • tsup - A simple and fast builder based on esbuild.
  • changesets - A way to manage your versioning and changelogs.
  • and so do the other tools you'll develop with, please read the docs by yourself.

Here are some command-line-apps and command-line-utilities you probably use, which are really wonderful.

Contribution

PR welcome if you have any constructive suggestions. Please polish your code and describe you commit msg concisely and detailedly.