|
| 1 | +# CLI Example |
| 2 | + |
| 3 | +**CLI Example** is a reusable template for building command-line tools with **TypeScript**, **Commander**, **Tsup**, **Vitest**, and **GitHub Actions**. |
| 4 | + |
| 5 | +The README stays intentionally short. The detailed maintenance docs live in the `docs/` folder. |
| 6 | + |
| 7 | +## What this repository includes |
| 8 | + |
| 9 | +- CLI entrypoint with separated command registrars |
| 10 | +- `core` layer for errors, common types, and utilities |
| 11 | +- `services` layer for reusable logic |
| 12 | +- example commands with arguments, options, and help text |
| 13 | +- build, lint, typecheck, and test scripts |
| 14 | +- GitHub Actions for CI and publishing |
| 15 | + |
| 16 | +## Example commands |
| 17 | + |
| 18 | +```bash |
| 19 | +cli-example --help |
| 20 | +cli-example --version |
| 21 | +cli-example hello --name world |
| 22 | +cli-example math sum 10 20 30 |
| 23 | +cli-example math multiply 2 3 4 |
| 24 | +cli-example system info |
| 25 | +cli-example text digits "Order #AB-123" |
| 26 | +cli-example array unique red blue red green |
| 27 | +cli-example random pick apple banana orange |
| 28 | +``` |
| 29 | + |
| 30 | +## Local development |
| 31 | + |
| 32 | +```bash |
| 33 | +npm install |
| 34 | +npm run build |
| 35 | +npm run cli -- --help |
| 36 | +npm run cli -- system info |
| 37 | +npm run cli -- math average 5 10 15 |
| 38 | +``` |
| 39 | + |
| 40 | +## Documentation map |
| 41 | + |
| 42 | +- [Project structure overview](docs/PROJECT_STRUCTURE.md) |
| 43 | +- [Adding a command and service](docs/ADDING_A_COMMAND.md) |
| 44 | +- [Core layer overview](docs/CORE.md) |
| 45 | +- [DevOps overview](docs/DEVOPS_OVERVIEW.md) |
| 46 | +- [DevOps customization](docs/DEVOPS_CUSTOMIZATION.md) |
| 47 | +- [.npmrc overview](docs/NPMRC.md) |
| 48 | +- [GitHub token overview](docs/GITHUB_TOKEN.md) |
| 49 | +- [Publishing](docs/PUBLISHING.md) |
| 50 | + |
| 51 | +## Credits |
| 52 | + |
| 53 | +Repository template maintained by **Daniel Arndt**. |
0 commit comments