Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

OpenAI CLI

$ openai Official Med Risk
OpenAI · AI & Media · Apache-2.0 · macos / linux / windows

OpenAI CLI (openai) is OpenAI's official Go command-line interface for the OpenAI REST API, covering Responses, Audio/Speech, Images, Batches, Files, and Vector Stores. It supports --format json / jsonl / yaml / raw, OPENAI_API_KEY / OPENAI_BASE_URL env configuration, and flag-per-parameter invocation.

FCRS-1.0 Score
90 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install openai/tools/openai
CLI vs MCP Decision CLI Only

openai maps directly to OpenAI REST endpoints with --format json and zero Node/Python runtime dependencies.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

First-class --format json / jsonl, strict non-interactive flag mapping, OPENAI_CLI_NO_UPDATE_CHECK=1 suppression, and fast Go startup.

  • Global --format json and --format jsonl across all resource subcommands
  • Fast single-binary Go CLI with non-interactive flags
Trust & Safety 20 / 25

Uses standard OPENAI_API_KEY / OPENAI_ADMIN_KEY env vars cleanly, though write/create commands execute billed API calls without a --dry-run flag.

  • Env-based API key isolation; direct remote API mutations incur billing
Setup & Portability 14 / 15

Single static Go binary available via Homebrew, go install, and GitHub releases for macOS, Linux, and Windows.

  • Distributed via brew install openai/tools/openai, go install, and releases
Utility & Efficiency 13 / 15

Full REST API coverage (responses, audio, images, batches, vector stores) plus OPENAI_BASE_URL proxy routing.

  • Covers Responses, Audio, Images, Batches, Files, and Vector Stores
Maintenance & Lineage 10 / 10

Official first-party openai/openai-cli repository under Apache-2.0.

  • Official first-party openai/openai-cli repo (Apache-2.0)
Docs & Verifiability 9 / 10

Self-describing --help across resources and official OpenAI CLI documentation.

  • Comprehensive --help and official repository documentation

Security, Auth & Guardrails

Auth Modes
Env API Key
Credential Storage

Reads OPENAI_API_KEY and OPENAI_ADMIN_KEY from environment variables (with optional OPENAI_BASE_URL override).

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

Apache-2.0 open-source Go CLI; all API calls are billed to the configured OPENAI_API_KEY organization.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# OpenAI CLI Agent Rules
- Always pass `--format json` and set `OPENAI_CLI_NO_UPDATE_CHECK=1` for clean parsing.
- Confirm before running `batches create`, `files delete`, or large media generation calls, as API usage is billed immediately.

Agent-Ready Command Recipes

Safe Read-Only Queries

List available OpenAI models as JSON
OPENAI_CLI_NO_UPDATE_CHECK=1 openai --format json models list

Queries available OpenAI models in strict JSON without update-check noise.

Inspect batch jobs as JSON
openai --format json batches list

Lists active and completed Batch API jobs in JSON format.

Controlled Writes & Previews

Create a single-turn response in JSON
openai --format json responses create --model gpt-4o-mini --input "Return OK"

Executes one bounded API call and outputs the raw JSON response envelope.

Strengths for Agents

  • + Fast single Go binary with --format json / jsonl and OPENAI_BASE_URL support.
  • + Comprehensive, auto-aligned flag coverage for OpenAI REST resources.

Caveats & Pitfalls

  • ! No --dry-run flag; responses create, images, audio, and batches immediately incur API charges.
  • ! Requires OPENAI_CLI_NO_UPDATE_CHECK=1 in strict CI/agent pipelines to prevent update notices.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI