Skip to content

A CLI for talking to ChatGPT, saving conversation logs, and turning code blocks (language agnostic) from it's responses into executable shell commands.

License

Notifications You must be signed in to change notification settings

hwixley/ChatGP-Tea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGP-Tea CLI ☕️

A CLI for talking to ChatGPT, saving conversation logs, and turning code blocks (language agnostic) from it's responses into executable shell commands.


CODEQL License Version


Screenshot from 2023-04-22 19-56-19

Setup

  1. Install the python dependencies:

    pip install -r requirements.txt
    
  2. Create an API key on the OpenAI developer portal.

  3. Replace YOUR_API_KEY in the .env file with your OpenAI API key.
    OR
    You can run the following command: (however this does not get persisted on reboot)

    export OPENAI_API_KEY=<your-api-key>
    
  4. Run the setup script. This will add the gptea alias for your script in .bashrc for easy execution in any directory, and add local directories (generated-scripts/ and conversations/) for saving ChatGPT: generated files or conversations.

    chmod +x setup.sh && source setup.sh
    
  5. You are good to go! 🤠 Run gptea to get started.

List of commands

  1. _ : no input will display the list of commands.
  2. ask : ask ChatGPT: a question without saving any files.
  3. convo : have a continuous conversation with ChatGPT:.
  4. lang <lang-name> : ask ChatGPT: to create a bash script that uses the input language (<lang-name>) under the hood.
    Available <lang-name> values:
    python, bash, javascript, typescript, java, c, c++, c#, rust, swift, go, ruby, php

About

A CLI for talking to ChatGPT, saving conversation logs, and turning code blocks (language agnostic) from it's responses into executable shell commands.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published