All Projects → aPureBase → arkenv

aPureBase / arkenv

Licence: Apache-2.0 license
Type-safe Kotlin configuration by delegates

Programming Languages

kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to arkenv

parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+473.33%)
Mutual labels:  configuration, environment-variables
ngx-env
Easily inject environment variables into your Angular applications
Stars: ✭ 73 (+386.67%)
Mutual labels:  configuration, environment-variables
Environ Config
Python Application Configuration With Environment Variables
Stars: ✭ 210 (+1300%)
Mutual labels:  configuration, environment-variables
Fig
A minimalist Go configuration library
Stars: ✭ 142 (+846.67%)
Mutual labels:  configuration, environment-variables
superconfig
Access environment variables. Also includes presence validation, type coercion and default values.
Stars: ✭ 33 (+120%)
Mutual labels:  configuration, environment-variables
Aconfig
Simple, useful and opinionated config loader.
Stars: ✭ 187 (+1146.67%)
Mutual labels:  configuration, environment-variables
Konfig
Simple config properties API for Kotlin
Stars: ✭ 249 (+1560%)
Mutual labels:  configuration, environment-variables
Fsconfig
FsConfig is a F# library for reading configuration data from environment variables and AppSettings with type safety.
Stars: ✭ 108 (+620%)
Mutual labels:  configuration, environment-variables
paerser
No description or website provided.
Stars: ✭ 38 (+153.33%)
Mutual labels:  configuration, environment-variables
read-env
🔧 Transform environment variables into JSON object with sanitized values.
Stars: ✭ 60 (+300%)
Mutual labels:  configuration, environment-variables
Node Convict
Featureful configuration management library for Node.js
Stars: ✭ 1,855 (+12266.67%)
Mutual labels:  configuration, environment-variables
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (+33.33%)
Mutual labels:  configuration, environment-variables
Config
A lightweight yet powerful config package for Go projects
Stars: ✭ 126 (+740%)
Mutual labels:  configuration, environment-variables
Config
🛠 A configuration library for Go that parses environment variables, JSON files, and reloads automatically on SIGHUP
Stars: ✭ 203 (+1253.33%)
Mutual labels:  configuration, environment-variables
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+13780%)
Mutual labels:  configuration, environment-variables
Cleanenv
✨Clean and minimalistic environment configuration reader for Golang
Stars: ✭ 245 (+1533.33%)
Mutual labels:  configuration, environment-variables
React Env
Runtime environment variables for react apps.
Stars: ✭ 90 (+500%)
Mutual labels:  configuration, environment-variables
Startup
🔧 R package: startup - Friendly R Startup Configuration
Stars: ✭ 107 (+613.33%)
Mutual labels:  configuration, environment-variables
sitri
Sitri - powerful settings & configs for python
Stars: ✭ 20 (+33.33%)
Mutual labels:  configuration, environment-variables
dart environment config
Environment specific config generator for Dart and Flutter applications during CI/CD builds
Stars: ✭ 87 (+480%)
Mutual labels:  configuration, environment-variables

Maven Central Tests Pipelines Chat Awesome Kotlin Badge

Type-safe Kotlin configuration by delegates.

Supports the most common external configuration sources, including:

📦 Installation

Add Maven Central to your repositories and add Arkenv in Gradle:

repositories { mavenCentral() }
implementation "com.apurebase:arkenv:$arkenv_version"
implementation "com.apurebase:arkenv-yaml:$arkenv_version" // for yaml support

🔨 Usage

1. Define your arguments with the argument delegate.

object Arguments {
    val port: Int by argument()
}

or use constructor injection:

class Arguments(val port: Int)

2. Parse your arguments.

fun main(args: Array<String>) {
    Arkenv.parse(Arguments, args) // object or existing instance
    Arkenv.parse<Arguments>(args) // constructor injection 
}

You can specify additional custom names for each argument.

The property's name is used as a fallback.

By default, Arkenv supports parsing command line arguments, environment variables, and profiles.

In the case of port, you can parse it like this:

  • From command line with --port 443
  • As an environment variable PORT=80
  • In a profile, like application-dev.properties, add port=5000

To get started, we recommend reading about the basics for a quick tour of what's included.

📃 Documentation

Please visit https://arkenv.io/ for in-depth documentation.

🤝 Contributing PRs Welcome

Slack

Find the Arkenv channel in the official Kotlin Slack.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].