Since v2.1.0

Arkenv support the yaml file format.

This functionality is located in a separate module arkenv-yaml.

Add it as a dependency in your build.gradle.

compile "com.apurebase:arkenv-yaml:$arkenv_version"

Install the YamlFeature and specify the file to load from.


class Ark : Arkenv(configuration = {
}) {
    val mysqlPassword: String by argument()

Arkenv will look for the file in the resources.

Like with environment variables, Arkenv will look for the snake-case version of any double-hyphen names.

An example yaml file config.yml could have the following content:

mysql_password : JKE9ehnEA

Nested keys will be concatenated using an underscore _.

Arrays will be parsed as a comma-separated string.


The yaml feature can also be used together with the profile feature to load yaml source files. Specify additional parsers in the constructor.

class Ark : Arkenv("Example", configureArkenv {
    +ProfileFeature(parsers = listOf(::YamlFeature))
}) {

For further information see Profiles.



By default, Arkenv will look for profiles in the following relative locations on both the classpath and the file system:

  • /
  • /config

You can add additional locations by using the location argument, which accepts a comma-separated list of directory locations or file paths.

  • Argument: --arkenv-property-location
  • Code: PropertyFeature(locations = listOf("./path/"))