shell_gpt icon indicating copy to clipboard operation
shell_gpt copied to clipboard

Add support for reading `OPENAI_API_KEY` from a file path specified in the config

Open giladbarnea opened this issue 1 year ago • 0 comments

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.

image

Corresponding PR: #589

giladbarnea avatar Jul 07 '24 07:07 giladbarnea