Description
chatgpt is a terminal console client for ChatGPT, written in Go. It uses OpenAI's Chat Completions API with streaming output and keeps conversation memory across questions in a session. You choose the model with --model or the OPENAI_MODEL variable, and you can set a custom base URL with --base-url or OPENAI_BASE_URL, which the README says works with Azure OpenAI or other OpenAI-compatible services. For one-shot or scripted use, pass a prompt with -p, or pipe text in, and piped text is added to the prompt. Inside a session you can set a system prompt, reset the conversation, save and load conversations as JSON, and attach an image with /image. The client shows token usage and an estimated cost when the API reports usage, colors code blocks, and lets you press Ctrl+C to interrupt a streaming answer. A timeout can be set with a flag. You need an API key from OpenAI, supplied as API_KEY or OPENAI_API_KEY. The project is installed with go get and is public on GitHub under kkdai.…
Highlights
- Streaming chat with multi-turn memory
- Choose the model and an OpenAI-compatible base URL
- One-shot prompts and piped input
- Save and load conversations as JSON
- Token usage and estimated cost
Ratings & Reviews
No ratings yet
Be the first to rate Chatgpt.
People also visit
Chatgpt FAQ
What is this client?
A terminal console client for ChatGPT, written in Go, that uses OpenAI's Chat Completions API.
What do I need?
An OpenAI API key, set as API_KEY or OPENAI_API_KEY, and the client installed with go get.
Can I use Azure OpenAI or another service?
Yes. The --base-url option, or OPENAI_BASE_URL, points the client at Azure OpenAI or another OpenAI-compatible service.
How do I use it without a chat session?
Pass a prompt with -p or pipe text in. Piped input without -p is sent as a single prompt.
Can I save conversations?
Yes. /save and /load store conversations as JSON files. /save will not overwrite an existing file unless you use --force.
What are the best Chatgpt alternatives?
Popular alternatives to Chatgpt include TerminalGPT, Tgpt and Chat. See all Chatgpt alternatives