repo-docgen
v2.1.1
Published
π Intelligent documentation generator - Automatically analyze your codebase and generate beautiful, professional README files with zero configuration
Maintainers
Readme
π 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-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
πΈ 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-docgenThat's it! π Your documentation will be generated instantly.
π¦ Global Installation
Install once, use everywhere:
npm install -g repo-docgenThen 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
###  `/api/users`
Get all users
###  `/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
- π 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
π¦ 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
π License
This project is licensed under the ISC License - see the LICENSE file for details.
π¨βπ» Author
Rahul Sharma
π 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
π Related Projects
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
π 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:
- π Documentation
- π Issue Tracker
- π¬ Discussions
- π§ Email Support
π Made with love by developers, for developers
π
