{"id":39137393,"url":"https://github.com/jrazi/repo2file4gpt","last_synced_at":"2026-01-17T21:26:59.796Z","repository":{"id":212981138,"uuid":"732717187","full_name":"jrazi/repo2file4gpt","owner":"jrazi","description":"This project aims to convert the content of GitHub repositories into a structured, machine-readable format, enabling AI models like ChatGPT to utilize them as a knowledge base.","archived":false,"fork":false,"pushed_at":"2024-05-13T07:21:42.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-13T08:33:07.788Z","etag":null,"topics":["collaborate","github","github-copilot","gitkraken","gpt","information-retrieval","knowledge-base","llm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrazi.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}},"created_at":"2023-12-17T15:56:27.000Z","updated_at":"2024-05-13T07:40:05.000Z","dependencies_parsed_at":"2024-04-20T18:33:28.273Z","dependency_job_id":null,"html_url":"https://github.com/jrazi/repo2file4gpt","commit_stats":null,"previous_names":["jrazi/repo2file4gpt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jrazi/repo2file4gpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrazi%2Frepo2file4gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrazi%2Frepo2file4gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrazi%2Frepo2file4gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrazi%2Frepo2file4gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrazi","download_url":"https://codeload.github.com/jrazi/repo2file4gpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrazi%2Frepo2file4gpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28518625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["collaborate","github","github-copilot","gitkraken","gpt","information-retrieval","knowledge-base","llm"],"created_at":"2026-01-17T21:26:59.686Z","updated_at":"2026-01-17T21:26:59.767Z","avatar_url":"https://github.com/jrazi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📁 repo2file4gpt\n\n## Expanding LLMs Knowledge through Public Codebases\n\nrepo2file4gpt facilitates the ingestion of open source GitHub repositories into AI systems, unlocking a vast set of technical knowledge for machine learning.\n\nBy structuring and aggregating content in an indexed markdown format, repo2file4gpt prepares the harvested open source intelligence for direct integration into large language models and Q\u0026A systems. The full hierarchy from the original GitHub tree is preserved to retain useful context.\n\n## Installation\n\nYou can install repo2file4gpt directly from PyPI:\n\n```bash\npip install repo2file4gpt\n```\n\n## Quick Start\n\n### Command Line Interface\n\nAfter installing repo2file4gpt, you can use it from the command line as follows:\n\n```bash\nrepo2file4gpt --token YOUR_GITHUB_TOKEN --repos user/repo1 user/repo2 --filetypes py js --output_dir ./outputs/\n```\n\nReplace `YOUR_GITHUB_TOKEN` with your actual GitHub token, and `user/repo1` and `user/repo2` with the actual repositories you want to process.\n\n### Python Code\n\nYou can also use repo2file4gpt in your Python code:\n\n```python\nimport repo2file4gpt\n\n# Specify the GitHub token, list of repositories, file types, and output directory\ntoken = \"YOUR_GITHUB_TOKEN\"\nrepos = [\"user/repo1\", \"user/repo2\"]\nfiletypes = [\"py\", \"js\"]\noutput_dir = \"./outputs/\"\n\n# Create a RepositoryScraper instance\nprocessor = repo2file4gpt.RepositoryScraper(token, filetypes, repo2file4gpt.LINE_LIMITS, output_dir)\n\n# Process the repositories\nprocessor.process_repositories(repos)\n```\n\nAgain, replace `YOUR_GITHUB_TOKEN` with your actual GitHub token, and `user/repo1` and `user/repo2` with the actual repositories you want to process.\n\n## TODO\n\n- Add support for more file types.\n- Improve error handling for robustness.\n- Optimize performance for large repositories.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrazi%2Frepo2file4gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrazi%2Frepo2file4gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrazi%2Frepo2file4gpt/lists"}