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/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ””โ”€โ”€ utils.py
โ”œโ”€โ”€ 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

Optional Features

  • Preserve existing README (unless --overwrite is set)
  • Include/exclude specific files or folders via filters

๐Ÿ“ฆ 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-2.0.6.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

devdocs-2.0.6-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file devdocs-2.0.6.tar.gz.

File metadata

  • Download URL: devdocs-2.0.6.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for devdocs-2.0.6.tar.gz
Algorithm Hash digest
SHA256 e69cd49be5c42823f568e8a4c271f3fe418ff736148b90a921b4587db898cb72
MD5 94de6644f773844aa84cd9ad9a043c06
BLAKE2b-256 edbe577cfb46454adea196818c5682491f1b529c0ab0b8b99d561c572cb3a1f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for devdocs-2.0.6.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-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: devdocs-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for devdocs-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b58608d969aa39c76172a9365c7bbfff44e45e8433901e7c82aaa4fb35c9fb22
MD5 79b2c0adfecd310adab9a3f8c4070ced
BLAKE2b-256 ae85ae9ec0a92d4367505e68bbfe2cc6f2b710377f845359c85b7601a6f05e59

See more details on using hashes here.

Provenance

The following attestation bundles were made for devdocs-2.0.6-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