gpt-repository-loader
is a command-line tool that converts the contents of a Git repository into a text format, preserving the structure of the files and file contents. The generated output can be interpreted by AI language models, allowing them to process the repository's contents for various tasks, such as code review or documentation generation.
You'll need following dependencies with Python.
pip install tiktoken
To get started with gpt-repository-loader
, follow these steps:
-
Ensure you have Python 3 installed on your system.
-
Clone or download the
gpt-repository-loader
repository. -
Navigate to the repository's root directory in your terminal.
-
Run
gpt-repository-loader
with the following command:python gpt_repository_loader.py /path/to/git/repository [-o /path/to/output_files/]
Replace
/path/to/git/repository
with the path to the Git repository you want to process. Optionally, you can specify an output folder path with -o. If not specified, the default output folder is data/, with prompt.txt containing ititial prompt and repository_i.txt containing repository content. -
The tool will generate repository_i.txt files containing the text representation of the repository. You can now use this file as input for AI language models or other text-based processing tasks.
This project is licensed under the MIT License - see the LICENSE file for details.