Ciris

Ciris

  • Blog
  • API Docs
  • Documentation
  • GitHub

›Documentation

Documentation

  • Overview
  • Quick Example
  • Configurations
  • Modules

Overview

Ciris is a functional programming library for loading configurations.

In particular, the following features are supported.

  • Loading values from multiple sources and defining default values.
  • Composing multiple configuration values into larger configurations.
  • Preventing secret values from being shown, redacting sensitive errors.
  • Decoding configuration values to various commonly used types.
  • Accumulating errors when multiple values cannot be loaded.

Documentation is kept up-to-date, currently documenting v3.1.0 on Scala 2.13.

Getting Started

To get started with sbt, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris" % "3.1.0"

Published for Scala 2.12, 2.13 and 3.2, Scala.js 1.13 and Scala Native 0.4.

For changes between versions, please refer to the release notes.

If you are using Scala.js or Scala Native, make sure to replace %% with %%% above.

For Scala 2.12, enable partial unification by adding the following line to build.sbt.

scalacOptions += "-Ypartial-unification"

Modules

Following are additional provided modules.

Circe

For circe support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-circe" % "3.1.0"

Circe YAML

For circe-yaml support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-circe-yaml" % "3.1.0"

Enumeratum

For enumeratum support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-enumeratum" % "3.1.0"

Http4s

For http4s support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-http4s" % "3.1.0"

Refined

For refined support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-refined" % "3.1.0"

Squants

For squants support, add the following line to your build.sbt file.

libraryDependencies += "is.cir" %% "ciris-squants" % "3.1.0"

External Modules

Following is an incomplete list of third-party integrations.

  • ciris-aiven-kafka
  • ciris-aws-secretsmanager
  • ciris-aws-ssm
  • ciris-credstash
  • ciris-hocon
  • ciris-kubernetes

Signatures

Stable release artifacts are signed with the 3C73 EC3D A303 8ED3 key.

Compatibility

Backwards binary-compatibility for the library is guaranteed between minor and patch versions.
Version 3.a.b is backwards binary-compatible with 3.c.d for any a > c or a = c and b > d.

Please note binary-compatibility is not guaranteed between milestone releases.

Snapshot Releases

To use the latest snapshot release, add the following lines to your build.sbt file.

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies += "is.cir" %% "ciris" % "3.1.0+23-ef5e4be4-SNAPSHOT"

Dependencies

Refer to the table below for dependencies and version support across modules.

ModuleDependenciesScala
cirisCats Effect 3.4.8Scala 2.12, 2.13 and 3.2
ciris-circeCirce 0.14.5Scala 2.12, 2.13 and 3.2
ciris-circe-yamlCirce YAML 0.14.2Scala 2.12, 2.13 and 3.2
ciris-enumeratumEnumeratum 1.7.2Scala 2.12, 2.13 and 3.2
ciris-http4sHttp4s 0.23.18Scala 2.12, 2.13 and 3.2
ciris-refinedRefined 0.10.3Scala 2.12, 2.13 and 3.2
ciris-squantsSquants 1.8.3Scala 2.12, 2.13 and 3.2

For Scala.js and Scala Native version support, refer to the following table.

ModuleScala.jsScala Native
cirisScala.js 1.13 (Scala 2.12, 2.13 and 3.2)Scala Native 0.4 (Scala 2.13 and 3.2)
ciris-circeScala.js 1.13 (Scala 2.12, 2.13 and 3.2)Scala Native 0.4 (Scala 2.13 and 3.2)
ciris-circe-yaml--
ciris-enumeratumScala.js 1.13 (Scala 2.12, 2.13 and 3.2)-
ciris-http4sScala.js 1.13 (Scala 2.12, 2.13 and 3.2)Scala Native 0.4 (Scala 2.13 and 3.2)
ciris-refinedScala.js 1.13 (Scala 2.12, 2.13 and 3.2)Scala Native 0.4 (Scala 2.13 and 3.2)
ciris-squantsScala.js 1.13 (Scala 2.12, 2.13 and 3.2)Scala Native 0.4 (Scala 2.13)

Participation

Ciris embraces pure, typeful, idiomatic functional programming in Scala, and wants to provide a safe and friendly environment for teaching, learning, and contributing as described in the Scala Code of Conduct.

License

Licensed under the MIT license. Refer to the license file.

Quick Example →
  • Getting Started
    • Modules
    • Signatures
    • Compatibility
    • Snapshot Releases
  • Dependencies
  • Participation
  • License

Copyright © 2017-2023 Viktor Rudebeck.
Icon designed by Freepik from Flaticon.