# feed

Marcin Wisniowski

06/05/2020, 3:59 PM
Hello! I released AutoKonfig, a Kotlin library for configuration files (and command line arguments) with many features I hope are useful and a goal to make it "just work" while being very simple to use. Zero lines of code required for setup, get values from your config file right away.
👍 5


06/05/2020, 6:37 PM

Marcin Wisniowski

06/05/2020, 8:43 PM
@doker In Konfig, you have explicitely specify the key name when creating a key object
val port = Key("port", intType)
, then create a Configuration object, then access your value from the Configuration object using the key object you created. With AutoKonfig you don't need any of that, just
val port by IntSetting()
is working by itself, while still allowing you to do all of that customization if needed, but covering most cases without requiring the user to do anything (create key objects and configuration objects). Notice how in AutoKonfig the
variable is already containing the value from your config file, not a key object than you have to use to retrieve it with proceeding code. Similarly in Konf, you are creating keys which you then use to access values from Config objects, which is extra effort I wanted to avoid. It was also a goal for me to have 100% unit test coverage, which both of these libraries lack. Both of these libraries work great and I tried them (and more) and thought about their API's before designing AutoKonfig. I wanted something which requires the least effort possible for the majority of use cases (and allow more advanced usage, which would be the usual usage for other libraries).
👍 3


06/05/2020, 9:48 PM
Thanks for the explanation. Looks superior, I'll definitely give it a try

Xavier Hanin

06/06/2020, 11:28 AM
Looks very well done, with also a clean and simple documentation. Congrats @Marcin Wisniowski! Will give it a try


06/07/2020, 10:57 AM
What about multiplatform support? Like

Marcin Wisniowski

06/07/2020, 10:32 PM
I only target the JVM for now so if you need Kotlin/Native or Kotlin/JS, you would need to look elsewhere. PR's welcome though. : )


06/19/2020, 12:36 PM
Property source tracing is nice as well, I will try that