{"id":15696737,"url":"https://github.com/tomkat-cr/ai_readme_generator","last_synced_at":"2025-07-27T01:04:57.779Z","repository":{"id":177855959,"uuid":"660968397","full_name":"tomkat-cr/ai_readme_generator","owner":"tomkat-cr","description":"AI Readme Generator reads any Git repository and suggests a README.md or a Pytest-based test file from the repository code, using Langchain and OpenAI GPT-4 or GPT-3.5-turbo.","archived":false,"fork":false,"pushed_at":"2024-03-04T01:21:14.000Z","size":187,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T23:31:40.233Z","etag":null,"topics":["ai","gpt-3","gpt-4","langchain-python","openai-api","pytest","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomkat-cr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-07-01T11:20:54.000Z","updated_at":"2025-02-06T15:53:43.000Z","dependencies_parsed_at":"2024-10-24T02:11:53.513Z","dependency_job_id":"4ecc44d1-32ec-4f87-8331-0d63237708ba","html_url":"https://github.com/tomkat-cr/ai_readme_generator","commit_stats":null,"previous_names":["tomkat-cr/ai_readme_generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomkat-cr/ai_readme_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkat-cr%2Fai_readme_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkat-cr%2Fai_readme_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkat-cr%2Fai_readme_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkat-cr%2Fai_readme_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomkat-cr","download_url":"https://codeload.github.com/tomkat-cr/ai_readme_generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkat-cr%2Fai_readme_generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267278631,"owners_count":24063252,"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-07-26T02:00:08.937Z","response_time":62,"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":["ai","gpt-3","gpt-4","langchain-python","openai-api","pytest","python3"],"created_at":"2024-10-03T19:09:49.602Z","updated_at":"2025-07-27T01:04:57.762Z","avatar_url":"https://github.com/tomkat-cr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai_readme_generator\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://socialify.git.ci/tomkat-cr/ai_readme_generator/image?description=0\u0026amp;font=Inter\u0026amp;language=1\u0026amp;name=1\u0026amp;owner=1\u0026amp;pattern=Plus\u0026amp;stargazers=0\u0026amp;theme=Light\" alt=\"project-image\"\u003e\u003c/p\u003e\n\nAI Readme Generator reads a Github repository and suggest a README.md file based on that code using Langchain and OpenAI's GPT4.\n\nMain functionalities of this project are listed below:\n\n1. The script clones a given repo from its url or local path, and fetches file content and metadata.\n2. The content and metadata fetched are then passed to GPT-4 model to generate the README suggestion.\n3. It can filter out files based on their extensions.\n4. The script can also work in debug mode. In debug mode, the script provides more detailed output logs.\n\n## Usage\n\nPlease note, in order to use this script, you will need the `OPENAI_API_KEY`.\n\nTo use the script from command line, please use the following template and fill in the relevant details:\n\n```bash\npipenv run python -m ai_readme_generator.main -h\n```\n\n```bash\nusage: main.py [-h] [-u REPO_URL] [-b BRANCH] [-e FILE_EXT_FILTER] [-m {gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,gpt-4-32k}]\n               [-t TEMPERATURE] [-D DEBUG]\n\nAI README Generator\n\noptions:\n  -h, --help            show this help message and exit\n  -u REPO_URL, --repo_url REPO_URL\n                        Git repository URL or local path\n  -b BRANCH, --branch BRANCH\n                        Repository branch name. Default: main\n  -e FILE_EXT_FILTER, --file_ext_filter FILE_EXT_FILTER\n                        Filter the files based on their extensions. For instance: 'py,md', 'js,jsx' or 'php'\n  -m {gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,gpt-4-32k}, --model {gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,gpt-4-32k}\n                        GPT model. Default: gpt-3.5-turbo-16k\n  -t TEMPERATURE, --temperature TEMPERATURE\n                        Temperature for the GPT model. Default: 0.7\n  -D DEBUG, --debug DEBUG\n                        Show debug information\n```\n\n- `REPO_URL`: repository URL for which you want to generate README. It is a mandatory parameter. This can be also a local path, so repo won't be cloned in the `/tmp` directory.\n\n- `BRANCH`: It is the branch of the repo from which you want to generate README. This is an optional parameter, the `main` branch will be used by default if no branch is specified.\n\n- `FILE_EXT_FILTER`: It is to filter the files based on their extensions. For instance: `py,md`, `js,jsx` or `php`. This is an optional parameter, all files will be used if no filter is given.\n\nFor instance,\n\n```bash\npipenv run python -m ai_readme_generator.main -u https://github.com/bard/ai-assistant -b main -e py,md\n```\n\n## Dependencies\n\nFollowing Python libraries are required:\n- git (Repo)\n- langchain.document_loaders (GitLoader)\n- openai\n- os, sys\n- dotenv (load_dotenv)\n- pprint\n\n## Installation Steps\n\n1. Clone the repo:\n\n```\ngit clone https://github.com/tomkat-cr/ai_readme_generator\n```\n\n2. Change the directory:\n\n```\ncd ai_readme_generator\n```\n\n3. Start the virtual environment:\n\n```\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n4. Install requirements:\n\n```\npip install -r requirements.txt\n```\n\n5. Create the .env file:\n\n```\ncp .env-example .env\nvi .env\n```\n\n6. Configure parameters:\n\n```\nOPENAI_API_KEY=sk-XXXXXX\nDEBUG=0\n```\n\n7. Run it (it'll ask for git repo URL/local path and branch):\n\n```\npipenv run python -m ai_readme_generator.main\n```\n\n8. or run it with repo URL/path and branch\n\n```\npipenv run python -m ai_readme_generator.main -u https://github.com/tomkat-cr/ai_readme_generator -b main\n```\n\n## Note\n\nPlease be aware that script will not attempt to delete or modify any files or directories outside of its designated working area.\n\nEnjoy exploring the project!\n\n## Contributions\n\nFeel free to submit pull requests create issues or spread the word.\n\n## Built with\n\nTechnologies used in the project:\n\n- python3\n- openai\n- langchain\n- gitpython\n- pipenv\n- make\n\n## License\n\nThis project is licensed under the GNU 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomkat-cr%2Fai_readme_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomkat-cr%2Fai_readme_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomkat-cr%2Fai_readme_generator/lists"}