The GPT CLI tool facilitates interactions between GPT (Generative Pre-trained Transformer) models and GitHub repositories. It streamlines the process of cloning repositories, managing your OpenAI API key, and sending prompts to GPT using the contents of the cloned repositories.
To get started with gpt-cli
, follow these steps:
- Clone the
gpt-cli
repository to your local machine. - Install the required Python dependencies by executing
pip install -r requirements.txt
in your terminal.
Set up your OpenAI API key by running:
python gpt.py config
You will be prompted to enter your OpenAI API key, which will be stored securely for future use.
Clone a GitHub repository into the local sources
directory with the following command:
python gpt.py clone <repository-url>
Send a custom prompt to GPT using the content from one or more specified source directories:
python gpt.py prompt --src "source_directory1" --src "source_directory2" "Your prompt text"
The GPT response will be displayed in the terminal and also saved within the responses
directory for your reference.
- Cloned repositories are stored in the
sources
directory. - GPT responses are saved in the
responses
directory.