AI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API.
Project description
PKG NAME๐: devDocs โ AI-powered automated project documentation writer
devDocs is a command-line tool that automatically creates high-quality README.md files by analyzing your projectโs folder structure, source code, and any existing documentation. It uses the Google Gemini API to generate clear, structured, and professional Markdown documentation.
Perfect for:
- Open-source contributors ๐ก
- Developers maintaining internal tools ๐ ๏ธ
- Hackathon projects needing clean docs fast ๐
๐ Example Project Structure
Hereโs how your project might look before and after using devDocs:
your-project/
โโโ src/
โ โโโ main.py
โ โโโ utils.py
โโโ tests/
โโโ requirements.txt
โโโ LICENSE
โโโ README.md <-- Generated/Overwritten by devDocs
โ๏ธ How It Works (Behind the Scenes)
Here's what happens when you run devDocs:
- Scans your project โ Analyzes directory structure, code files, and existing README files.
- Parses content โ Gathers code and documentation from each relevant file/folder.
- Generates documentation โ Sends context to Google Gemini API to craft a structured
README.md. - Saves output โ Writes the generated Markdown into your project (or into a custom output folder).
๐ Optional features:
- Preserves your original README unless you use
--overwrite. - Includes/excludes specific files or folders with filters.
๐ฆ Installation
Install from PyPI:
pip install devDocs
๐ Requirements
- Python 3.8+
- Google Gemini API Key Get one from Google AI Studio.
๐ Usage
Inside the root folder of your project, run:
devDocs [OPTIONS]
The CLI will prompt for your Google Gemini API key. Paste it once when asked.
CLI Options
| Option | Description |
|---|---|
--path |
Root path to scan (default: current directory) |
--name |
Project name to display in the README |
--description |
Short description for the project |
--authors |
Comma-separated list of authors |
--keywords |
Comma-separated list of keywords (e.g., cli, docs, auto) |
--overwrite |
Overwrite existing README.md files (default: False) |
--output |
Output folder to save generated docs (default: docs/) |
--exclude |
Comma-separated folders/files/extensions to exclude |
--include |
Comma-separated folders/files/extensions to force include |
โ Example Command
devDocs --path . \
--name "Cool Dev Tool" \
--description "Generate AI-based READMEs effortlessly" \
--authors "Gantavya Bansal" \
--keywords "cli, docs, automation, openai" \
--output docs \
--overwrite
This will:
- Walk through all folders from current directory
- Create a
docs/README.mdand other structured markdowns - Overwrite existing README if one exists
๐ง Features
- โ
Generates structured, professional
README.mdfiles automatically - โ
Preserves original docs unless
--overwriteis set - โ Supports include/exclude filtering for granular control
- โ Smart project tree visualization included in docs
- โ
Outputs all documentation to a single folder (
--output) - โ Powered by Google Gemini AI (clean & readable Markdown)
๐๏ธ Example Output (Generated)
Hereโs a sample snippet of what the generated README might look like:
# Cool Dev Tool
This is a CLI tool for generating clean README.md files using Google Gemini.
## Folder Structure
your-project/
โโโ src/
โ โโโ main.py
โ โโโ utils.py
โโโ README.md
...
## Usage
...
๐งฑ Technologies Used
Python 3.8+google-genaiargparse,os,logging,timeโ for CLI and system interaction
๐งฐ Developer Notes
If you're contributing or extending this project:
Core Files
| File | Purpose |
|---|---|
cli.py |
CLI interface + core logic |
README.md |
The README template output (can be regenerated) |
LookFolder() |
Recursive folder/file scanner |
GenerateReadMe() |
Sends data to Gemini and processes results |
print_tree() |
Generates folder structure view in tree format |
Data Flow
- CLI parses args โ
- Filters folders/files โ
- Reads source + existing docs โ
- Calls
GenerateReadMe()โ - Writes Markdown to output
API Instruction Logic (Simplified)
system_instruction = '''
You are Gantavya Bansal, a senior engineer and tech writer.
Generate clean, professional Markdown documentation using code + structure context.
Include:
- Title
- Folder Tree
- Description
- Usage
- Tech Stack
- Known Issues
- Licensing
'''
โ ๏ธ Known Limitations
- ๐ก Needs an internet connection for Gemini API
- ๐ Limited retry logic for failed API calls
- โ๏ธ Include/exclude filters don't yet support regex
- ๐ Only supports
.mdoutput format
๐ License
MIT License โ Youโre free to use, modify, and share. Attribution is appreciated!
๐ฌ Contributing
Feel free to open issues, suggest improvements, or contribute directly. Pull requests are always welcome!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devdocs-2.0.3.tar.gz.
File metadata
- Download URL: devdocs-2.0.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f1308ef7d21cb2f58cdcd70792cc29db5922d0440ea77908afa98e529c6ab1
|
|
| MD5 |
fb5cb0cb40bbb5b935133d7f71a1a5a7
|
|
| BLAKE2b-256 |
4ff0194fd2b4663f8d90579585db4c572e7817b030fe91c4e0764bb9c1649ebe
|
Provenance
The following attestation bundles were made for devdocs-2.0.3.tar.gz:
Publisher:
publish.yml on bgantavya/devDocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devdocs-2.0.3.tar.gz -
Subject digest:
92f1308ef7d21cb2f58cdcd70792cc29db5922d0440ea77908afa98e529c6ab1 - Sigstore transparency entry: 357818691
- Sigstore integration time:
-
Permalink:
bgantavya/devDocs@b88d481e12094fdcbce3c631e9cd0e7a35483437 -
Branch / Tag:
refs/tags/devDocs-v2.0.3 - Owner: https://github.com/bgantavya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b88d481e12094fdcbce3c631e9cd0e7a35483437 -
Trigger Event:
release
-
Statement type:
File details
Details for the file devdocs-2.0.3-py3-none-any.whl.
File metadata
- Download URL: devdocs-2.0.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e136b4ddaa7dea2ed76b878050c1e9d2b4d96ed483cb66dab3391ffead977789
|
|
| MD5 |
dca2dc15070907337ba15b751bda0a61
|
|
| BLAKE2b-256 |
bd3be84d49227bed38d0e0dc5daf55f273d2f2796701d496bfe328f6ea90e669
|
Provenance
The following attestation bundles were made for devdocs-2.0.3-py3-none-any.whl:
Publisher:
publish.yml on bgantavya/devDocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devdocs-2.0.3-py3-none-any.whl -
Subject digest:
e136b4ddaa7dea2ed76b878050c1e9d2b4d96ed483cb66dab3391ffead977789 - Sigstore transparency entry: 357818711
- Sigstore integration time:
-
Permalink:
bgantavya/devDocs@b88d481e12094fdcbce3c631e9cd0e7a35483437 -
Branch / Tag:
refs/tags/devDocs-v2.0.3 - Owner: https://github.com/bgantavya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b88d481e12094fdcbce3c631e9cd0e7a35483437 -
Trigger Event:
release
-
Statement type: