npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

typescript-project-generator

v7.0.0

Published

A TypeScript initial configuration for web projects

Downloads

38

Readme

NPM version GitHub license Code Style: Biome PRs Welcome Lint

TypeScript Project Generator

A modern CLI tool that creates production-ready TypeScript projects with opinionated but flexible configuration. Generate complete project boilerplates with modern tooling and best practices in seconds.

⚡ Quick Start

# Install globally
npm i -g typescript-project-generator

# Generate a new project
tpg

What's New in v7.0.0

  • Test Framework Choice: Interactive selection between Jest and Vitest
  • Modern Standards: ES2022 target with strict TypeScript configuration
  • Enhanced Validation: Strict project name validation (lowercase, numbers, hyphens)
  • Node.js v18+: Required for optimal performance and modern features
  • Biome Integration: Ultra-fast linting and formatting out of the box

Generated Project Features

Core Development Tools

  • TypeScript: ES2022 target with strict configuration
  • Test Framework: Choose between Jest or Vitest during setup
  • Biome: Modern linter and formatter (replaces ESLint + Prettier)
  • Docker: Production-ready Dockerfile with dynamic Node.js version
  • GitHub Actions: Complete CI/CD workflows

Project Structure

Your generated project includes all essential files:

  • .env - Environment variables template
  • biome.json - Modern linter and formatter configuration
  • .biomeignore - Files to exclude from Biome processing
  • .gitignore - Git ignore patterns
  • CHANGELOG.md - Project changelog template
  • Dockerfile - Production-ready container configuration
  • jest.config.ts or vitest.config.mts - Test framework configuration
  • LICENSE - Your chosen license file
  • package.json - Project dependencies and scripts
  • README.md - Comprehensive project documentation
  • tsconfig.base.json - Base TypeScript configuration
  • tsconfig.json - Main TypeScript configuration
  • src/index.ts - Main application entry point
  • test/index.test.ts - Initial test file
  • .github/workflows/ - Complete CI/CD pipeline

Interactive Setup Process

The generator guides you through a comprehensive setup with the following prompts:

Project Information

  • Project name - Validates lowercase, numbers, and hyphens only
  • Description - Brief project description
  • Keywords - Tags for package.json discoverability
  • Author name - Your name for package.json and LICENSE
  • GitHub username - For repository URLs and package.json

Technical Configuration

  • License type - Choose from popular licenses (MIT, Apache-2.0, GPL-3.0, etc.)
  • Package manager - npm, yarn, or pnpm support
  • Test framework - NEW! Choose between Jest or Vitest
  • Default port - For server applications (optional)
  • GitHub repository - Repository name for CI/CD integration
  • Heroku deployment - Optional CD workflow for Heroku

Test Framework Choice

Jest (Traditional)

  • Mature and stable testing framework
  • Extensive ecosystem and community support
  • Zero-config setup for most TypeScript projects
  • Built-in code coverage and mocking

Vitest (Modern)

  • Ultra-fast test execution with native ES modules
  • Vite-powered with instant HMR during testing
  • TypeScript-first design and configuration
  • Modern API with Jest-compatible assertions

Generated Project Structure

After completing setup, your project will have this structure:

📂.github
 ┣ 📂workflows
   ┣ 📜lint.yml
   ┗ 📜test.yml
📂src
 ┗ 📜index.ts
📂test
 ┗ 📜index.test.ts
📜.biomeignore
📜.dockerignore
📜.env
📜.gitignore
📜biome.json
📜CHANGELOG.md
📜Dockerfile
📜jest.config.ts OR vitest.config.mts
📜LICENSE
📜package.json
📜README.md
📜tsconfig.base.json
📜tsconfig.json
📜pnpm-lock.yaml (or package-lock.json or yarn.lock)

After generation, git will be initialized and dependencies will be installed based on your chosen package manager.

Prerequisites

  • Node.js v18 or higher - Required for optimal performance and modern features
  • Internet connection - For installing packages and fetching license content
  • Git - For repository initialization

Installation

This tool is designed to be installed globally to create new projects anywhere on your system.

npm i -g typescript-project-generator

Usage

Run the generator from any directory where you want to create your new project:

tpg

The interactive CLI will guide you through the complete setup process with modern validation and helpful prompts.

Generated Dependencies

Core Dependencies (Always Included)

Test Framework Dependencies

When choosing Jest:

When choosing Vitest:

🔄 Migration from Older Versions

If you're upgrading from a previous version of TPG:

  • ESLint → Biome: Projects now use Biome for faster linting and formatting
  • Jest vs Vitest: New projects can choose their preferred test framework
  • ES2022: Updated TypeScript target for modern JavaScript features
  • Node.js v18+: Minimum version requirement for security and performance

Contributing

Hey, this project use to contain a backend generator!

Yes, it used to. But that approach has been deprecated in favor of my new backend framework, Simba.js.

Author

  • Anthony Luzquiños - Initial Work - Documentation - AnthonyLzq.

Contributors