OpenAI publishes an official command-line tool for its API
OpenAI published openai-cli on GitHub, which it calls the official CLI for the OpenAI REST API. It is written in Go (1.26 or later to build from source), licensed under Apache 2.0, and installs with brew install openai/tools/openai or go install. Pull requests are limited to repository collaborators.
According to its README:
- Commands follow
openai <resource> [subresource...] <command>, for exampleopenai responses create --input "Say this is a test" --model gpt-5.5. Standard endpoints useOPENAI_API_KEY; admin endpoints such as organization usage useOPENAI_ADMIN_KEY. - JSON responses print as readable text by default;
--format jsonorjsonlgives machine-readable output, and--transformextracts fields with GJSON syntax. openai images generatesaves images to~/Downloads/gpt-images/and usesgpt-image-2.5-sunburstby default.images create-variationis retired; useimages editwith a GPT Image model instead.- It supports mutual TLS (a beta program), custom headers, a
--base-urloverride, and an untrusted-stdin mode that stops@filereferences in piped input from reading local files. - A bare
openaichecks for newer releases at most once every seven days;OPENAI_CLI_NO_UPDATE_CHECK=1turns that off. - The first eligible interactive run saves image-picker Tab shortcuts for Bash, zsh and fish.
Sumber
- OpenAI CLIHacker News · 60 komentar
Dapatkan berita seperti ini lewat push.
AI Tracker memberi tahu Anda saat ada perubahan pada alat yang Anda pakai.