OpenAI's official CLI lets you call its API straight from the terminal
OpenAI has an official command-line tool, openai, for calling its REST API without writing an app. From a terminal or a shell script you can generate and save images, upload and download files, submit batch jobs and wait for the results, and export data as JSON for other scripts. With a separate admin key it can also pull your organisation's usage. It is open source (Apache 2.0) and installs through Homebrew, Go or prebuilt binaries for macOS, Linux and Windows. The README says to use Codex CLI instead when you want an agent to work on code; this tool is for direct API calls.
On Hacker News (229 points, 109 comments from 16 top-level commenters when we read it), the biggest camp was confused: several asked how it differs from Codex, and two said the README never says plainly what it is for. The most-replied comment warned that OpenAI tends to deprecate its tools within a couple of years, and two others said a tool like this is trivial to build yourself. A smaller camp welcomed it, with one commenter explaining that Codex is an agent while this is a thin layer over the API. No consensus, though the lean was sceptical.
Sorted take: handy for scripted batch jobs and usage checks. Keep those scripts simple in case the tool changes.
Why it matters: If you run batch jobs, make images in bulk or want a quick usage check, a few lines of shell script can now do it without custom code. You need an API key to use it.
OpenAI on GitHub ↗Discussion on Hacker News ↗AI-assisted, reviewed by Sorted AI
▲ 0
0 comments