nodetsp

NodeTSP

Kickstart your Node.js + TypeScript projects with zero configuration.

npm version license Node.js โ‰ฅ16.x PRs Welcome

๐Ÿ“‹ Overview

NodeTSP is a CLI scaffolding tool that automates the setup of Node.js projects with TypeScript, ESLint, Prettier, and Git. Spend less time on boilerplate and more time writing code.

โœจ Features

๐Ÿ“ฆ Installation


npm install -g nodetsp
# or
pnpm add -g nodetsp

๐Ÿš€ Quick Start

# Create a new project to start the cli prompts
nodetsp init

# Choose pnpm instead of npm
nodetsp init my-project --pm pnpm

# Use CommonJS and create extra folders
nodetsp init my-project \
  --ms cjs \
  --fd utils,types \
  --git

# Non-interactive (all options in one go)
nodetsp init my-project \
  --pm pnpm \
  --ms esm \
  --fd lib,utils,config,types \
  --git

๐Ÿ“‹ CLI Options

Option Description Default
-p, --pm <manager> Package manager: npm or pnpm npm
-m, --ms <system> Module system: esm or cjs esm
-f, --fd <folders> Comma-separated extra folders: lib,utils,config,types none
-g, --git Initialize a Git repository false
-v, --version Display version โ€”
-h, --help Show help โ€”

Note: The CLI uses the following flags:

๐Ÿ“‚ Generated Project Structure

my-project/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts
โ”œโ”€โ”€ dist/
โ”œโ”€โ”€ .prettierrc
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ package.json

๐Ÿ› ๏ธ Local Development

To contribute or run the CLI locally:

cd packages/cli
pnpm install
pnpm run build
pnpm link --global # Makes the CLI available as 'nodetsp' on your system

๐Ÿ‘ฅ Contributing

We welcome contributions! Please read our Contributing Guidelines before opening an issue or pull request.

๐Ÿ”’ License

This project is licensed under the MIT License.