Skip to main content

A utility to convert a Git repository into a text representation.

Project description

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.

Installation & Usage

pip install gpt-repository-loader install the project locally.

Now you'll be able to use the console script gpt-repository-loader with any project.

gpt-repository-loader /path/to/git/repository -c this will copy the content of the project into clipboard which you can directly paste into

You can also now use gpt-repository-loader as a library.

from gpt_repository_loader import git_repo_to_text
repo_text = git_repo_to_text('/path/to/repository')

Contributing

Some context around building this is located here. Appreciate any issues and pull requests in the spirit of having mostly GPT build out this tool. Using ChatGPT Plus is recommended for quick access to GPT-4.

Getting Started with contribution

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
    

    Replace /path/to/git/repository with the path to the Git repository you want to process.

  5. The tool will generate an output.txt file 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.

Running Tests

To run the tests for gpt-repository-loader, follow these steps:

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

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

  3. Run the tests with the following command:

    python -m unittest test_gpt_repository_loader.py
    

Now, the test harness is added to the gpt-repository-loader project. You can run the tests by executing the command python -m unittest test_gpt_repository_loader.py in your terminal.

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpt-repository-loader-0.1.10.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

gpt_repository_loader-0.1.10-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page