Quick & dirty CLI clone of ChatGPT that requires an OpenAI key.
Allows you to experiment with the API and various techniques such as preprocessing, postprocessing, and chaining, and so on
- *nix terminal or WSL for Windows
- Docker
- VS Code with
devcontainers
extension installed - An OpenAI API key
- Clone this repository from your terminal:
git clone git@github.com:bill-c-martin/chatgpt-cli-clone.git
- Open in VS Code:
cd chatgpt-cli-clone && code .
- Open the VS Code command pallete (
Ctrl+Shift+P
) and enteringDev Containers: Reopen in container
- Open a new terminal window within VS Code itself
- Run
npm install
- Add your OpenAI key to an
OPENAI_API_KEY
variable in a newly-created.env
file, replacingyour-key-here
with your actual OpenAI API key:
echo "OPENAI_API_KEY=your-key-here" > .env
- Finally, start the ChatGPT CLI clone by runnning:
node index.js