A TypeScript CLI template using Node.js.
- Node.js 24 or newer
npx giget gh:bentruyman/templates/node/cli my-cli
cd my-cli
npm installUpdate package.json with your project details:
name- Your CLI package namedescription- What your CLI doesbin- Rename the command users will type
| Script | Description |
|---|---|
npm run build |
Compile the CLI to dist/ |
npm run format |
Format code with oxfmt and apply oxlint fixes |
npm run lint |
Check formatting and lint the template |
npm test |
Run tests with Vitest |
npm run typecheck |
Type-check with TypeScript |
npm run verify |
Run lint, typecheck, test, and build |
npm run release |
Publish a new version with release-it |
Run your CLI locally with Node's native TypeScript support:
node src/index.ts --help- Update
package.jsonname and bin fields - Run
npm run releaseto build, tag, and publish to npm