Like used in this bit of code: val dotenv: Dotenv = dotenv{ filename = ".env" } dotenv.entries(Dotenv.Filter.DECLARED_IN_ENV_FILE).forEach { println(it) }