GitHub - openai/openai-cli: Official CLI for the OpenAI API
The official CLI for the OpenAI REST API.
Installation
Installing with Homebrew
brew install openai/tools/openai
Installing with Go
To test or install the CLI locally, you need Go version 1.26 or later installed.
go install 'github.com/openai/openai-cli/cmd/openai@latest'
Once you have run go install, the binary is placed in your Go bin directory:
Default location: $HOME/go/bin (or $GOPATH/bin if GOPATH is set)
Check your path: Run go env GOPATH to see the base directory
If commands aren't found...
Read more at github.com