devkit-ts
v0.1.7
Published
A toolkit for instantly crafting modern TypeScript apps from scratch.
Readme
devkit-ts
CLI to scaffold npm-friendly TypeScript projects with sensible defaults (tsup bundling, Vitest tests, Vite web templates with HMR, optional git init).
Install
npm install -g devkit
# or locally
npm install -D devkitUsage
# Create a new project in ./my-lib (default base template)
devkit create my-lib
# Pick a template, skip install, choose package manager, skip git
devkit create my-lib --template web-react --pm pnpm --no-install --no-gitThe CLI will ask if you want to initialize git unless you pass --git or --no-git. If you omit --template, it will prompt you to pick one (default is base).
Default template
- Bundler: tsup (ESM + CJS outputs with types)
- Tests: Vitest
- Start:
npm run dev(tsx) andnpm run start(built output) - Publishing:
dist/and type declarations ready for npm
Development
npm install
npm run dev # iterate on CLI
npm run build # bundle CLI
npm test # run smoke testsTemplates
base– Library/CLI starter with tsup, Vitest, tsx dev script.web-vanilla– Vite + TypeScript web starter with dev server + HMR.web-react– Vite + React + TypeScript web starter with dev server + HMR.
Templates live in templates/. Add new ones by creating a folder and wiring placeholders (e.g., __APP_NAME__).
Web templates (dev server + HMR)
# Vanilla TS web app
devkit create my-web --template web-vanilla
npm run dev # inside the scaffolded app
# React TS web app
devkit create my-react --template web-react
npm run dev # inside the scaffolded app