Skip to main content

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


Download files

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

Source Distribution

gptify-0.4.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gptify-0.4.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file gptify-0.4.0.tar.gz.

File metadata

  • Download URL: gptify-0.4.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for gptify-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1f558695cd337ddd3981f7c75a3e4aae370c2440158190d6fd2cb41d039c8c7d
MD5 ddd0d4db4ce31755ede872112045bee7
BLAKE2b-256 cd5326679ce0f03cb384769d2f666fc8f50f148e07a3b499b8e3d46419cd99fc

See more details on using hashes here.

File details

Details for the file gptify-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: gptify-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for gptify-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bf406ccbbf332f5b7562e90e2b5e8515fcbecd8ac272bdafed4f99e90010f61
MD5 64f016d4e2b3712a7de9bd34f71e7603
BLAKE2b-256 44f49573a791e79da7f09615dc2a3ac78bed2ab242e412f59d7006177f643bfc

See more details on using hashes here.

Supported by

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