chatgpt-cli-zsh
v1.0.1
Published
A ChatGPT CLI integration for MacOS terminal
Readme
chatGPT CLI
Simple ChatGPT integration for the MacOS terminal. Useful for simple queries without breaking terminal workflow.
Accepts multi-line input. Always end prompt with " --".
Setup:
Install package.
npm i -g chatgpt-cli-zshAdd your OpenAI API key as a global environment variable in the terminal.
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.zshrcReload your terminal config.
source ~/.zshrcCreate an alias for the CLI so it starts up on 'chat'.
echo 'alias chat="node /path/to/main.js"' >> ~/.zshrcReload your terminal config.
source ~/.zshrcOPTIONALLY: Change the default model on line 17 of main.js. The default model is 'ChatGPT3.5 turbo'.
model: 'gpt-3.5-turbo',