Skip to content

its-rahul-r15/repo-docgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


πŸ“š repo-docgen

πŸš€ AI-Powered Documentation Generator for Modern Developers

Transform your codebase into stunning, professional documentation in seconds with zero configuration


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?

⚑

Lightning Fast

Generate complete docs in <5 seconds

🧠

AI-Powered

Smart detection of 100+ frameworks

🎯

Zero Config

No setup, no config files needed


🎬 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

πŸ” Intelligent Code Analysis

  • 🎯 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

πŸ“ Professional Documentation Output

  • πŸ“„ 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

πŸ› οΈ Supported Technologies (100+)

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

πŸ“„ README.md 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
\`\`\`
πŸ—‚οΈ STRUCTURE.md Preview
# πŸ“ 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.md Preview
# 🌐 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
Loading

πŸ”„ 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

Project Type Detection Example Generated Docs
🎨 Frontend-only βœ… React + Vite, Vue + Nuxt README + STRUCTURE
βš™οΈ Backend-only βœ… Express API, NestJS README + STRUCTURE + API
🌐 Full-stack βœ… Next.js, MERN stack README + STRUCTURE + API
πŸ“¦ Monorepo βœ… Nx, Turborepo, Lerna README + STRUCTURE + API
πŸ“„ Vanilla JS βœ… Plain HTML/CSS/JS README + STRUCTURE

🎨 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:

🎨 Frontend Frameworks (20+)
  • React, Vue, Angular, Svelte, Solid.js
  • Next.js, Nuxt, SvelteKit, Remix, Astro
  • Gatsby, Redwood, Qwik, Preact, Alpine.js
  • Lit, Stencil, Ember, Backbone, Aurelia
βš™οΈ Backend Frameworks (15+)
  • Express, Fastify, Koa, Hapi, Restify
  • NestJS, AdonisJS, Strapi, Sails.js
  • Meteor, FeathersJS, LoopBack, Total.js
πŸ—„οΈ Databases & ORMs (20+)
  • MongoDB, PostgreSQL, MySQL, SQLite, Redis
  • Prisma, TypeORM, Sequelize, Mongoose, Knex
  • Drizzle, MikroORM, Objection.js, Bookshelf
πŸ› οΈ Build Tools (15+)
  • Vite, Webpack, Rollup, Parcel, esbuild
  • Turbopack, SWC, Snowpack, Browserify
  • Gulp, Grunt, Brunch
πŸ§ͺ Testing Frameworks (15+)
  • Jest, Vitest, Mocha, Jasmine, Karma
  • Cypress, Playwright, Puppeteer, TestCafe
  • Testing Library, Enzyme, Ava, Tape
🎨 Styling Solutions (15+)
  • 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


πŸ‘‹

About

Automatic documentation generator that analyzes your repository and produces structured README files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors