{"id":21371358,"url":"https://github.com/shalwin04/docs-gen","last_synced_at":"2026-04-13T20:32:17.516Z","repository":{"id":263874211,"uuid":"891646385","full_name":"shalwin04/Docs-Gen","owner":"shalwin04","description":"This project is a Documentation Generator for local repositories that leverages LangChain, Google Generative AI (Gemini-1.5-flash), and LangGraph to analyze code and generate detailed, high-quality API documentation. The tool processes JavaScript and TypeScript files, splits them into manageable chunks, and generates documentation with suggestions ","archived":false,"fork":false,"pushed_at":"2025-07-23T05:58:07.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T07:31:19.723Z","etag":null,"topics":["agent","gemini","javascript","langchain","langraph","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shalwin04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-20T17:45:21.000Z","updated_at":"2025-07-23T05:58:11.000Z","dependencies_parsed_at":"2024-11-20T19:24:31.446Z","dependency_job_id":"d8727772-a693-4f67-8265-0d6e7764f52f","html_url":"https://github.com/shalwin04/Docs-Gen","commit_stats":null,"previous_names":["shalwin04/docs-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shalwin04/Docs-Gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shalwin04%2FDocs-Gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shalwin04%2FDocs-Gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shalwin04%2FDocs-Gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shalwin04%2FDocs-Gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shalwin04","download_url":"https://codeload.github.com/shalwin04/Docs-Gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shalwin04%2FDocs-Gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000726,"owners_count":26082862,"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-10-08T02:00:06.501Z","response_time":56,"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":["agent","gemini","javascript","langchain","langraph","typescript"],"created_at":"2024-11-22T08:12:43.038Z","updated_at":"2025-10-08T23:11:27.817Z","avatar_url":"https://github.com/shalwin04.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation Generator with LangChain and Google Generative AI\n\nThis project is a **Documentation Generator** for local repositories that leverages **LangChain**, **Google Generative AI (Gemini-1.5-flash)**, and **LangGraph** to analyze code and generate detailed, high-quality API documentation. The tool processes JavaScript and TypeScript files, splits them into manageable chunks, and generates documentation with suggestions for improvement.\n\n---\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Installation](#installation)\n3. [Usage](#usage)\n4. [Configuration](#configuration)\n5. [Technologies Used](#technologies-used)\n6. [File Structure](#file-structure)\n7. [Future Improvements](#future-improvements)\n8. [License: MIT](https://github.com/shalwin04/Docs-Gen?tab=MIT-1-ov-file)\n\n---\n\n## Features\n\n- Automatically loads and analyzes files from a specified directory.\n- Uses Google Generative AI to generate detailed documentation for:\n  - **API Endpoints**\n  - **Functions and Methods**\n  - **Data Models**\n  - **Design Patterns**\n  - **Security Considerations**\n- Includes a reflection step for documentation critique and improvement.\n- Implements LangGraph for iterative workflows.\n- Provides customizable chunk size and overlap for text splitting.\n- Streams results to handle large outputs efficiently.\n\n---\n\n## Usage\n\n### Installation\n\n### Prerequisites\n\nEnsure the following are installed on your machine:\n\n- Node.js (v18+ recommended)\n- npm or yarn\n- Google API Key for Generative AI\n- Unstructured API Key (optional, for advanced text loading)\n\n### Steps\n\n1. Install the package\n   ```bash\n   npm install docs-gen-js-ts\n   ```\n2. RUn the script\n\n   ```bash\n   docs-gen\n   ```\n\n   - The project will scan the specified directory (**process.cwd()** by default), split the documents, and generate API documentation based on the loaded code files.\n\n### Technologies Used\n\n- **LangChain:** Framework for building AI-driven workflows.\n- **Google Generative AI (Gemini):** Generates detailed and insightful documentation.\n- **LangGraph:** Manages iterative workflows with state graphs.\n- **TypeScript:** Ensures type safety and maintainability.\n- **Node.js:** Executes the backend logic.\n\n### Future Improvements\n\n- Add support for more programming languages.\n- Integrate with cloud storage for generated documentation.\n- Improve error handling for edge cases (e.g., large repositories).\n- Enhance the reflection process with additional critique points.\n\nDeveloped by Shalwin.\nIf you have questions or feedback, feel free to reach out!\n\n- **Email** : [shalwinsanju.25cs@licet.ac.in]\n- **Github** : [shalwin04](https://github.com/shalwin04)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshalwin04%2Fdocs-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshalwin04%2Fdocs-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshalwin04%2Fdocs-gen/lists"}