Image: GitHub
Why it mattersA supported CLI makes small OpenAI API calls scriptable without pulling in a language SDK, so an engineer can test a prompt, upload a file or inspect usage from a shell script that runs anywhere Go runs.
Anyone calling the OpenAI API from a shell script has, until now, either used curl or installed the Python SDK for the one line it carries. OpenAI is now putting its name on a stand-alone command-line binary that does both jobs. The repository at github.com/openai/openai-cli carries 1,004 stars, 83 forks and an Apache 2.0 licence, and the latest tag is v1.40.2. A Hacker News submission reached 206 points by the time of writing.
The project has moved through more than forty tagged versions since its first commit, so the news is less that it exists and more that OpenAI is treating it as the shape it wants to settle on. The README calls it "The official CLI for the OpenAI REST API" and installs through Homebrew (brew install openai/tools/openai) or Go 1.26 or later. There is no npm or pip install path: the binary is a single Go program.
What it covers
Commands follow a resource then action pattern, for example openai responses create --input "Say this is a test" --model gpt-5.5, or openai files upload "upload space.txt" --purpose user_data, or openai images generate --prompt "A tiny orange robot". The image command writes files to ~/Downloads/gpt-images/ by default and prints the paths. The CLI picks the model gpt-image-2.5-sunburst when the user does not name one. The admin surface is also present: openai admin organization usage completions reads usage data when run with an admin key in OPENAI_ADMIN_KEY. Authentication reads OPENAI_API_KEY, OPENAI_ADMIN_KEY, OPENAI_ORG_ID and OPENAI_PROJECT_ID from the environment.
Output is readable text by default and switches to json, jsonl, yaml or raw with --format, including in pipes. The README documents a --transform flag that extracts fields with GJSON syntax, so a user can get back a single field from a JSON response without piping to jq. mTLS client certificates, custom base URLs and arbitrary request headers are all available on the command line.
What the discussion flagged
The Hacker News thread is 96 comments, and most of the top ones are critical. One commenter wrote that OpenAI's own documentation shows curl and the new CLI "are roughly as verbose" for several examples. Others pointed at ambiguity in the help text and raised the standard "yet another CLI" complaint. OpenAI already carried a thin CLI inside its Python SDK, so the move to a stand-alone Go binary cuts the Python dependency for anyone who wanted the OpenAI API from a shell script and did not want to install the SDK first.
The tool does not replace Codex, Claude Code, Aider or any other coding agent. There is no interactive chat, no project context, no file-tree reading. It is a thin wrapper on the REST API, the way aws is a wrapper on the AWS API. For a team that has been calling curl inside a build step, or carrying the Python SDK into a container to call the chat completions endpoint from one script, this is the lighter option.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.

