A Typescript CLI starter template.
Includes:
- TypeScript, for writing good code
- Node Test Runner, for writing good tests
- Commander, for building CLI applications
- Pkg, for building cross-platform native executables
- Prettier, for formatting your code
- ESLint, for linting your code
Your application will be installable from npm
or by sharing your native executables.
pnpm run dev
Runs the CLI application.
You can pass arguments to your application by running pnpm run dev -- --your-argument
. The extra --
is so that your arguments are passed to your CLI application, and not pnpm
.
pnpm run clean
Removes any built code and any built executables.
pnpm run build
Cleans, then builds the TypeScript code.
Your built code will be in the ./dist/
directory.
pnpm run test
Cleans, then builds, and tests the built code.
pnpm run bundle
Cleans, then builds, then bundles into native executables for Windows, Mac, and Linux.
Your shareable executables will be in the ./exec/
directory.