{"id":31051744,"url":"https://github.com/kanugurajesh/docmind","last_synced_at":"2026-05-18T09:04:26.174Z","repository":{"id":305634595,"uuid":"1022701158","full_name":"kanugurajesh/DocMind","owner":"kanugurajesh","description":"Agent to generate automatic documentation for a github repo","archived":false,"fork":false,"pushed_at":"2025-07-21T08:54:29.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-15T00:52:32.586Z","etag":null,"topics":["documentation","gemini-api","github-api","langchain","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanugurajesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-19T16:32:09.000Z","updated_at":"2025-09-06T02:25:08.000Z","dependencies_parsed_at":"2025-07-21T08:49:04.989Z","dependency_job_id":null,"html_url":"https://github.com/kanugurajesh/DocMind","commit_stats":null,"previous_names":["kanugurajesh/docmind"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kanugurajesh/DocMind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanugurajesh%2FDocMind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanugurajesh%2FDocMind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanugurajesh%2FDocMind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanugurajesh%2FDocMind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanugurajesh","download_url":"https://codeload.github.com/kanugurajesh/DocMind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanugurajesh%2FDocMind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276368198,"owners_count":25629974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","gemini-api","github-api","langchain","python3"],"created_at":"2025-09-15T00:52:30.129Z","updated_at":"2025-09-22T08:05:23.300Z","avatar_url":"https://github.com/kanugurajesh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Powered README Generator\n\nThis project provides a command-line tool that leverages Large Language Models (LLMs) and GitHub's API to automatically generate detailed `README.md` files for public GitHub repositories. By analyzing the repository's file structure and content, the tool aims to produce a comprehensive README that describes the project, its installation, usage, and features.\n\n## Description\n\nThe `AI-Powered README Generator` is designed to streamline the documentation process for developers. Given a GitHub repository URL, it connects to GitHub to fetch the repository's file list and structure. This information, along with the project's context, is then fed into a sophisticated LLM (powered by Google's Generative AI via LangChain) to synthesize a well-structured and informative `README.md`.\n\nThis tool is particularly useful for:\n*   Quickly generating initial READMEs for new projects.\n*   Updating existing READMEs with fresh content based on current repository structure.\n*   Learning how to integrate LLMs with external APIs for practical applications.\n\n## Installation\n\nTo set up and run this project, follow these steps:\n\n1.  **Clone the repository:**\n    ```bash\n    git clone \u003crepository_url\u003e\n    cd \u003crepository_name\u003e\n    ```\n    (Replace `\u003crepository_url\u003e` and `\u003crepository_name\u003e` with the actual details of this project's repository.)\n\n2.  **Create a virtual environment (recommended):**\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows: `venv\\Scripts\\activate`\n    ```\n\n3.  **Install the required dependencies:**\n    ```bash\n    pip install -r requirements.txt\n    ```\n    *(Note: A `requirements.txt` file is not explicitly provided in the file list, but the dependencies can be inferred from the code. You would typically create one with: `langchain-google-genai`, `PyGithub`, `python-dotenv`)*\n    \n    If `requirements.txt` is missing, manually install:\n    ```bash\n    pip install langchain-google-genai PyGithub python-dotenv\n    ```\n\n4.  **Set up your Google Gemini API Key:**\n    The project uses Google's Generative AI. You need to obtain an API key from Google AI Studio.\n    \n    Create a `.env` file in the root directory of the project and add your API key:\n    ```\n    GOOGLE_API_KEY=\"YOUR_GEMINI_API_KEY_HERE\"\n    ```\n    Replace `\"YOUR_GEMINI_API_KEY_HERE\"` with your actual API key.\n\n5.  **Ensure Prompt File Exists:**\n    The `doc_agent.py` script expects a prompt file at `prompts/readme_prompt.txt`. You will need to create this directory and file, and populate it with a suitable prompt for the LLM.\n\n    Example `prompts/readme_prompt.txt` content (you can customize this extensively):\n    ```\n    You are an expert technical writer. Your task is to generate a comprehensive and engaging README.md for a GitHub repository.\n\n    The repository name is: {repo_name}\n    The list of files and their descriptions (where available) in the repository is:\n    {file_list}\n\n    Based on this information, generate a detailed README.md file that includes:\n    - A clear and concise description of the project.\n    - Installation instructions.\n    - Usage examples.\n    - Key features.\n    - Contributing guidelines.\n    - Licensing information.\n\n    Focus on clarity, accuracy, and user-friendliness. Use markdown formatting.\n    ```\n\n## Usage\n\nTo generate a README for a GitHub repository, run the `main.py` script from your terminal, providing the GitHub repository URL as an argument:\n\n```bash\npython main.py \u003cgithub_repo_url\u003e\n```\n\n**Example:**\n\n```bash\npython main.py https://github.com/octocat/Spoon-Knife\n```\n\nAfter execution, a new file named `README_generated.md` will be created in the root directory of this project, containing the generated README content.\n\n## Features\n\n*   **AI-Powered Generation**: Leverages Google's Generative AI through LangChain to create contextually relevant READMEs.\n*   **GitHub Integration**: Fetches repository file structures directly from GitHub using the PyGithub library.\n*   **Command-Line Interface**: Simple and intuitive command-line usage for quick README generation.\n*   **Modular Design**: Separates concerns into `agents` (for AI logic) and `repo_utils` (for GitHub interactions).\n*   **Environment Variable Support**: Securely loads API keys using `python-dotenv`.\n\n## Example Code\n\nTo demonstrate how to run the tool, here's the typical command you would execute:\n\n```bash\n# Generate a README for the 'langchain-ai' repository by LangChain\npython main.py https://github.com/{username}/{repo_name}\n```\n\nUpon successful execution, a file named `README_generated.md` will appear in the current directory, containing the newly generated documentation.\n\n## Contributing\n\nContributions are welcome! If you have suggestions for improvements, bug fixes, or new features, please feel free to:\n\n1.  **Fork the repository.**\n2.  **Create a new branch** (`git checkout -b feature/YourFeature` or `fix/BugFix`).\n3.  **Make your changes.**\n4.  **Commit your changes** (`git commit -m 'Add YourFeature'`).\n5.  **Push to your branch** (`git push origin feature/YourFeature`).\n6.  **Open a Pull Request.**\n\nPlease ensure your code adheres to good practices and includes relevant tests if applicable.\n\n## License\n\nThis project is open-sourced under the MIT License. See the `LICENSE` file (if present, or assume MIT if none is explicitly provided) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanugurajesh%2Fdocmind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanugurajesh%2Fdocmind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanugurajesh%2Fdocmind/lists"}