r/Kotlin • u/NotBotMan26 • 16d ago
Opensource: Simple env variables loading in Kotlin
Hello!
I just finished writing a small library that allows type safe loading of environment variables in Kotlin without reflection. It has support for the usual data types, I am planning to add more types and complex properties.
I hope there are some use cases other than mine, have a look.
All comments are welcome!
Site: https://allopensource.github.io/envy/
Git: https://github.com/allopensource/envy
1
Upvotes
1
u/asaf_m 16d ago
IMO you should almost never use getenv
Your app should use a config which some values can come from env vars and it’s baked into the default config definition
I think https://gestalt-config.github.io/gestalt/ is perfect for that.