mirror of
https://github.com/0xacx/chatGPT-shell-cli.git
synced 2025-02-22 18:55:29 +00:00
chatgpt.sh | ||
README.md |
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.
Getting Started
Prerequisites
This script relies on curl for the requests to the api and jq to parse the json response.
Installation
- Create an account and get a free API Key at OpenAI
- To add the key to your enviroment variables, you need to add this line to your
~/.bash_profile
or~/.zprofile
.export OPENAI_TOKEN=yourkey
- Clone the repo
git clone https://github.com/0xacx/chatgptcli.git
Usage
Run the script
./chatgptcli/chatgpt.sh