Creating good documentation is hard β but what if your README.md
wrote itself?
Introducing the AI-Powered README Generator, a command-line tool that uses Google's Generative AI (Gemini) and LangChain to generate detailed and structured README.md
files for public GitHub repositories.
π Say goodbye to boring READMEs. Let AI do the heavy lifting.
π§ What It Does
Given a GitHub repository URL, this tool:
- Connects to the GitHub API to fetch repository contents
- Understands the file structure and purpose
- Uses a Large Language Model (via LangChain + Gemini)
- Generates a professional-quality
README.md
file β automatically! - Updates/Creates the
README.md
file in the github repo if you own it
π§ Why Use It?
This tool is perfect for:
β
Instantly generating initial READMEs for new projects
β
Refreshing stale documentation with up-to-date content
β
Learning how to integrate LLMs with external APIs in a real-world scenario
π¦ Installation
Here's how you can get it up and running in 5 steps:
- Clone the repo
git clone https://github.com/kanugurajesh/DocMind
cd DocMind
- Set up a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Setup .env file
βοΈ How to Use
Just run the main.py script with the GitHub repository URL:
python main.py https://github.com/octocat/Spoon-Knife
π It will generate a README_generated.md file in your current directory with the AI-crafted content.
β¨ Features
π€ LLM-Powered Documentation β Uses Gemini through LangChain to generate context-aware, high-quality markdown.
π GitHub Integration β Fetches the file structure using PyGithub.
π» CLI Tool β Simple and effective to use right from your terminal.
π Modular Codebase β Cleanly separated into agents and utils.
π Environment-Based Secrets β Uses .env for secure API key handling.
π§ͺ Example
Want to try it on a real-world repo?
python main.py https://github.com/{username}/{repo_name}
Check your project folder β you'll find a brand new README_generated.md waiting for you βοΈ
Github :- https://github.com/kanugurajesh/DocMind
Top comments (0)