https://github.com/danielfsousa/commander-cli-starter-ts
A typescript template for building command line interfaces with commander.js
https://github.com/danielfsousa/commander-cli-starter-ts
Last synced: 11 months ago
JSON representation
A typescript template for building command line interfaces with commander.js
- Host: GitHub
- URL: https://github.com/danielfsousa/commander-cli-starter-ts
- Owner: danielfsousa
- License: mit
- Created: 2022-08-01T03:30:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-01T04:38:42.000Z (almost 4 years ago)
- Last Synced: 2025-06-14T04:02:26.904Z (12 months ago)
- Language: TypeScript
- Size: 103 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# commander-cli-starter-ts
A typescript template for building command line interfaces with [commander.js](https://github.com/tj/commander.js/).
## Requirements
- Node.js 16
## Quick Start
```bash
npm init @danielfsousa commander-cli-ts mycli
```
## Usage
1. Install dependencies
```bash
npm install
```
2. Build
```bash
npm run build
```
2. Run unit and integration tests
```bash
npm test
```
3. Install CLI
```bash
npm install . -g
```
4. Run CLI
```bash
mycli --help
```
## Scripts
```bash
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
```