Skip to main content

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

  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!


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

devdocs-3.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devdocs-3.0.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

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

Hashes for devdocs-3.0.0.tar.gz
Algorithm Hash digest
SHA256 0d18ea9ba47048dacf291511486a50853322f52c8dc2db3b6c279b80ef0c0474
MD5 581359f7ba1afac3212c2fddf6c1697d
BLAKE2b-256 df0528f6692798545a4506b51260cea68c9c45fec12f0290f7f68b1dc4c8344c

See more details on using hashes here.

Provenance

The following attestation bundles were made for devdocs-3.0.0.tar.gz:

Publisher: publish.yml on bgantavya/devDocs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for devdocs-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2551ed0e8bf4d1e00afbbc08baec3252c22a6411f95a736014ac402e32e52d16
MD5 d020adb5435b82bc41b2aaff0458d428
BLAKE2b-256 6025b5cdbd5d7e42dd42b3e985b2735ca4bf4c7dcd67f5c711ccd7c78d250f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for devdocs-3.0.0-py3-none-any.whl:

Publisher: publish.yml on bgantavya/devDocs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page