openai/openai-cli
Official CLI for the OpenAI API
What it solves
It provides a standardized, official command-line interface (CLI) for interacting with the OpenAI REST API, eliminating the need to write custom scripts or use raw HTTP requests for common API tasks.
How it works
The tool uses a resource-based command structure (openai [resource] <command> [flags]) to map CLI commands to API endpoints. It supports various authentication methods, including standard API keys, admin keys, and mutual TLS (mTLS) for secure communication. It handles file uploads using a specific @ syntax and provides flexible output formatting options (such as JSON, YAML, and readable text) to allow for both human reading and machine parsing.
Who it’s for
Developers and system administrators who want to integrate OpenAI's models and admin tools into their terminal workflows, shell scripts, or automation pipelines.
Highlights
- Resource-based commands: Organized by API resource for intuitive navigation.
- Flexible output: Supports multiple formats including
json, jsonl, yaml, and text for easy piping into other tools.
- Secure authentication: Supports API keys, admin keys, and mutual TLS (mTLS) in beta.
- File handling: Simplified file passing via
@ syntax with automatic filetype sniffing for text vs binary data.
- Data transformation: Built-in support for GJSON syntax to transform and extract specific data from API responses.
- Integrated image saving: Automatically saves generated images to a local directory and provides a preview feature.
Related
- Project
openai/openai-goOfficial Go SDK for OpenAI’s API, offering typed helpers for chat/completions, streaming, tool calls, structured outputs, and WebSocket‑based real‑time interactions.
- Project
openai/openai-nodeOfficial OpenAI Node/TS SDK for calling OpenAI’s REST API – supports text, vision, streaming, realtime, Azure/Bedrock adapters, workload‑identity auth, and webhook verification.
- Project
router-for-me/CLIProxyAPICLI Proxy API is an open‑source proxy server that presents a unified OpenAI‑compatible API for many LLM providers (OpenAI, Gemini, Claude, Grok, Kimi, Meta, etc.). It handles OAuth logins, multi‑account load‑balancing, streaming, function calls, and multimodal inputs, and offers optional dashboards for usage and cost tracking. Ideal for developers with multiple AI subscriptions who want a single local endpoint for their CLI tools.
- Project
open-webui/open-webuiOpen WebUI is an open‑source, self‑hosted web interface for LLMs that works with any OpenAI‑compatible API and with local Ollama models. It provides a rich UI (chat, notes, channels, calendar, voice/video, image generation), extensible plugin system, RBAC, multi‑model support, built‑in RAG (vector DBs, web search), an “Open Terminal” for agents to run code, and enterprise features like LDAP/SSO, SCIM provisioning, and observability. Install via pip, Docker (CPU/GPU, bundled Ollama), or Kubernetes. The ecosystem includes a desktop app, a mobile‑first coding agent, and tools for syncing external knowledge bases.
- Project
openai/openai-openapiA machine-readable OpenAPI 3.1 specification of the OpenAI REST API used to generate typed clients and official SDKs.