OpenAI ships an official Go CLI for its REST API, separate from Codex
The Apache-2.0 tool covers images, files, batches, models and responses, plus admin usage data with its own key.
Output defaults to readable text with JSON, JSONL, raw and YAML options, and --transform extracts fields with GJSON syntax. Setting OPENAI_UNTRUSTED_STDIN=1 blocks reading files from piped input.
Install by Homebrew, release binary or Go 1.26.
What it is
The openai-cli repository is the official command-line tool for the OpenAI REST API, written in Go. Commands mirror API resources: images generate, files upload, batches create and wait, models list, responses create, and admin organization usage. Admin endpoints use a separate OPENAI_ADMIN_KEY. The README points to the Terraform provider for infrastructure management and limits pull requests to collaborators.
Confusion about what it is for
Many commenters asked what the tool is. One explained the split:
"codex: OpenAI's agent harness." — a commenter explaining the difference from Codex
A developer with a similar tool compared notes:
"I've been working on something in a similar class for about a year called llcat" — the builder of llcat, a similar LLM command-line tool
Scripting use is the point: --transform plus JSONL output turns a batch job into a shell pipeline without a Python dependency.
Get breakdowns like this every day
The top Hacker News stories, unpacked — by email, Telegram, or RSS.
Ear clipping beat Delaunay six times over on 3.7 million map polygons
A map renderer's Delaunay triangulator needed 2.93 seconds for one zoom level of the Masovian Voivodeship; the replacement finishes in 489 ms.