AutoKonfig
Kotlin configuration library with batteries included
Install / Use
/learn @Nohus/AutoKonfigREADME
AutoKonfig
Kotlin configuration library with batteries included.
Website
Features overview
- Support for JSON, HOCON and Java properties config files
- Loading config files from resources and remote URLs
- Reading configuration from system properties and environment variables
- Parsing command-line parameters
- Merging properties loaded from multiple sources
- Automatically finding config files
- Type-safe properties
- Support for default and optional values
- Many useful property types, including dates (
2020-02-02), times (10:15:30), durations (20s) and memory sizes (256 MB) - Type-specific parsing, a value of
1can be the string"1", the integer1, or the booleantruedepending on which type is asked for - Collection types
- 100% unit test coverage
Quick start
Gradle
implementation "dev.nohus:AutoKonfig:1.1.0"
Maven
<dependency>
<groupId>dev.nohus</groupId>
<artifactId>AutoKonfig</artifactId>
<version>1.1.0</version>
</dependency>
The artifacts are available on Maven Central.
Simple example
Create a config file:
app.conf
host = nohus.dev
port = 80
Create variables for your properties:
Main.kt
fun main() {
val host by StringSetting()
val port by IntSetting()
println("Host: $host, port: $port")
}
That's it! AutoKonfig automatically loaded your config file, because it had a well-known name. It knew which properties to load based on the variable names, and it mapped them to types based on the specified StringSetting and IntSetting delegates.
To see more, continue reading on the website.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

