Convert code repos into an LLM prompt-friendly format. Forked from https://github.com/zackees/gptrepo
Project description
gptify
gptify
is a command-line tool that transforms a Git repository into a single text file suitable for use with Large Language Models (LLMs) like ChatGPT. It preserves the file structure and content, enabling LLMs to understand and process the codebase for tasks such as code review, documentation generation, and answering questions about the code. This project is a fork of gptrepo with added features specifically designed for the miniogre devtool.
Relevance
This tool addresses the challenge of effectively using LLMs with codebases. By converting a repository into a digestible format, gptify
allows developers to leverage the power of LLMs for various development tasks. Within the miniogre project, it plays a crucial role in facilitating AI-driven code understanding and interaction.
Installation
The easiest way
pip install gptify
.
gptify
can also be installed using pipx
:
poetry build && pipx install dist/*.whl
You can also uninstall older versions using the provided install script: ./install.sh
.
Usage
After installation, navigate to the root directory of your Git repository and run:
gptify
This command will generate a file named gptify_output.txt
in the current directory containing the formatted repository content. You can then copy and paste the contents of this file into a ChatGPT session to interact with your codebase.
Options
--output <filename>
: Specifies the name of the output file (default:gptify_output.txt
).--clipboard
: Copies the output directly to the clipboard, omitting the output file creation.--openfile
: Opens the output file after creation using the default system application.--preamble <filepath>
: Prepends a custom preamble to the output file.
Example with custom output file:
gptify --output my_repo.txt
This will generate my_repo.txt
with the processed repository data.
Contributing
While contributions are welcome, the focus of this fork is on specific features for miniogre, and responses to pull requests might be delayed.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gptify-0.3.6.tar.gz
.
File metadata
- Download URL: gptify-0.3.6.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf4543eb2806148a0c949ca52c3385484ddcedd3b70587db1f5c98280600627d |
|
MD5 | d033ffcd01c6156cb0e3ac55dcfcacf3 |
|
BLAKE2b-256 | a79169cb237c68ec971ded8de65d0b8f98910886a3442099c20b6196dfb61d9e |
File details
Details for the file gptify-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: gptify-0.3.6-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db0ddc097d39c10b868c5d081a24310162e864d685aa55e740d6f2440b9452a8 |
|
MD5 | b5a5d855d6898ad9fb2135af15d811aa |
|
BLAKE2b-256 | 28869e64fd023bec68e5b321f46932ea9efc02a4f75a5630dfdbb94f5c10906f |