Talk to ChatGPT in your terminal.
- Streams responses like ChatGPT.
- Maintains context in conversation.
- Supports piping and redirection.
These instructions are for MacOS/Linux only.
- Run
./build-and-install.sh
- Make sure
/usr/local/bin
is inside your$PATH
- Run
chatgpt
to get started
For Windows run cargo build --release
and run the binary manually. I'm not really sure how to do the equivalent in Windows.
chatgpt --clear
rm /usr/local/bin/chatgpt
> chatgpt --help
ChatGPT CLI
Usage: chatgpt [PROMPT] [OPTIONS]
Options:
-h, --help Prints help information
-c, --clear Clears the API key from the config
Examples:
chatgpt --help
chatgpt --clear
chatgpt "How do I write quick sort in Typescript?"
chatgpt < prompt.txt
echo "Hi!" | chatgpt
I made this because most of the CLI apps that intergrated with OpenAI's chat completion did not maintain context in conversation. Each prompt started a new one.
This one will keep the context of the conversation just like https://chat.openai.com does (unless you pipe or redirect in a file).
MIT