Transform your codebase into stunning, professional documentation in seconds with zero configuration
π Quick Start β’ β¨ Features β’ π Demo β’ π― Use Cases β’ βοΈ CLI Options β’ π€ Contributing
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!
|
Generate complete docs in <5 seconds |
Smart detection of 100+ frameworks |
No setup, no config files needed |
npx repo-docgenThat'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
|
Before π |
After π |
- π― 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 |
No installation required! Run directly with npx:
npx repo-docgenThat's it! π Your documentation will be generated instantly.
Install once, use everywhere:
npm install -g repo-docgenThen run in any project:
docgenNavigate to your project and run:
cd your-awesome-project
npx repo-docgen# 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 --overwriteAfter 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
π 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
###  `/api/users`
Get all users
###  `/api/users`
Create new user|
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 |
Handle complex multi-package structures with ease. Detects workspaces and generates unified documentation. Example: cd my-monorepo
npx repo-docgen
# Analyzes all packages automatically |
|
Document existing projects quickly without manual effort. Great for inherited codebases. Example: cd legacy-project
npx repo-docgen --overwrite
# Fresh docs in seconds |
Create contributor-friendly documentation that encourages collaboration. Example: npx repo-docgen
# Professional docs ready for GitHub |
| 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 |
# 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 --helpgraph 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
- π Recursive Scanning - Traverses entire project directory structure
- π¦ Package Analysis - Reads all
package.jsonfiles (root + sub-projects) - π Tech Detection - Identifies frameworks, libraries, and tools from dependencies
- ποΈ Architecture Classification - Determines if project is frontend, backend, full-stack, or monorepo
- π API Extraction - Scans code for API routes and endpoints
- π Dependency Merging - Combines dependencies from all packages
- β¨ Doc Generation - Creates beautiful, structured markdown documentation
| 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 |
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
No config files, no setup, no learning curve:
npx repo-docgen # That's it! β¨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
| Metric | Value |
|---|---|
| β‘ Average Generation Time | < 5 seconds |
| π¦ Package Size | Lightweight & Fast |
| π― Frameworks Detected | 100+ |
| π API Routes Extracted | Unlimited |
| π Project Types Supported | 5+ |
We love contributions! Here's how you can help make repo-docgen even better:
Found a bug? Open an issue with:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
Have an idea? Share it with us by:
- Describing the feature
- Explaining the use case
- Providing examples
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 RequestHelp others by:
- Fixing typos
- Adding examples
- Improving clarity
- Translating docs
This project is licensed under the ISC License - see the LICENSE file for details.
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
Explore other awesome documentation tools:
- readme-md-generator - Interactive README generator with CLI prompts
- auto-readme - Simple and lightweight README generator
- documentation.js - JSDoc-based API documentation generator
- readme-so - Online README editor with live preview
- shields.io - Badge generator for your README
Special thanks to:
- π All contributors who helped improve this project
- π‘ The open-source community for inspiration
- π Everyone who uses and supports repo-docgen
Need help? We're here for you:
- π Documentation
- π Issue Tracker
- π¬ Discussions
- π§ Email Support