Go to file
2022-12-14 21:38:38 +02:00
chatgpt.sh Add cli script 2022-12-14 17:49:48 +02:00
README.md Update README.md 2022-12-14 21:38:38 +02:00

shell

Chatgptcli

A simple shell script to use OpenAI's chatgpt from the terminal without installing python or node. The script uses the completion endpoint and the text-davinci-003 model.

Screenshot

Getting Started

Prerequisites

This script relies on curl for the requests to the api and jq to parse the json response.

  • curl
    brew install curl
    
  • jq
    brew install jq
    

Installation

  1. Create an account and get a free API Key at OpenAI
  2. To add the key to your enviroment variables, you need to add this line to your ~/.bash_profile or ~/.zprofile.
    export OPENAI_TOKEN=yourkey
    
  3. Clone the repo
    git clone https://github.com/0xacx/chatgptcli.git
    

Usage

Run the script ./chatgptcli/chatgpt.sh