@subratamondal/project-init
v1.1.0
Published
Project initializer for my projects with initial configs
Maintainers
Readme
project-init
A CLI project initializer that generates common development configuration based on your tool selections.
The Problem
- Starting a new project means repeating the same setup steps
- Tooling setup (ESLint, Prettier, Husky, commitlint) is easy to misconfigure
- It takes time to wire scripts, dependencies, and git hooks manually every time
The Solution
project-init asks a few interactive questions, then scaffolds your project with the exact config you selected.
Current support: TypeScript
Planned support: Python
npm i -g @subratamondal/project-init
project-initOR
npx @subratamondal/project-initDemo

Features
- Interactive setup flow
- Creates project directory and base files
- Optional git initialization with branch and remote origin
- Optional ESLint setup
- Optional Prettier setup
- Optional lint-staged setup
- Optional Husky hooks setup
- Optional commitlint setup
- Optional automatic dependency installation
- Creates an initial git commit (when git is enabled)
What Gets Generated
Always generated for TypeScript:
- package.json (with scripts based on selected tools)
- tsconfig.json
- src/index.ts
Conditionally generated:
- eslint.config.js (if ESLint enabled)
- .prettierrc.json and .prettierignore (if Prettier enabled)
- .husky/pre-commit (if Husky enabled)
- .husky/commit-msg and commitlint.config.ts (if commitlint enabled)
- .gitignore and git repository metadata (if git enabled)
Requirements
- Node.js 20+
- Git (for git-related options)
- pnpm
Installation
Using npm
npm install -g @subratamondal/project-initBuild from source
git clone https://github.com/subratamondal1029/project-init.git
cd project-init
pnpm install
pnpm build
pnpm link --globalIf global linking does not work in your shell, run
pnpm setup, restart the terminal, then runpnpm link --globalagain.
Usage
Run the initializer:
project-initor use without installation
npx @subratamondal/project-initThen follow the interactive prompts.
Example Flow
- Choose TypeScript
- Enter project name
- Choose whether to initialize git
- Choose your tooling stack (ESLint, Prettier, Husky, etc.)
- Let project-init scaffold files and scripts
- Start coding
CLI Arguments
project-init supports the following command-line arguments:
- -h, --help
- Show help and exit.
- -V, --version
- Print the tool version and exit.
- -y, --yes
- Skip confirmation prompts and fast-forward project initialization (assume defaults).
Example:
project-init -yRoadmap
- Add Python project templates and toolchain setup
- Add more language presets over time
Note
Made for personal use; feel free to customize it for your own needs.
License
MIT - Subrata Mondal
