Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

zio/zio-config

Easily use and document any config from anywhere in ZIO apps

zio/zio-config.json
{
"createdAt": "2019-09-23T05:43:56Z",
"defaultBranch": "series/4.x",
"description": "Easily use and document any config from anywhere in ZIO apps",
"fullName": "zio/zio-config",
"homepage": "https://zio.dev/zio-config",
"language": "Scala",
"name": "zio-config",
"pushedAt": "2025-11-25T07:18:49Z",
"stargazersCount": 237,
"topics": [
"config",
"scala",
"zio"
],
"updatedAt": "2025-11-25T07:18:10Z",
"url": "https://github.com/zio/zio-config"
}

[//] !: # (This file was autogenerated using zio-sbt-website plugin via sbt generateReadme command.) [//] !: # (So please do not edit it manually. Instead, change “docs/index.md” file or sbt setting keys) [//] !: # (e.g. “readmeDocumentation” and “readmeSupport”.)

ZIO Config is a ZIO-based library and act as an extension to core library ZIO’s Config language.

Production Ready CI Badge Sonatype Releases Sonatype Snapshots javadoc ZIO Config

Let’s enumerate some key features of this library:

  • Support for Various Sources — It can read flat or nested configurations. Thanks to IndexedFlat.
  • Automatic Document Generation — It can auto-generate documentation of configurations.
  • Automatic Derivation — It has built-in support for automatic derivation of readers and writers for case classes and sealed traits.
  • Type-level Constraints and Automatic Validation — because it supports Refined types, we can write type-level predicates which constrain the set of values described for data types.
  • Descriptive Errors — It accumulates all errors and reports all of them to the user rather than failing fast.
  • Integrations — Integrations with a variety of libraries

If you are only interested in automatic derivation of configuration, find the details here

In order to use this library, we need to add the following line in our build.sbt file:

libraryDependencies += "dev.zio" %% "zio-config" % "<version>"

Let’s add these four lines to our build.sbt file as we are using these modules in our examples:

libraryDependencies += "dev.zio" %% "zio-config" % "<version>"
libraryDependencies += "dev.zio" %% "zio-config-magnolia" % "<version>"
libraryDependencies += "dev.zio" %% "zio-config-typesafe" % "<version>"
libraryDependencies += "dev.zio" %% "zio-config-refined" % "<version>"

There are many examples in here

Learn more on the ZIO Config homepage!

For the general guidelines, see ZIO contributor’s guide.

See the Code of Conduct

Come chat with us on [![Badge-Discord]][Link-Discord].

[Badge-Discord] !: https://img.shields.io/discord/629491597070827530?logo=discord “chat on discord” [Link-Discord] !: https://discord.gg/2ccFBr4 “Discord”

[License]!(LICENSE)