Provide API Key in a Separate File
Author: foster-hangdaanCreated May 10, 2026Updated May 10, 2026
Add a configuration option called *-api-key-file to its corresponding *-api-key field. The *-api-key-file designates the path to the text file containing the API key. *-api-key will take priority over *-api-key-file if both are provided.
This is a more secure method of providing secrets, such as API keys, since they are declared outside of the configuration file and can be excluded from version control.
Example entry in wegorc:
# openweathermap backend: the path to a text file containing the API key
owm-api-key-file=/home/user/.config/wego/owm-key.txtSource: schachmat/wego