openai's python client includes a cli actually - im not sure if its really documented anywhere.
$ openai api chat.completions.create -g 'user' 'say hello' -m 'gpt-3.5-turbo'
$ Hello! How can I assist you today?