Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexkorol/repo2GPT
Repo2GPT is a Python application that clones a GitHub repository and generates a tree diagram of the repository's file structure and a consolidated text file containing all the code files in the repository. This utility can help in quickly understanding the structure of a repository and reviewing its code.
https://github.com/alexkorol/repo2GPT
chatgpt claude-ai cli command-line gpt35turbo gpt4
Last synced: about 10 hours ago
JSON representation
Repo2GPT is a Python application that clones a GitHub repository and generates a tree diagram of the repository's file structure and a consolidated text file containing all the code files in the repository. This utility can help in quickly understanding the structure of a repository and reviewing its code.
- Host: GitHub
- URL: https://github.com/alexkorol/repo2GPT
- Owner: alexkorol
- Created: 2023-06-22T13:05:27.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-22T18:57:34.000Z (5 months ago)
- Last Synced: 2024-08-02T13:26:33.325Z (3 months ago)
- Topics: chatgpt, claude-ai, cli, command-line, gpt35turbo, gpt4
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Repo2GPT
Repo2GPT is a Python application that clones a GitHub repository and generates a detailed repository map (repomap) of the repository's file structure, including classes, methods, and functions in each code file, and a consolidated text file containing all the code files in the repository. This utility can help in quickly understanding the structure of a repository and reviewing its code. This simplifies the process of iterative development using LLMs such as GPT-4. Another use case for it is analyzing a given repo for malicious code using ChatGPT.Repo2GPT can also be used on a local folder containing code if no repo is available for the project you are trying to consolidate.
### Install the Required Packages:
With the virtual environment activated (optional), install the packages listed in `requirements.txt`:
```bash
pip install -r requirements.txt
```## Usage
With everything set up, you can now use Repo2GPT:
```bash
python main.py
```Replace `` with the URL of the repository you want to clone and analyze, or a local directory path you want to analyze.
Repo2GPT will generate a detailed repository map named `repomap.txt` and a consolidated text file containing all the code in the repository named `consolidated_code.txt`.
## Future plans
* Add ASM Traversal and mapping similar to ctags.
* Web version or VS Code Extension.
* Account for ignoring more types of irrelevant metadata files.
* Fix some of the encoding errors when consolidating certain readme.md files.
* Better identification of code files and non-code files.## License
Repo2GPT is licensed under the terms of the MIT license. See [LICENSE](LICENSE) for more details.