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
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)
- Scans project directory and source files
- Parses content (code, comments, old README)
- Generates documentation via Google Gemini
- Saves output in Markdown format
Install via pip:
pip install devDocs
- Python 3.8+
- Google Gemini API Key (get one at Google AI Studio)
Run inside your projectβs root:
devDocs [OPTIONS]
Paste your Gemini API key when prompted.
| 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 |
devDocs --path . \ --name "Cool Dev Tool" \ --description "Generate AI-based READMEs effortlessly" \ --authors "Gantavya Bansal" \ --keywords "cli, docs, automation" \ --output docs \ --overwrite
β
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
- Python 3.8+
google-genai- Built-in:
argparse,os,logging,time
CLI args β Filter files β Extract context β Call Gemini β Write docs
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 '''
- πΆ Requires internet (for Gemini API)
- π Retry logic for failed API calls is minimal
- β Regex not yet supported in filters
- π Only outputs
.mdformat (Markdown)
Released under the MIT License. Use, modify, and share freely β attribution appreciated.
Found a bug or have an idea? Open an issue or submit a PR β contributions are always welcome!