A library maintained by Iterators. Supports Scala 2.13 and Scala 3.
Kebs automatically derives typeclass instances (JSON codecs, DB column mappings, HTTP unmarshallers, etc.) for your domain types so you don't have to write them by hand.
case class UserId(value: String) extends AnyVal
case class Email(value: String) extends AnyVal
// Without Kebs — manual boilerplate for every type × every library:
implicit val userIdCol: BaseColumnType[UserId] = MappedColumnType.base(_.value, UserId.apply)
implicit val userIdEnc: Encoder[UserId] = Encoder[String].contramap(_.value)
// ... repeat dozens of times
// With Kebs — just mix in a trait. Everything is derived at compile time.https://theiterators.github.io/kebs/
// build.sbt — pick the modules you need
libraryDependencies ++= Seq(
"pl.iterators" %% "kebs-slick" % "2.1.6",
"pl.iterators" %% "kebs-circe" % "2.1.6",
"pl.iterators" %% "kebs-pekko-http" % "2.1.6",
"pl.iterators" %% "kebs-instances" % "2.1.6"
)| Module | What you get |
|---|---|
kebs-slick |
Automatic Slick column type mappings, Postgres array & hstore support |
kebs-doobie |
Doobie Meta / Get / Put instances |
kebs-spray-json |
Spray JsonFormat derivation (flat, snakified, >22 fields) |
kebs-play-json |
Play JSON Format instances |
kebs-circe |
Circe Encoder / Decoder derivation (snakified/capitalized) |
kebs-akka-http |
Akka HTTP unmarshallers + path matchers (Scala 2 only) |
kebs-pekko-http |
Pekko HTTP unmarshallers + path matchers |
kebs-http4s |
http4s path/query parameter codecs |
kebs-http4s-stir |
http4s-stir directives + path matchers |
kebs-scalacheck |
Arbitrary instance generation |
kebs-pureconfig |
PureConfig ConfigReader / ConfigWriter |
kebs-jsonschema |
JSON Schema generation (Scala 2 only) |
kebs-baklava |
Baklava schema + parameter support |
kebs-tagged |
Tagged types for Scala 2 |
kebs-tagged-meta |
@tagged code generation (Scala 2 only) |
kebs-opaque |
Opaque type support for Scala 3 |
kebs-enum |
Scala 3 native enums + Scala 2 Enumeration |
kebs-enumeratum |
Enumeratum support (Scala 2 & 3) |
kebs-instances |
Pre-built converters for java.time, UUID, URI, etc. |
- Mix in
CaseClass1ToValueClassif you use value classes. - Extend value-enums with
ValueEnumLikeEntry[V]. - Use
KebsEnumeratum/KebsValueEnumeratumfor Enumeratum,KebsEnum/KebsValueEnumfor native enums. - See the full documentation for details.
Kebs for IntelliJ plugin adds support for @tagged generated code.
