Skip to main content

gpt repository loader

Project description

gpt-repository-loader

This is a package of the very excellent gpt-repository-loader by mpoon.

Usage

pip install gptrepo
gptrepo  # now output.txt should appear in the current directory

This tool concatenates through all the files in teh repo and adds ai prompts which can be used for chat gpt conversations.

This will be particularly useful when chat gpt4-32k is release. Right now this will only work on very small repos.

Linting

MacOS_Tests Ubuntu_Tests Win_Tests

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.

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

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

gptrepo-1.0.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

gptrepo-1.0.0-py2.py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 2 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