opencommit
opencommit copied to clipboard
XDG config location
It would be good if the configuration file could be located somewhere else. In particular, it would be nice to have it located where the XDG specification states (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), so you can have all your files under $XDG_CONFIG_HOME. It should not be a difficult change and will allow us to have a cleaner home and an easier configuration backup.
The ability of setting the config file via environment variable (like OC_CONFIG=~/.opencommit), or using an environment variable to configure the software (like OPENAI_API_KEY=MyKey) would also be welcomed.
+1
Having the ability to pass the OpenAI API key via an ENV var, and not storing it in plaintext on disk, would boost my confidence in using OC.
*Edit: the ENV var feature allegedly exists per #80, although it's not well documented.
Stale issue message
Really? :-(
Having the ability to pass the OpenAI API key via an ENV var, and not storing it in plaintext on disk, would boost my confidence in using OC.
*Edit: the ENV var feature allegedly exists per #80, although it's not well documented.
Sorry to re-open, but can you tell me how the changes in $80 can be used such that the key can be stored in an environment variable instead of a file?
+1 I'd also love to see the config file being read from $XDG_CONFIG_HOME. I would suggest the implementation as follows:
- If present, the $XDG_CONFIG_HOME/.opencommit file is considered
- If not, it falls back to the currently hardcoded path ~/.opencommit
- exported environment variables always overrule 1. and 2.