← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

OpenAI Releases Official Command-Line Interface (CLI) for its REST API

🔄 Updated 16d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Official CLI for OpenAI REST API released.
  • Installable via Homebrew or Go.
  • Supports resource-based command structure.
  • Requires API keys for standard and admin endpoints.

Official CLI Release

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.

Installation and Setup

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.

Command Structure and Authentication

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`.

Update Mechanism

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 →

The daily brief

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.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

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.