Description
gptcli is a simple chat client for OpenAI models that runs as a single Python script in your terminal. It defaults to gpt-3.5-turbo, can be set to gpt-4 or gpt-4-32k, and works with any OpenAI-compatible API through a custom base URL, such as Azure OpenAI Service or a proxy server. You put your API key in a config.json file or in the OPENAI_API_KEY environment variable. Each session keeps context at one of three levels: none, previous questions only, or both questions and answers, which trades token cost against how much the model remembers. The client supports streamed output, Markdown rendering with code syntax highlighting, and HTTP, HTTPS, SOCKS4A and SOCKS5 proxies. You can write multiline input with a command, save and load sessions as Markdown or JSON files, and print the tokens used after each reply. The console has tab completion, and the README includes a Docker run option. It suits developers who prefer chatting with OpenAI models from a terminal rather than a web page.…
Highlights
- Single Python script terminal chat client
- Works with OpenAI-compatible APIs and models
- Session context and saved sessions in Markdown or JSON
- Streaming output with Markdown rendering
- HTTP, HTTPS, SOCKS4A and SOCKS5 proxy support
Ratings & Reviews
No ratings yet
Be the first to rate Gptcli.
People also visit
Gptcli FAQ
What do I need to use it?
Python with the packages in requirements.txt, and an OpenAI API key set in conf/config.json or in the OPENAI_API_KEY variable.
Can I use other APIs with it?
Yes. The base URL can point to any OpenAI-compatible server, such as Azure OpenAI Service or a proxy.
Which models does it support?
It defaults to gpt-3.5-turbo and can be set to other chat models, including gpt-4 and gpt-4-32k.
Can I save a conversation?
Yes. Sessions can be saved and loaded as Markdown or JSON files with the .save and .load commands.
Can I run it in Docker?
Yes. The README includes a Docker run section.
What are the best Gptcli alternatives?
Popular alternatives to Gptcli include Chatgpt, TerminalGPT and Chatgpt Web. See all Gptcli alternatives
