0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.11k stars 157 forks source link

Proposal: Avoid passing the API KEY as ENV VAR #54

Closed Zeioth closed 1 year ago

Zeioth commented 1 year ago

PROBLEM Defining OPENAI_KEY as an env var, makes your chatgpt KEY available to any program.

SOLUTION If instead we store the key in ~/chatgpt-shell-cli.apikey, the user will be able to manage file permissions.

Optionally, having a --update-key options could be a user friendly way to set the api key.

0xacx commented 1 year ago

@Zeioth I left a comment to respond to the same issue in https://github.com/0xacx/chatGPT-shell-cli/issues/55 so I am closing this and the discussion can continue there. Thank you for the suggestion!