Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bgantavya/devDocs

Repository files navigation


πŸ“˜ devDocs – AI-Powered README Generator

devDocs is a command-line tool that automatically generates clean, professional README.md files by analyzing your project structure, source code, and any existing documentation.

Powered by the Google Gemini API, it's ideal for:

  • πŸ’‘ Open-source contributors
  • πŸ› οΈ Internal dev tools
  • πŸš€ Hackathon projects needing docs fast

πŸ“‚ Example Project Layout

Before and after running devDocs:

your-project/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ code
β”‚ └── s/es
β”œβ”€β”€ tests/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ LICENSE
β”œβ”€β”€ docs/ # ← Generated by devDocs
└── README.md # ← Overwritten by devDocs (if chosen)

βš™οΈ How It Works

  1. Scans project directory and source files
  2. Parses content (code, comments, old README)
  3. Generates documentation via Google Gemini
  4. Saves output in Markdown format

πŸ“¦ Installation

Install via pip:

pip install devDocs

πŸ”‘ Requirements


πŸš€ Usage

Run inside your project’s root:

devDocs [OPTIONS]

Paste your Gemini API key when prompted.

CLI Options

Option Description
--path Root folder to scan (default: .)
--name Project name to display in the README
--description Short project summary
--authors Comma-separated list of authors
--keywords Comma-separated keywords (e.g., cli, docs, ai)
--overwrite Overwrite existing README.md (default: False)
--output Output folder (default: docs/)
--exclude Comma-separated paths/extensions to exclude
--include Comma-separated paths/extensions to force include

βœ… Example

devDocs --path . \
 --name "Cool Dev Tool" \
 --description "Generate AI-based READMEs effortlessly" \
 --authors "Gantavya Bansal" \
 --keywords "cli, docs, automation" \
 --output docs \
 --overwrite

🧠 Key Features

βœ… Auto-generates structured README.md βœ… Respects original files unless --overwrite βœ… Fine-grained include/exclude control βœ… Generates a visual folder tree βœ… Clean output in a dedicated --output folder βœ… Backed by Google Gemini for high-quality results


🧱 Tech Stack

  • Python 3.8+
  • google-genai
  • Built-in: argparse, os, logging, time

πŸ› οΈ Dev Notes

Workflow

CLI args β†’ Filter files β†’ Extract context β†’ Call Gemini β†’ Write docs

API Prompt Template

system_instruction = '''
You are Gantavya Bansal, a senior engineer and technical writer.
Generate professional Markdown documentation using context from code and folder structure.
Include:
- Title
- Folder Tree
- Description
- Usage
- Tech Stack
- Known Issues
- Licensing
'''

⚠️ Limitations

  • πŸ“Ά Requires internet (for Gemini API)
  • πŸ” Retry logic for failed API calls is minimal
  • ❌ Regex not yet supported in filters
  • πŸ“„ Only outputs .md format (Markdown)

πŸ“œ License

Released under the MIT License. Use, modify, and share freely β€” attribution appreciated.


🀝 Contribute

Found a bug or have an idea? Open an issue or submit a PR β€” contributions are always welcome!


About

CLI tool based agentic documentation builder for internal teams using Google Gemini for content generation shipped in markdown language (py3-linux)

Topics

Resources

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /