Node CLI Template
March 15, 2026 · View on GitHub
A GitHub template repo for node cli tools
About This Template
This template is designed for creating Node.js CLI tools.
When to use this template:
- Building command-line tools and automation helpers
- Creating npm packages with a
binentrypoint - Developing interactive terminal workflows
Related templates:
- node-module-template - For reusable npm libraries and utilities
- node-app-template - For web servers, REST APIs, and long-running services
For detailed coding guidelines and GitHub Copilot instructions, see .github/copilot-instructions.md
Install
Globally
npm install -g @voxpelli/node-cli-template
Locally
npm install -D @voxpelli/node-cli-template
Testing
This template uses two complementary test layers:
- Runtime tests in
test/*.spec.jsusingnode:testandnode:assert/strict - Type-level tests in
typetests/*.tst.tsusingtstyche - Public exports and CLI-facing contracts are validated through type-level tests.
Useful commands:
npm test– full verification flownpm run test:node– runtime tests with c8 coveragenpm run check-type-tests– type-level contract tests
Git Hooks
Husky is opt-in in this template.
npm run husky-enable– enable git hooksnpm run husky-disable– disable git hooks
Lockfile Policy
This CLI template does not commit a lockfile by default (package-lock=false in .npmrc).
Usage
node-cli-template --help
Used by
example– used by this one to do X and Y
Similar modules
example– is similar in this way