Scaffold a Node.js + TypeScript CLI project, based on the klee template
(tsx + typescript@6 + the strict tsconfig.json from E:\WebProgs\nott).
# interactive (prompts for project name)
npx create-klee-node-ts-cli
# with a project name
npx create-klee-node-ts-cli my-cli
# skip all prompts / install deps / overwrite
npx create-klee-node-ts-cli my-cli --yes
npx create-klee-node-ts-cli my-cli --install # prompts: pnpm or npm?
# pick the package manager non-interactively
npx create-klee-node-ts-cli my-cli --install --pm pnpm
npx create-klee-node-ts-cli my-cli --install --pm npm
npx create-klee-node-ts-cli my-cli --force
# scaffold into the current directory
npx create-klee-node-ts-cli .my-cli/
├── package.json # name injected; scripts.dev = "tsx src/index.ts"
├── tsconfig.json # strict, es2022, rootDir=src, outDir=dist
├── pnpm-workspace.yaml # pnpm settings (allowBuilds: esbuild)
├── .gitignore
└── src/
└── index.ts # hello world
cd my-cli
pnpm install # or npm install
pnpm run dev # run src/index.ts with tsx
pnpm tsc # compile to ./distWhen installing dependencies, the CLI asks whether you want to use pnpm;
if you say no (or pnpm is unavailable), it falls back to npm. Pass
--pm pnpm / --pm npm to skip the question. If you choose pnpm and it is
not installed, the CLI installs it globally (npm install -g pnpm) first.
npm link # link the CLI globally
create-klee-node-ts-cli my-cli
# or run directly without linking:
node bin/index.js my-clinpm publish # then it works via npx create-klee-node-ts-cliThe CLI is dependency-free (Node >= 18 built-ins only), so npx installs
instantly. Templates live in templates/ and are shipped via the files
field in package.json.