AI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API.
Project description
๐ 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
- Scans project directory and source files
- Parses content (code, comments, old README)
- Generates documentation via Google Gemini
- Saves output in Markdown format
๐ฆ Installation
Install via pip:
pip install devDocs
๐ Requirements
- Python 3.8+
- Google Gemini API Key (get one at Google AI Studio)
๐ 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
.mdformat (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!
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-3.0.0.tar.gz.
File metadata
- Download URL: devdocs-3.0.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d18ea9ba47048dacf291511486a50853322f52c8dc2db3b6c279b80ef0c0474
|
|
| MD5 |
581359f7ba1afac3212c2fddf6c1697d
|
|
| BLAKE2b-256 |
df0528f6692798545a4506b51260cea68c9c45fec12f0290f7f68b1dc4c8344c
|
Provenance
The following attestation bundles were made for devdocs-3.0.0.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-3.0.0.tar.gz -
Subject digest:
0d18ea9ba47048dacf291511486a50853322f52c8dc2db3b6c279b80ef0c0474 - Sigstore transparency entry: 1205040769
- Sigstore integration time:
-
Permalink:
bgantavya/devDocs@901ba40a162c25aaed7def8685e1b46ed2afc188 -
Branch / Tag:
refs/tags/devDocs-v3.0.0 - Owner: https://github.com/bgantavya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@901ba40a162c25aaed7def8685e1b46ed2afc188 -
Trigger Event:
release
-
Statement type:
File details
Details for the file devdocs-3.0.0-py3-none-any.whl.
File metadata
- Download URL: devdocs-3.0.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2551ed0e8bf4d1e00afbbc08baec3252c22a6411f95a736014ac402e32e52d16
|
|
| MD5 |
d020adb5435b82bc41b2aaff0458d428
|
|
| BLAKE2b-256 |
6025b5cdbd5d7e42dd42b3e985b2735ca4bf4c7dcd67f5c711ccd7c78d250f1f
|
Provenance
The following attestation bundles were made for devdocs-3.0.0-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-3.0.0-py3-none-any.whl -
Subject digest:
2551ed0e8bf4d1e00afbbc08baec3252c22a6411f95a736014ac402e32e52d16 - Sigstore transparency entry: 1205040922
- Sigstore integration time:
-
Permalink:
bgantavya/devDocs@901ba40a162c25aaed7def8685e1b46ed2afc188 -
Branch / Tag:
refs/tags/devDocs-v3.0.0 - Owner: https://github.com/bgantavya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@901ba40a162c25aaed7def8685e1b46ed2afc188 -
Trigger Event:
release
-
Statement type: