A typescript template for building command line interfaces with commander.js.
- Node.js 16
npm init @danielfsousa commander-cli-ts mycli
- Install dependencies
npm install
- Build
npm run build
- Run unit and integration tests
npm test
- Install CLI
npm install . -g
- Run CLI
mycli --help
npm run build # transpiles typescript files
npm run format # formats code with prettier
npm run format:check # checks formatting errors with prettier
npm run lint # lints code with eslint
npm run lint:fix # lints and fixes code with eslint
npm run start # runs cli
npm run test # runs unit and integration tests
npm run test:watch # runs tests and watches for changes