OpenAI has launched its official command-line interface (CLI) designed to interact with the OpenAI REST API. This new tool provides a direct terminal-based method for developers to utilize OpenAI's services, complementing existing API access methods.
Users can install the CLI using Homebrew with `brew install openai/tools/openai`. Alternatively, it can be installed via Go by running `go install 'github.com/openai/openai-cli/cmd/openai@latest'`, requiring Go version 1.26 or later. After installation, users may need to add the Go bin directory to their system's PATH.
The CLI includes features like interactive Tab completion for shells such as Bash, zsh, and fish, which are set up automatically upon the first interactive run. PowerShell maintains normal Tab completion.
The CLI follows a resource-based command structure, using the format `openai <resource> [subresource...] <command> [flags...]`. Access to standard API endpoints requires setting the `OPENAI_API_KEY` environment variable with a valid API key. Admin endpoints necessitate an `OPENAI_ADMIN_API_KEY`.
The CLI includes a mechanism to check for newer stable releases, displaying a plain-text notice below help output at most once every seven days. This check occurs when stdin, stdout, and stderr are terminals. It does not perform automatic updates. Update checks use public GitHub release metadata without API credentials and respect proxy settings. Users can disable update checks by setting `OPENAI_CLI_NO_UPDATE_CHECK=1`.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
OpenAI has released an official command-line interface (CLI) for interacting with its REST API. This tool allows developers to access OpenAI's services directly from the terminal, providing an alternative to programmatic API calls.