Skip to content

jbaron34/chatgpt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT

ChatGPT is a command-line interface for interacting with OpenAI chat language models. It allows you to chat with an AI assistant powered by the GPT-3.5 Turbo model, designed to help you with programming tasks.

Installation

You can install ChatGPT from PyPI using pip:

pip install chatgpt

Usage

To use ChatGPT, you need to have an OpenAI API key. If you don't have one, you can sign up for one here.

Once you have your API key, you can set it as an environment variable:

export OPENAI_API_KEY=your_api_key_here

Or you can enter it when prompted by ChatGPT.

To start a chat session with the AI assistant, run the following command:

chatgpt

You can also pass filepaths or globlike strings as arguments to ChatGPT, which will be included in the snapshot of your workspace that is sent to the AI assistant. For example:

chatgpt myfile.py myfolder/*.txt

By default, ChatGPT will show the filenames and contents of the files that are included in the snapshot. If you only want to see the filenames, you can use the --filenames-only flag:

chatgpt --filenames-only myfile.py myfolder/*.txt

You can also choose to only show the contents of the files that are included in the snapshot using the --content flag:

chatgpt --content myfile.py myfolder/*.txt

During the chat session, you can type "quit" to exit the program. You can also type "show" to see a list of all the messages that have been sent during the chat session.

Development

To install the development dependencies, run:

pip install -r requirements-dev.txt

You can run the tests using:

pytest

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages