@kitschpatrol/create-project
v1.7.1
Published
Kitschpatrol's TypeScript project templates.
Readme
@kitschpatrol/create-project
Kitschpatrol's TypeScript project templates.
Overview
This repository contains very basic starter templates for TypeScript projects integrating @kitschpatrol/shared-config.
The lint tools and rules that come along with @kitschpatrol/shared-config are opinionated and draconian, and won't be to everyone's taste.
The templates use tsdown for building TypeScript libraries and Node-based CLI tools, and Vite for web projects. Bingo is used for the project templating system itself.
Eight template types are available:
| Template | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| minimal | Bare TypeScript scratch project, run with tsx — no build step. |
| web | Vite web app with Vitest tests. |
| cli | Node.js command-line tool using yargs, bundled with tsdown for publication to npm. |
| library | ESM npm library with type declarations, bundled with tsdown. |
| cli+library | Combined npm library and CLI in a single package. |
| electron | Electron app using vite-plugin-electron and electron-builder. |
| electron+node | Electron app with Node-targeted main and preload builds via electron-vite (using the @kitschpatrol/electron-vite fork) and electron-builder. |
| unplugin | Universal bundler plugin via unplugin, targeting Vite, Rollup, Rolldown, webpack, Rspack, esbuild, Farm, and Bun. |
Getting started
Dependencies
Node.js 24.16+ and pnpm 11+ are required to develop this project and to work on the projects it generates (a requirement inherited from @kitschpatrol/shared-config). Generated packages declare the same floor in their engines field: ^24.16.0 || >=26.3.0.
Usage
Create a new project
pnpm create @kitschpatrol/project@latestCLI options
Bingo template options:
--directory (string): What local directory path to run under
npx @kitschpatrol/create-project --directory my-fancy-project
--help (string): Prints help text.
npx @kitschpatrol/create-project --help
--mode ("setup" | "transition"): Which mode to run in.
npx @kitschpatrol/create-project --mode setup
npx @kitschpatrol/create-project --mode transition
--offline (boolean): Whether to run in an "offline" mode that skips network requests.
npx @kitschpatrol/create-project --offline
--version (boolean): Prints package versions.
npx @kitschpatrol/create-project --version
Create Kitschpatrol Project options:
--type (enum): The type of project to create (minimal, web, cli, library, cli+library, electron, electron+node, unplugin).
--author-name (string): The name of the author.
--author-email (string): The email of the author.
--author-url (string): The URL of the author.
--cli-command-name (string): CLI command name (if applicable).
--github-owner (string): The owner of the repository.
--github-repository (string): The name of the repository / package.
--npm-auth-command (string): A shell command that sets the NPM_AUTH_TOKEN env variable with a granular token for publishing to npm.NPM Publishing configuration
I publish most of my packages via a local command instead of through CI.
Most template projects include a release script for this purpose.
The default --npm-auth-command template value expects you to have the 1Password CLI installed, NPM access token configured and stored at a specific path in 1Password, and for your global configuration to look a certain way.
This requires some one-time global configuration on the deploy machine.
pnpm config set '//registry.npmjs.org/:_authToken' '${NPM_AUTH_TOKEN}'Check who pnpm thinks you are to confirm everything works:
NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') pnpm whoamiDevelopment Notes
Build and run the CLI locally:
pnpm build
./dist/index.js --directory ~/Desktop/testUpdate dependencies in every template:
pnpm update-templatesThe templates are pnpm workspace members of this repository, so they are linted (with their own eslint.config.ts files) by the root pnpm lint. Lint rule overrides between Template-dev-only markers silence placeholder-value errors during template development and are stripped from generated projects.
Maintainers
Acknowledgments
Thanks to Josh Goldberg for creating the Bingo template system.
Contributing
Issues are welcome and appreciated.
Please open an issue to discuss changes before submitting a pull request. Unsolicited PRs (especially AI-generated ones) are unlikely to be merged.
This repository uses @kitschpatrol/shared-config (via its ksc CLI) for linting and formatting, plus MDAT for readme placeholder expansion.
