OpenAI has released an official command-line tool for its API, and the project page on GitHub (openai/openai-cli) lays out what it does. In plain terms, you type a command in a terminal window and the tool sends your request to OpenAI and shows the answer. Quick tests no longer require a script.
Mac users who have Homebrew can install it by running brew install openai/tools/openai. The other route is Go, the programming language, which needs version 1.26 or later and a single go install command. The README adds that the program lands in a Go folder ($HOME/go/bin by default), and that you may need to add that folder to your PATH if the command is not found.
Every command follows the same pattern: the OpenAI resource you want, then the action, then options. Standard requests need an API key stored in the OPENAI_API_KEY variable. The README’s first example asks the responses endpoint to answer “Say this is a test” using the model gpt-5.5. A separate admin key, OPENAI_ADMIN_KEY, unlocks organization endpoints, and the example there pulls usage figures for a chosen time window, grouped by day.
Help is built in and, according to the README, works with no API key and no network connection. Typing openai alone lists command groups by task, and adding --help to any command shows its full page.
Results print as readable text by default, even when piped into another program. Scripts that need structured data can ask for --format json or jsonl, and a --transform option pulls out specific fields using GJSON syntax.
File handling is covered too. You can upload a local file with a stated purpose, look up its details, and download it again to a path you choose. Images get the most polish: openai images generate --prompt "A tiny orange robot" saves the pictures into a gpt-images folder under Downloads and prints where they went. When you name no model, the tool picks gpt-image-2.5-sunburst. The old create-variation command is retired, so the README says to use images edit with a prompt instead.
Several settings speak to companies rather than hobbyists. A mutual TLS option, where the client proves its identity with a certificate, is labeled beta and requires joining an OpenAI program first. Custom headers can be passed on the command line or through an environment variable, and the README steers anyone handling secrets toward the second option so credentials stay out of shell history. An untrusted-stdin mode stops piped data from making the tool read local files. The debug flag carries a warning: its logs include request and response bodies, so they should not be shared if they hold sensitive content.
The tool also checks for newer releases. The README says a bare openai run in a terminal looks for an update at most every seven days, never installs one on its own, and can be switched off by setting the variable OPENAI_CLI_NO_UPDATE_CHECK to 1. A first interactive run may also quietly save Tab shortcuts for an image picker in Bash, zsh and fish.
The project is licensed under Apache 2.0 with a 2026 copyright held by OpenAI. Bug reports and feature requests go through GitHub issues, but only repository collaborators may submit pull requests. Teams hoping to patch the tool themselves cannot; they can only file the request and wait for OpenAI to act.
From the openai/openai-cli README published by OpenAI on GitHub, which carries no publication date.