~kmaasrud/shatgpt

shitty shell chatgpt

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~kmaasrud/shatgpt
read/write
git@git.sr.ht:~kmaasrud/shatgpt

You can also use your local clone with git send-email.

shatgpt - ChatGPT in the shell


DESCRIPTION:

shatgpt is a simple shell script client for the ChatGPT chatbot. it is written
in pure POSIX shell and only depends on curl.


INSTALLING:

1. clone this git repo

2. make sure you have curl installed on your system.

3. run the following command to install the script:

     $ make install

   this will install the script to the default location: /usr/local/bin. use the
   'PREFIX' and 'DESTDIR' variables to customize the installation path.

   note that administrative privileges may be required for the installation,
   depending on the chosen installation directory.

4. you need an OpenAI API key stored in the $OPENAI_API_KEY environment
   variable. you can get one at https://platform.openai.com/account/api-keys.


USAGE:

run shatgpt with any prompt, and an answer will be generated for you. only the
response is printed to stdout, so you can use it in scripts or pipe it if you
want. if you want to generate a shell command, use the `-s` or `--shell` flag.
if you want to edit the prompt in your preferred editor, add the `-e` or
`--edit` flags.


UNINSTALLING:

1. open a terminal and navigate to the cloned git repo.

2. run the following command to uninstall the script:

     $ make uninstall