diff --git a/devDocs.egg-info/PKG-INFO b/devDocs.egg-info/PKG-INFO index 34b3ee3..d30d931 100644 --- a/devDocs.egg-info/PKG-INFO +++ b/devDocs.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: devDocs -Version: 2.0.3 +Version: 2.0.7 Summary: AI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API. Author: Gantavya Bansal Author-email: Gantavya Bansal @@ -34,21 +34,21 @@ Dynamic: requires-python --- -# PKG NAMEπŸ“˜: `devDocs` – AI-powered automated project documentation writer +# πŸ“˜ `devDocs` – AI-Powered README Generator -`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. +`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**. -Perfect for: +Powered by the **Google Gemini API**, it's ideal for: -* Open-source contributors πŸ’‘ -* Developers maintaining internal tools πŸ› οΈ -* Hackathon projects needing clean docs fast πŸš€ +* πŸ’‘ Open-source contributors +* πŸ› οΈ Internal dev tools +* πŸš€ Hackathon projects needing docs fast --- -## πŸ“‚ Example Project Structure +## πŸ“‚ Example Project Layout -Here’s how your project might look before and after using `devDocs`: +Before and after running `devDocs`: ```bash your-project/ @@ -58,30 +58,29 @@ your-project/ β”œβ”€β”€ tests/ β”œβ”€β”€ requirements.txt β”œβ”€β”€ LICENSE -└── README.md <-- Generated/Overwritten by devDocs +β”œβ”€β”€ docs/ # ← Generated by devDocs +└── README.md # ← Overwritten by devDocs (if chosen) ``` --- -## βš™οΈ How It Works (Behind the Scenes) +## βš™οΈ How It Works -Here's what happens when you run `devDocs`: +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 -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 -πŸ” Optional features: - -* Preserves your original README unless you use `--overwrite`. -* Includes/excludes specific files or folders with filters. +* Preserve existing README (unless `--overwrite` is set) +* Include/exclude specific files or folders via filters --- ## πŸ“¦ Installation -Install from PyPI: +Install via pip: ```bash pip install devDocs @@ -91,128 +90,84 @@ pip install devDocs ## πŸ”‘ Requirements -* **Python 3.8+** -* **Google Gemini API Key** - Get one from [Google AI Studio](https://aistudio.google.com/). +* Python 3.8+ +* Google Gemini API Key (get one at [Google AI Studio](https://aistudio.google.com/)) --- ## πŸš€ Usage -Inside the root folder of your project, run: +Run inside your project’s root: ```bash devDocs [OPTIONS] ``` -The CLI will prompt for your **Google Gemini API key**. Paste it once when asked. +Paste your **Gemini API key** when prompted. ### 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** | +| 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 Command +### βœ… Example ```bash devDocs --path . \ --name "Cool Dev Tool" \ --description "Generate AI-based READMEs effortlessly" \ --authors "Gantavya Bansal" \ - --keywords "cli, docs, automation, openai" \ + --keywords "cli, docs, automation" \ --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. +## 🧠 Key Features -## Folder Structure -your-project/ -β”œβ”€β”€ src/ -β”‚ β”œβ”€β”€ main.py -β”‚ └── utils.py -β”œβ”€β”€ README.md -... - -## Usage -... -``` +βœ… 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 --- -## 🧱 Technologies Used +## 🧱 Tech Stack -* `Python 3.8+` +* Python 3.8+ * [`google-genai`](https://pypi.org/project/google-generativeai/) -* `argparse`, `os`, `logging`, `time` – for CLI and system interaction +* Built-in: `argparse`, `os`, `logging`, `time` --- -## 🧰 Developer Notes +## πŸ› οΈ Dev Notes -If you're contributing or extending this project: +### Workflow -### 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 +``` +CLI args β†’ Filter files β†’ Extract context β†’ Call Gemini β†’ Write docs +``` -### API Instruction Logic (Simplified) +### API Prompt Template ```python system_instruction = ''' -You are Gantavya Bansal, a senior engineer and tech writer. -Generate clean, professional Markdown documentation using code + structure context. +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 @@ -226,25 +181,24 @@ Include: --- -## ⚠️ Known Limitations +## ⚠️ 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 +* πŸ“Ά 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 -**MIT License** – You’re free to use, modify, and share. -Attribution is appreciated! +Released under the **MIT License**. Use, modify, and share freely β€” attribution appreciated. --- -## πŸ’¬ Contributing +## 🀝 Contribute -Feel free to open issues, suggest improvements, or contribute directly. -Pull requests are always welcome! +Found a bug or have an idea? +Open an issue or submit a PR β€” contributions are always welcome! --- diff --git a/devDocs.egg-info/entry_points.txt b/devDocs.egg-info/entry_points.txt index 8f786ac..fa5e6cd 100644 --- a/devDocs.egg-info/entry_points.txt +++ b/devDocs.egg-info/entry_points.txt @@ -1,2 +1,2 @@ [console_scripts] -devDocs = devDocs.cli:x +devDocs = devDocs.cli:y diff --git a/dist/devdocs-2.0.3-py3-none-any.whl b/dist/devdocs-2.0.3-py3-none-any.whl deleted file mode 100644 index bbb55f5..0000000 Binary files a/dist/devdocs-2.0.3-py3-none-any.whl and /dev/null differ diff --git a/dist/devdocs-2.0.3.tar.gz b/dist/devdocs-2.0.3.tar.gz deleted file mode 100644 index 187cf53..0000000 Binary files a/dist/devdocs-2.0.3.tar.gz and /dev/null differ diff --git a/dist/devdocs-2.0.7-py3-none-any.whl b/dist/devdocs-2.0.7-py3-none-any.whl new file mode 100644 index 0000000..e1f947c Binary files /dev/null and b/dist/devdocs-2.0.7-py3-none-any.whl differ diff --git a/dist/devdocs-2.0.7.tar.gz b/dist/devdocs-2.0.7.tar.gz new file mode 100644 index 0000000..24929b3 Binary files /dev/null and b/dist/devdocs-2.0.7.tar.gz differ diff --git a/pyproject.toml b/pyproject.toml index 564ad75..300701c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "devDocs" -version = "2.0.3" +version = "2.0.7" description = "AI-powered CLI tool that builds professional '*.md' documentation files of a project for internal teams using the Google Gemini API." readme = "README.md" requires-python = ">=3.8" @@ -49,7 +49,7 @@ Issues = "https://github.com/bgantavya/devDocs/issues" Documentation = "https://github.com/bgantavya/devDocs#readme" [project.scripts] -devDocs = "devDocs.cli:x" +devDocs = "devDocs.cli:y" [tool.setuptools] packages = ["devDocs"] diff --git a/setup.py b/setup.py index 3facbfd..c3e4c98 100644 --- a/setup.py +++ b/setup.py @@ -1,2 +1,2 @@ from setuptools import setup,find_packages as A -setup(name='devDocs',version='2.0.3',packages=A(),install_requires=['google-generativeai'],entry_points={'console_scripts':['devDocs=devDocs.cli:x']},author='Gantavya Bansal',description="Auto-generate Project's markdown documentation using Gemini AI for Internal teams.",long_description=open('README.md',encoding='utf-8').read(),long_description_content_type='text/markdown',license='MIT',python_requires='>=3.8',classifiers=['Programming Language :: Python :: 3','License :: OSI Approved :: MIT License']) \ No newline at end of file +setup(name='devDocs',version='2.0.7',packages=A(),install_requires=['google-generativeai'],entry_points={'console_scripts':['devDocs=devDocs.cli:y']},author='Gantavya Bansal',description="Auto-generate Project's markdown documentation using Gemini AI for Internal teams.",long_description=open('README.md',encoding='utf-8').read(),long_description_content_type='text/markdown',license='MIT',python_requires='>=3.8',classifiers=['Programming Language :: Python :: 3','License :: OSI Approved :: MIT License']) \ No newline at end of file