shell_gpt
shell_gpt copied to clipboard
Add support for reading `OPENAI_API_KEY` from a file path specified in the config
My sgpt config, including the .sgptrc file, is backed up via source control. This means I constantly need to manually make sure the OPENAI_API_KEY line is kept out of commits.
This is cumbersome and only takes one lapse in concentration to accidentally push my key.
A simple fix would be to let OPENAI_API_KEY point to a file path. This separate file would hold the key in plaintext, making it easier to keep out of version control.
Corresponding PR: #589