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

repo-docgen

v2.1.1

Published

πŸš€ Intelligent documentation generator - Automatically analyze your codebase and generate beautiful, professional README files with zero configuration

Readme

npm version npm downloads npm downloads monthly License Node Version Package Size GitHub Stars PRs Welcome

πŸš€ Quick Start β€’ ✨ Features β€’ πŸ“– Demo β€’ 🎯 Use Cases β€’ βš™οΈ CLI Options β€’ 🀝 Contributing


🎯 What is repo-docgen?

repo-docgen is an intelligent, zero-configuration CLI tool that automatically analyzes your entire codebase and generates beautiful, comprehensive, production-ready documentation in seconds. Say goodbye to manual README writing!

πŸ’‘ Why Choose repo-docgen?


🎬 See It in Action

One Command, Complete Documentation

npx repo-docgen

That's literally it! Watch as repo-docgen:

  • πŸ” Scans your entire project structure
  • 🧠 Detects all frameworks and technologies
  • πŸ“Š Analyzes dependencies and architecture
  • 🌐 Extracts API routes automatically
  • ✨ Generates beautiful markdown documentation

πŸ“Έ What You Get

Before πŸ˜”

my-project/
β”œβ”€β”€ src/
β”œβ”€β”€ package.json
└── (no documentation)

After πŸŽ‰

my-project/
β”œβ”€β”€ src/
β”œβ”€β”€ package.json
β”œβ”€β”€ πŸ“„ README.md ✨
β”œβ”€β”€ πŸ“„ STRUCTURE.md ✨
└── πŸ“„ API.md ✨

✨ Features

  • 🎯 Smart Tech Stack Detection - Automatically identifies all frameworks, libraries, and tools
  • πŸ—οΈ Architecture Recognition - Detects frontend-only, backend-only, full-stack, or monorepo structures
  • πŸ“¦ Monorepo Support - Handles npm, yarn, and pnpm workspaces seamlessly
  • πŸ”„ Recursive Scanning - Deep analysis of entire project structure
  • 🌐 API Route Extraction - Automatically finds and documents all API endpoints
  • πŸ“Š Dependency Analysis - Merges and analyzes dependencies from all package.json files
  • πŸ“„ README.md - Comprehensive project overview with badges, tech stack, and setup guide
  • πŸ—‚οΈ STRUCTURE.md - Visual tree-based project structure with file statistics
  • 🌐 API.md - Complete API documentation with HTTP method badges and examples
  • 🎨 Modern Formatting - Emoji-enhanced, collapsible sections, and beautiful tables
  • πŸ”— Smart Links - Automatic navigation links and table of contents
  • πŸ“Š Visual Diagrams - Mermaid diagrams for architecture visualization

| Category | Technologies | |----------|-------------| | Frontend | React, Vue, Angular, Svelte, Next.js, Nuxt, Remix, Astro, Solid.js, Qwik, Preact | | Backend | Express, Fastify, Koa, NestJS, Hapi, Adonis, Strapi, Sails.js | | Databases | MongoDB, PostgreSQL, MySQL, Redis, Prisma, TypeORM, Sequelize, Mongoose | | Build Tools | Vite, Webpack, Rollup, Parcel, esbuild, Turbopack, SWC | | Testing | Jest, Vitest, Cypress, Playwright, Testing Library, Mocha, Chai | | Styling | Tailwind CSS, Styled Components, Emotion, Sass, Less, PostCSS | | State Management | Redux, Zustand, Jotai, Recoil, MobX, Pinia, Vuex | | Meta Frameworks | Next.js, Nuxt, SvelteKit, Remix, Astro, Gatsby, Redwood |


πŸš€ Quick Start

⚑ Instant Usage (Recommended)

No installation required! Run directly with npx:

npx repo-docgen

That's it! πŸŽ‰ Your documentation will be generated instantly.

πŸ“¦ Global Installation

Install once, use everywhere:

npm install -g repo-docgen

Then run in any project:

docgen

🎯 Project-Specific Usage

Navigate to your project and run:

cd your-awesome-project
npx repo-docgen

πŸ“– Examples

🎬 Basic Usage

# Generate docs in current directory (default)
npx repo-docgen

# Generate in custom output directory
npx repo-docgen --output=docs

# Overwrite existing documentation
npx repo-docgen --overwrite

# Combine options
npx repo-docgen --output=documentation --overwrite

πŸ“ Generated Files

After running repo-docgen, you'll get:

your-project/
β”œβ”€β”€ πŸ“„ README.md          # 🎯 Main project documentation
β”‚   β”œβ”€β”€ Project overview with badges
β”‚   β”œβ”€β”€ Tech stack breakdown
β”‚   β”œβ”€β”€ Installation guide
β”‚   β”œβ”€β”€ Usage examples
β”‚   β”œβ”€β”€ Available scripts
β”‚   └── Contributing guidelines
β”‚
β”œβ”€β”€ πŸ“„ STRUCTURE.md       # πŸ—‚οΈ Project structure visualization
β”‚   β”œβ”€β”€ Tree-based folder structure
β”‚   β”œβ”€β”€ File statistics
β”‚   β”œβ”€β”€ Folder descriptions
β”‚   └── Root file explanations
β”‚
└── πŸ“„ API.md            # 🌐 API documentation (if backend detected)
    β”œβ”€β”€ Grouped endpoints
    β”œβ”€β”€ HTTP method badges
    β”œβ”€β”€ Request/response examples
    └── Testing instructions

🎨 Sample Output Preview

# πŸš€ Your Project Name

> Modern, scalable web application built with React and Express

## πŸ› οΈ Tech Stack

**Frontend:**
- βš›οΈ React 18.2.0
- ⚑ Vite 4.3.0
- 🎨 Tailwind CSS 3.3.0

**Backend:**
- πŸš€ Express 4.18.2
- πŸ—„οΈ MongoDB with Mongoose
- πŸ” JWT Authentication

## πŸš€ Getting Started

### Prerequisites
- Node.js >= 18.0.0
- npm or yarn

### Installation
\`\`\`bash
npm install
\`\`\`

### Development
\`\`\`bash
npm run dev
\`\`\`
# πŸ“ Project Structure

## πŸ“Š Statistics
- **Total Files:** 156
- **Total Folders:** 42
- **Total Size:** 2.3 MB

## 🌳 Directory Tree

\`\`\`
project-root/
β”œβ”€β”€ πŸ“‚ src/
β”‚   β”œβ”€β”€ πŸ“‚ components/
β”‚   β”œβ”€β”€ πŸ“‚ pages/
β”‚   β”œβ”€β”€ πŸ“‚ utils/
β”‚   └── πŸ“„ App.jsx
β”œβ”€β”€ πŸ“‚ public/
β”œβ”€β”€ πŸ“„ package.json
└── πŸ“„ README.md
\`\`\`
# 🌐 API Documentation

## πŸ‘€ User Routes

### ![GET](https://img.shields.io/badge/GET-4CAF50) `/api/users`
Get all users

### ![POST](https://img.shields.io/badge/POST-2196F3) `/api/users`
Create new user

🎯 Use Cases

πŸš€ New Projects

Bootstrap professional documentation instantly for your new project. Perfect for hackathons, MVPs, and side projects.

Example:

create-vite my-app
cd my-app
npx repo-docgen

πŸ“¦ Monorepos

Handle complex multi-package structures with ease. Detects workspaces and generates unified documentation.

Example:

cd my-monorepo
npx repo-docgen
# Analyzes all packages automatically

πŸ”„ Legacy Code

Document existing projects quickly without manual effort. Great for inherited codebases.

Example:

cd legacy-project
npx repo-docgen --overwrite
# Fresh docs in seconds

πŸ‘₯ Open Source

Create contributor-friendly documentation that encourages collaboration.

Example:

npx repo-docgen
# Professional docs ready for GitHub

βš™οΈ CLI Options

| Option | Alias | Description | Default | Example | |--------|-------|-------------|---------|---------| | --output=<dir> | -o | Output directory for generated docs | . (root) | --output=docs | | --overwrite | -f | Force overwrite existing documentation | false | --overwrite | | --help | -h | Show help information | - | --help | | --version | -v | Show version number | - | --version |

πŸ“ Usage Examples

# Generate in 'documentation' folder
npx repo-docgen --output=documentation

# Force regenerate all docs
npx repo-docgen --overwrite

# Custom folder + overwrite
npx repo-docgen -o my-docs -f

# Show help
npx repo-docgen --help

πŸ—οΈ How It Works

graph TB
    A[πŸš€ Start] --> B[πŸ“‚ Scan Project Files]
    B --> C[πŸ“¦ Analyze package.json]
    C --> D[πŸ” Detect Tech Stack]
    D --> E[πŸ—οΈ Classify Architecture]
    E --> F[🌐 Extract API Routes]
    F --> G[πŸ“Š Analyze Dependencies]
    G --> H[✨ Generate Documentation]
    H --> I[πŸ“„ README.md]
    H --> J[πŸ—‚οΈ STRUCTURE.md]
    H --> K[🌐 API.md]
    I --> L[βœ… Done!]
    J --> L
    K --> L
    
    style A fill:#4CAF50,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#2196F3,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#FF9800,stroke:#333,stroke-width:2px,color:#fff

πŸ”„ Process Breakdown

  1. πŸ“‚ Recursive Scanning - Traverses entire project directory structure
  2. πŸ“¦ Package Analysis - Reads all package.json files (root + sub-projects)
  3. πŸ” Tech Detection - Identifies frameworks, libraries, and tools from dependencies
  4. πŸ—οΈ Architecture Classification - Determines if project is frontend, backend, full-stack, or monorepo
  5. 🌐 API Extraction - Scans code for API routes and endpoints
  6. πŸ“Š Dependency Merging - Combines dependencies from all packages
  7. ✨ Doc Generation - Creates beautiful, structured markdown documentation

πŸ“¦ Supported Project Types


🎨 What Makes It Special?

🧠 Intelligent Analysis

Unlike basic doc generators, repo-docgen offers:

  • βœ… Deep Recursive Scanning - Analyzes entire project tree, not just root
  • βœ… Monorepo Intelligence - Detects and handles npm/yarn/pnpm workspaces
  • βœ… Dual-Stack Detection - Identifies both frontend AND backend technologies
  • βœ… Automatic API Discovery - Extracts routes from Express, Fastify, NestJS, etc.
  • βœ… Context-Aware Descriptions - Generates meaningful, project-specific content
  • βœ… Dependency Merging - Combines deps from all package.json files

🎯 Zero Configuration

No config files, no setup, no learning curve:

npx repo-docgen  # That's it! ✨

πŸ“Š Comprehensive Coverage

Supports 100+ frameworks and tools across:

  • React, Vue, Angular, Svelte, Solid.js
  • Next.js, Nuxt, SvelteKit, Remix, Astro
  • Gatsby, Redwood, Qwik, Preact, Alpine.js
  • Lit, Stencil, Ember, Backbone, Aurelia
  • Express, Fastify, Koa, Hapi, Restify
  • NestJS, AdonisJS, Strapi, Sails.js
  • Meteor, FeathersJS, LoopBack, Total.js
  • MongoDB, PostgreSQL, MySQL, SQLite, Redis
  • Prisma, TypeORM, Sequelize, Mongoose, Knex
  • Drizzle, MikroORM, Objection.js, Bookshelf
  • Vite, Webpack, Rollup, Parcel, esbuild
  • Turbopack, SWC, Snowpack, Browserify
  • Gulp, Grunt, Brunch
  • Jest, Vitest, Mocha, Jasmine, Karma
  • Cypress, Playwright, Puppeteer, TestCafe
  • Testing Library, Enzyme, Ava, Tape
  • Tailwind CSS, Bootstrap, Material-UI
  • Styled Components, Emotion, CSS Modules
  • Sass, Less, PostCSS, Stylus, UnoCSS

πŸ“Š Real-World Performance

| Metric | Value | |--------|-------| | ⚑ Average Generation Time | < 5 seconds | | πŸ“¦ Package Size | Lightweight & Fast | | 🎯 Frameworks Detected | 100+ | | 🌐 API Routes Extracted | Unlimited | | πŸ“ Project Types Supported | 5+ |


🀝 Contributing

We love contributions! Here's how you can help make repo-docgen even better:

πŸ› Report Bugs

Found a bug? Open an issue with:

  • Clear description
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots (if applicable)

πŸ’‘ Suggest Features

Have an idea? Share it with us by:

  • Describing the feature
  • Explaining the use case
  • Providing examples

πŸ”§ Submit Pull Requests

Ready to code? Follow these steps:

# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/its-rahul-r15/repo-docgen.git

# 3. Create a feature branch
git checkout -b feature/amazing-feature

# 4. Install dependencies
npm install

# 5. Make your changes
# 6. Test your changes
npm start

# 7. Commit your changes
git commit -m "Add amazing feature"

# 8. Push to your fork
git push origin feature/amazing-feature

# 9. Open a Pull Request

πŸ“– Improve Documentation

Help others by:

  • Fixing typos
  • Adding examples
  • Improving clarity
  • Translating docs

πŸ“Š Project Stats

GitHub repo size GitHub code size GitHub language count GitHub top language


πŸ“„ License

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


πŸ‘¨β€πŸ’» Author

Rahul Sharma

GitHub LinkedIn

Portfolio


🌟 Show Your Support

If repo-docgen helped you, please consider:

⭐ Star this repo on GitHub
πŸ“’ Share with your developer friends
πŸ› Report issues you encounter
πŸ’‘ Suggest features you'd like to see
🀝 Contribute to make it better

GitHub stars GitHub forks GitHub watchers


πŸ”— Related Projects

Explore other awesome documentation tools:


πŸŽ‰ Acknowledgments

Special thanks to:

  • πŸ™ All contributors who helped improve this project
  • πŸ’‘ The open-source community for inspiration
  • πŸš€ Everyone who uses and supports repo-docgen

πŸ“ž Support

Need help? We're here for you:


πŸ’– Made with love by developers, for developers

⬆ Back to Top

πŸ‘‹