peterdemin / openai-cli

Command-line client for OpenAI APIs
MIT License
155 stars 30 forks source link

not accepting --token flag #4

Closed rrshaban closed 1 year ago

rrshaban commented 1 year ago

I'm noting that the CLI requires the interface to be "openai repl -t KEY" in the examples below, I tried "openai -t key repl" and it would fail uninformatively

% openai repl  
Usage: openai repl [OPTIONS]
Try 'openai repl --help' for help.

Error: Either --token option or OPENAI_API_TOKEN environment variable must be provided
% openai --token '<...>' repl
Usage: openai [OPTIONS] COMMAND [ARGS]...
Try 'openai --help' for help.

Error: No such option: --token

% openai -t '...' repl Usage: openai [OPTIONS] COMMAND [ARGS]... Try 'openai --help' for help.

Error: No such option: -t

peterdemin commented 1 year ago

The order is different: openai repl --token "<...>"