devDocs


NamedevDocs JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryAI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API.
upload_time2025-07-26 11:41:21
maintainerNone
docs_urlNone
authorGantavya Bansal
requires_python>=3.8
licenseMIT
keywords cli documentation readme generator google-gemini ai markdown docs-generator auto-readme open-source
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
---

# 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`:

```bash
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`:

1. **Scans your project** – Analyzes directory structure, code files, and existing README files.
2. **Parses content** – Gathers code and documentation from each relevant file/folder.
3. **Generates documentation** – Sends context to Google Gemini API to craft a structured `README.md`.
4. **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:

```bash
pip install devDocs
```

---

## πŸ”‘ Requirements

* **Python 3.8+**
* **Google Gemini API Key**
  Get one from [Google AI Studio](https://aistudio.google.com/).

---

## πŸš€ Usage

Inside the root folder of your project, run:

```bash
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

```bash
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.md` and other structured markdowns
* Overwrite existing README if one exists

---

## 🧠 Features

* βœ… Generates structured, professional `README.md` files automatically
* βœ… Preserves original docs unless `--overwrite` is 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-genai`](https://pypi.org/project/google-generativeai/)
* `argparse`, `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

1. CLI parses args β†’
2. Filters folders/files β†’
3. Reads source + existing docs β†’
4. Calls `GenerateReadMe()` β†’
5. Writes Markdown to output

### API Instruction Logic (Simplified)

```python
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 `.md` output 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!

---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "devDocs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "cli, documentation, readme, generator, google-gemini, ai, markdown, docs-generator, auto-readme, open-source",
    "author": "Gantavya Bansal",
    "author_email": "Gantavya Bansal <gantavyaoo@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/29/69/c22cad120339dd064611268bb81aa5db5b626c4e7e3c745f71a3f48fd1e9/devdocs-1.0.3.tar.gz",
    "platform": null,
    "description": "\n---\n\n# PKG NAME\ud83d\udcd8: `devDocs` \u2013 AI-powered automated project documentation writer \n\n`devDocs` is a **command-line tool** that automatically creates high-quality `README.md` files by analyzing your project\u2019s **folder structure**, **source code**, and any existing documentation. It uses the **Google Gemini API** to generate clear, structured, and professional Markdown documentation.\n\nPerfect for:\n\n* Open-source contributors \ud83d\udca1\n* Developers maintaining internal tools \ud83d\udee0\ufe0f\n* Hackathon projects needing clean docs fast \ud83d\ude80\n\n---\n\n## \ud83d\udcc2 Example Project Structure\n\nHere\u2019s how your project might look before and after using `devDocs`:\n\n```bash\nyour-project/\n\u251c\u2500\u2500 src/\n\u2502   \u251c\u2500\u2500 main.py\n\u2502   \u2514\u2500\u2500 utils.py\n\u251c\u2500\u2500 tests/\n\u251c\u2500\u2500 requirements.txt\n\u251c\u2500\u2500 LICENSE\n\u2514\u2500\u2500 README.md   <-- Generated/Overwritten by devDocs\n```\n\n---\n\n## \u2699\ufe0f How It Works (Behind the Scenes)\n\nHere's what happens when you run `devDocs`:\n\n1. **Scans your project** \u2013 Analyzes directory structure, code files, and existing README files.\n2. **Parses content** \u2013 Gathers code and documentation from each relevant file/folder.\n3. **Generates documentation** \u2013 Sends context to Google Gemini API to craft a structured `README.md`.\n4. **Saves output** \u2013 Writes the generated Markdown into your project (or into a custom output folder).\n\n\ud83d\udd01 Optional features:\n\n* Preserves your original README unless you use `--overwrite`.\n* Includes/excludes specific files or folders with filters.\n\n---\n\n## \ud83d\udce6 Installation\n\nInstall from PyPI:\n\n```bash\npip install devDocs\n```\n\n---\n\n## \ud83d\udd11 Requirements\n\n* **Python 3.8+**\n* **Google Gemini API Key**\n  Get one from [Google AI Studio](https://aistudio.google.com/).\n\n---\n\n## \ud83d\ude80 Usage\n\nInside the root folder of your project, run:\n\n```bash\ndevDocs [OPTIONS]\n```\n\nThe CLI will prompt for your **Google Gemini API key**. Paste it once when asked.\n\n### CLI Options\n\n| Option          | Description                                                   |\n| --------------- | ------------------------------------------------------------- |\n| `--path`        | Root path to scan (default: current directory)                |\n| `--name`        | Project name to display in the README                         |\n| `--description` | Short description for the project                             |\n| `--authors`     | Comma-separated list of authors                               |\n| `--keywords`    | Comma-separated list of keywords (e.g., cli, docs, auto)      |\n| `--overwrite`   | Overwrite existing `README.md` files (default: False)         |\n| `--output`      | Output folder to save generated docs (default: `docs/`)       |\n| `--exclude`     | Comma-separated folders/files/extensions to **exclude**       |\n| `--include`     | Comma-separated folders/files/extensions to **force include** |\n\n---\n\n### \u2705 Example Command\n\n```bash\ndevDocs --path . \\\n        --name \"Cool Dev Tool\" \\\n        --description \"Generate AI-based READMEs effortlessly\" \\\n        --authors \"Gantavya Bansal\" \\\n        --keywords \"cli, docs, automation, openai\" \\\n        --output docs \\\n        --overwrite\n```\n\nThis will:\n\n* Walk through all folders from current directory\n* Create a `docs/README.md` and other structured markdowns\n* Overwrite existing README if one exists\n\n---\n\n## \ud83e\udde0 Features\n\n* \u2705 Generates structured, professional `README.md` files automatically\n* \u2705 Preserves original docs unless `--overwrite` is set\n* \u2705 Supports **include/exclude** filtering for granular control\n* \u2705 Smart project tree visualization included in docs\n* \u2705 Outputs all documentation to a single folder (`--output`)\n* \u2705 Powered by Google Gemini AI (clean & readable Markdown)\n\n---\n\n## \ud83c\udfd7\ufe0f Example Output (Generated)\n\nHere\u2019s a sample snippet of what the generated README might look like:\n\n```\n# Cool Dev Tool\n\nThis is a CLI tool for generating clean README.md files using Google Gemini.\n\n## Folder Structure\nyour-project/\n\u251c\u2500\u2500 src/\n\u2502   \u251c\u2500\u2500 main.py\n\u2502   \u2514\u2500\u2500 utils.py\n\u251c\u2500\u2500 README.md\n...\n\n## Usage\n...\n```\n\n---\n\n## \ud83e\uddf1 Technologies Used\n\n* `Python 3.8+`\n* [`google-genai`](https://pypi.org/project/google-generativeai/)\n* `argparse`, `os`, `logging`, `time` \u2013 for CLI and system interaction\n\n---\n\n## \ud83e\uddf0 Developer Notes\n\nIf you're contributing or extending this project:\n\n### Core Files\n\n| File               | Purpose                                         |\n| ------------------ | ----------------------------------------------- |\n| `cli.py`           | CLI interface + core logic                      |\n| `README.md`        | The README template output (can be regenerated) |\n| `LookFolder()`     | Recursive folder/file scanner                   |\n| `GenerateReadMe()` | Sends data to Gemini and processes results      |\n| `print_tree()`     | Generates folder structure view in tree format  |\n\n### Data Flow\n\n1. CLI parses args \u2192\n2. Filters folders/files \u2192\n3. Reads source + existing docs \u2192\n4. Calls `GenerateReadMe()` \u2192\n5. Writes Markdown to output\n\n### API Instruction Logic (Simplified)\n\n```python\nsystem_instruction = '''\nYou are Gantavya Bansal, a senior engineer and tech writer.\nGenerate clean, professional Markdown documentation using code + structure context.\nInclude:\n- Title\n- Folder Tree\n- Description\n- Usage\n- Tech Stack\n- Known Issues\n- Licensing\n'''\n```\n\n---\n\n## \u26a0\ufe0f Known Limitations\n\n* \ud83d\udce1 Needs an internet connection for Gemini API\n* \ud83d\udd01 Limited retry logic for failed API calls\n* \u2699\ufe0f Include/exclude filters don't yet support regex\n* \ud83d\udcc4 Only supports `.md` output format\n\n---\n\n## \ud83d\udcdc License\n\n**MIT License** \u2013 You\u2019re free to use, modify, and share.\nAttribution is appreciated!\n\n---\n\n## \ud83d\udcac Contributing\n\nFeel free to open issues, suggest improvements, or contribute directly.\nPull requests are always welcome!\n\n---\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API.",
    "version": "1.0.3",
    "project_urls": {
        "Documentation": "https://github.com/bgantavya/devDocs#readme",
        "Homepage": "https://github.com/bgantavya/devDocs",
        "Issues": "https://github.com/bgantavya/devDocs/issues",
        "Repository": "https://github.com/bgantavya/devDocs"
    },
    "split_keywords": [
        "cli",
        " documentation",
        " readme",
        " generator",
        " google-gemini",
        " ai",
        " markdown",
        " docs-generator",
        " auto-readme",
        " open-source"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9b5b1009c91a9e2ef5c9b54e1ba2bf1815a9b1376d37436b8804a3fc13803bd8",
                "md5": "83740289bb7eb4ace4651109eda9dae8",
                "sha256": "53c5a6f8698c32c911646bd48f51555ec7b69f54067bea1d58c2b246af14be65"
            },
            "downloads": -1,
            "filename": "devdocs-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "83740289bb7eb4ace4651109eda9dae8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7564,
            "upload_time": "2025-07-26T11:41:20",
            "upload_time_iso_8601": "2025-07-26T11:41:20.500886Z",
            "url": "https://files.pythonhosted.org/packages/9b/5b/1009c91a9e2ef5c9b54e1ba2bf1815a9b1376d37436b8804a3fc13803bd8/devdocs-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2969c22cad120339dd064611268bb81aa5db5b626c4e7e3c745f71a3f48fd1e9",
                "md5": "590a40f0b439069f93987f53dab45bed",
                "sha256": "cf575cdaa452ac4ca548503292e6692809e9338ac118b2ce178a4e90d78a949d"
            },
            "downloads": -1,
            "filename": "devdocs-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "590a40f0b439069f93987f53dab45bed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7514,
            "upload_time": "2025-07-26T11:41:21",
            "upload_time_iso_8601": "2025-07-26T11:41:21.826353Z",
            "url": "https://files.pythonhosted.org/packages/29/69/c22cad120339dd064611268bb81aa5db5b626c4e7e3c745f71a3f48fd1e9/devdocs-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-26 11:41:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bgantavya",
    "github_project": "devDocs#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "devdocs"
}
        
Elapsed time: 0.64713s