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

kodegen

v0.8.0

Published

A code generator for js/ts projects

Downloads

149

Readme

kodegen

A code generator for JavaScript/TypeScript projects that helps you bootstrap monorepos, services, and packages with best practices and modern tooling.

🚀 Features

Project Scaffolding

  • Monorepo Initialization: Create full-featured monorepos with workspaces
  • Service Generation: Generate microservices with various feature combinations
  • Package Creation: Create reusable packages within monorepos
  • Single Repository Setup: Initialize standalone projects

Technology Stack Support

  • TypeScript with modern configuration
  • Express.js for web services
  • TypeORM with SQLite for database operations
  • Testing with Vitest and coverage reporting
  • Logging with Winston and custom logger integration
  • CI/CD with GitLab CI templates

Development Tools

  • ESLint with configurable rules (Node.js, Browser, React)
  • Prettier with import sorting
  • Husky for git hooks
  • lint-staged for pre-commit checks
  • Changesets for version management
  • knip for dependency validation
  • madge for circular dependency

📦 Installation

npm install -g kodegen

Or use directly with npx:

npx kodegen [command]

🛠️ Usage

Monorepo Commands

Initialize a new monorepo

npx kodegen monorepo init

This creates a monorepo with:

  • Workspace configuration
  • TypeScript base config
  • ESLint and Prettier setup
  • Git hooks with Husky
  • CI/CD pipeline (optional)
  • Testing setup (optional)
  • Changesets support (optional)

Add a new package to monorepo

npx kodegen monorepo add-package

Creates a reusable package with:

  • TypeScript build configuration
  • Testing setup (optional)
  • Proper package.json structure
  • README template

Add a new service to monorepo

npx kodegen monorepo add-service

Generates a service with selectable features:

  • Express.js API
  • Database (TypeORM + SQLite)
  • Logging system
  • Testing setup
  • Configuration management

Single Repository Commands

Initialize a standalone project

npx kodegen repo init

Creates a single repository with similar feature options as monorepo services.

🎯 Available Features

Development Features

  • ESLint Configurations: Node.js, Browser, and React-specific rules
  • Prettier with Import Sorting: Automated code formatting
  • TypeScript: Strict configuration with path aliases
  • Testing: Vitest with Istanbul coverage
  • Git Hooks: Pre-commit validation with lint-staged

Infrastructure Features

  • CI/CD: GitLab CI pipeline templates
  • Version Management: Changesets for semantic versioning
  • Dependency Checking: knip integration
  • Circular Dependency: madge integration
  • Logging: Structured logging with Winston
  • Database: TypeORM with migrations support

Service Features

  • Express.js: REST API framework
  • Configuration: YAML-based config with config package
  • Database: SQLite with TypeORM entities and migrations
  • Logging: File-based logging with rotation

🔧 Configuration

Monorepo Features

When initializing a monorepo, you can select from:

  • ESLint features (Node, Browser, React)
  • CI/CD pipeline setup
  • Testing with coverage
  • Changesets for versioning
  • Dependency checking

Service Features

When creating a service, choose from:

  • Express.js web framework
  • Database with TypeORM
  • Logging system
  • Testing setup

🚀 Quick Start

  1. Create a new monorepo:

    npx kodegen monorepo init
  2. Add your first service:

    cd your-monorepo
    npx kodegen monorepo add-service
  3. Add a shared package:

    npx kodegen monorepo add-package

📄 License

MIT License - see the LICENSE file for details.

🔍 Version Information

Check the current version:

npx kodegen --version
# or
npx kodegen -v