Skip to content

Convert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.

License

Notifications You must be signed in to change notification settings

amakhnev/gpt-repository-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpt-repository-loader

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.

Requirements

You'll need following dependencies with Python.

pip install tiktoken

Getting Started

To get started with gpt-repository-loader, follow these steps:

  1. Ensure you have Python 3 installed on your system.

  2. Clone or download the gpt-repository-loader repository.

  3. Navigate to the repository's root directory in your terminal.

  4. 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.

  5. 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Convert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%