chatgpt-cli
ChatGPT CLI is a powerful, multi-provider command-line interface for working with modern LLMs. It supports OpenAI, Azure, Perplexity, LLaMA, and more, with feat
What is chatgpt-cli?
ChatGPT CLI is a powerful, multi-provider command-line interface for working with modern LLMs. It supports OpenAI, Azure, Perplexity, LLaMA, and more, with features like streaming, interactive chat, prompt files, image/audio I/O, MCP tool calls, and an experimental agent mode for safe, multi-step automation.
Overview of chatgpt-cli
What it is
ChatGPT CLI is a command-line interface for working with modern large language models. It supports multiple providers including OpenAI, Azure, Perplexity, and LLaMA. The tool offers streaming, interactive chat, prompt files, image and audio input/output, MCP tool calls, and an experimental agent mode for multi-step automation with safety and budget controls. It is open source under the MIT license.
Key features
- Multi-provider support: OpenAI, Azure, Perplexity, LLaMA, and others.
- Streaming and interactive chat modes with thread-based context management and sliding window history.
- Agent mode (ReAct + Plan/Execute) with budget limits (time, steps, tokens) and policy enforcement (allowed tools, denied commands, workdir sandboxing).
- MCP (Model Context Protocol) support for calling external tools via HTTP(S) or STDIO, with session management.
- Image and audio I/O: upload, generate, edit images; upload audio for questions; transcribe audio; text-to-speech.
- Prompt file support: use
--promptflag to load initial context from a file. - Advanced configuration: layered config (defaults, config.yaml, environment variables),
--set-flags, and--targetfor switching configurations.
Use cases
Developers and power users who need a flexible CLI to interact with LLMs for tasks such as code review, automated testing, content generation, and data analysis. The agent mode is suitable for multi-step automation with safety constraints, such as running shell commands or file operations within a sandboxed directory. MCP support enables integration with external tools and services. Image and audio features allow processing of multimedia inputs and outputs directly from the terminal.
Getting started
Install via Homebrew on macOS: brew install kardolus/tap/chatgpt-cli For other platforms (Linux, Windows, FreeBSD) or direct downloads, see the repository README. After installation, run chatgpt --help for usage information.
License and pricing
Licensed under the MIT License. The project is open source and free to use.
Based on the project's public README and repository metadata.