Best Practices for API Key Safety

https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety

echo "export SOME_API_KEY='yourkey'" >> ~/.zshrc
# or .~/bashrc

and the script can then just read the key

key="$SOME_API_KEY"

Note that the key is still stored in plain text.

Something about encryption here.