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 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-starter-pack

v1.1.1

Published

A modern CLI tool to create a starter project with favorite tech stack.

Downloads

208

Readme

Create Starter Pack CLI 🚀

A modern, interactive CLI tool that helps developers quickly scaffold starter projects with their favorite tech stack. Perfect for beginners who want to get from zero to coding in seconds.

NPM Version NPM Downloads License: MIT

📦 What it creates

The CLI generates a complete starter project with:

  • index.html - Clean HTML5 boilerplate with proper meta tags
  • styles.css - CSS or Tailwind CSS setup with base styling
  • script.js/ts - JavaScript or TypeScript starter file with sample code
  • README.md - Project documentation with tech stack info

🚀 Quick Start

# Run with npx (recommended)
npx create-starter-pack@latest

# Or install globally
npm install -g create-starter-pack
create-starter-pack

🎯 Interactive Setup

The CLI guides you through project configuration with intuitive prompts:

🚀 Welcome to create-starter-pack!

? What is your project name? my-awesome-project
? Which language would you like to use? TypeScript
? Which styling solution would you like to use? Tailwind CSS  
? Which version of Tailwind CSS would you like to use? v4

✨ Creating your project...
✅ Project created successfully!

📋 Configuration Options

Project Name

  • Validation: Lowercase letters, numbers, hyphens, underscores only
  • Default: my-app
  • Example: my-portfolio, todo-app, landing_page

Language Options

| Option | Description | File Extension | |--------|-------------|----------------| | JavaScript | ES6+ with modern syntax | .js | | TypeScript | Type-safe development | .ts |

Styling Options

| Option | Description | Features | |--------|-------------|----------| | CSS | Standard CSS with reset | Modern CSS with flexbox layout | | Tailwind CSS | Utility-first framework | CDN integration, responsive design |

Tailwind CSS Versions

| Version | CDN | Features | |---------|-----|----------| | v3 | cdn.tailwindcss.com | Stable, widely supported | | v4 | @tailwindcss/browser@4 | Latest features, CSS-first |

🏗️ Generated Project Structure

my-project/
├── index.html          # Main HTML file with proper structure
├── styles.css          # CSS/Tailwind configuration
├── script.js/ts        # JavaScript/TypeScript with sample code
└── README.md           # Project documentation

Sample Generated Files

HTML Template

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>my-project</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <div class="container">
    <h1>Welcome to my-project!</h1>
  </div>
  <script src="script.js"></script>
</body>
</html>

CSS Template

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

TypeScript Template

export const sum = (a: number, b: number): number => {
  return a + b;
};

🛠️ Development

Project Structure

cli/
├── src/                    # Source code
│   ├── index.ts           # CLI entry point with inquirer prompts
│   ├── generator.ts       # Project generation logic
│   ├── get-templates.ts   # Template selection logic
│   ├── types.ts           # TypeScript interfaces
│   └── templates/         # File template generators
│       ├── index-file.ts  # HTML template generator
│       ├── readme-file.ts # README template generator
│       ├── script-file.ts # JS/TS template generator
│       └── style-file.ts  # CSS/Tailwind template generator
├── dist/                  # Compiled JavaScript output
├── package.json          # Package configuration
├── tsconfig.json         # TypeScript configuration
└── README.md             # This file

Prerequisites

  • Node.js 16+
  • TypeScript 5+ (for development)
  • npm or pnpm

Setup Development Environment

# Clone the repository
git clone https://github.com/sahilkumardev/create-starter-pack.git
cd create-starter-pack/cli

# Install dependencies
npm install
# or
pnpm install

# Build the project
npm run build
# or
pnpm build

Development Scripts

npm run build        # Compile TypeScript and run CLI
npm run prepublishOnly  # Build before publishing

Local Testing

# After building, test locally
./dist/index.js

# Or test with a specific path
node dist/index.js

🧩 Architecture

Core Components

1. CLI Interface (index.ts)

  • Interactive prompts using Inquirer.js
  • Input validation and sanitization
  • Progress indication with Ora spinner
  • Colorful output with Chalk

2. Project Generator (generator.ts)

  • File system operations with fs-extra
  • Directory creation and validation
  • Template processing and file writing
  • Error handling and cleanup

3. Template System (templates/)

  • Modular template generators
  • Dynamic content based on configuration
  • Support for multiple file types
  • Extensible architecture for new templates

4. Type Safety (types.ts)

export interface ProjectConfig {
  projectName: string;
  language: "typescript" | "javascript";
  styling: "css" | "tailwind";
  tailwindVersion?: "v3" | "v4";
}

export interface FileTemplate {
  path: string;
  content: string;
}

📊 Dependencies

Runtime Dependencies

  • inquirer ^13.1.0 - Interactive CLI prompts
  • chalk ^5.6.2 - Terminal colors and styling
  • ora ^9.0.0 - Progress spinners
  • fs-extra ^11.3.3 - Enhanced file system operations
  • execa ^9.6.1 - Process execution

Development Dependencies

🚀 Publishing

Build for Distribution

npm run build

Publish to NPM

npm publish

The package includes:

  • dist/ - Compiled JavaScript
  • package.json - Package metadata
  • README.md - Documentation

🔧 Configuration

TypeScript Configuration

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "ES2022",
    "outDir": "dist",
    "rootDir": "src",
    "strict": true,
    "declaration": true,
    "sourceMap": true
  }
}

Binary Configuration

{
  "bin": {
    "create-starter-pack": "./dist/index.js"
  }
}

🎨 Template Customization

Adding New Templates

  1. Create template generator in src/templates/
  2. Export template function
  3. Update get-templates.ts to include new template
  4. Add configuration options in types.ts

Example: Adding CSS Framework Support

// In types.ts
export interface ProjectConfig {
  // ... existing properties
  cssFramework?: "bootstrap" | "bulma" | "none";
}

// In templates/style-file.ts
export function getBootstrapConfig(): string {
  return `@import url('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');`;
}

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Add tests for new functionality
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Contribution Guidelines

  • Follow existing code style and patterns
  • Add TypeScript types for new features
  • Update documentation for new options
  • Test CLI locally before submitting

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Sahil Kumar Dev

🔗 Related


Made with ❤️ for developers who want to start coding quickly without the setup hassle.