Using SBT

To include Chimney to your SBT project, add the following line to your build.sbt:

libraryDependencies += "io.scalaland" %% "chimney" % "0.5.2"

Library is released for Scala 2.11.x, 2.12.x and 2.13.x. If you want to use it with Scala.js (or Scala Native), you need to replace %% with %%%.


Due to some compiler bugs, it’s recommended to use at least Scala 2.11.9 or 2.12.1.

Using Ammonite

The quickest way to try out Chimney is to use a script that downloads coursier and use it to fetch Ammonite REPL with the latest version of Chimney. It drops you immediately into a REPL session.

curl -s https://raw.githubusercontent.com/scalalandio/chimney/master/try-chimney.sh | bash
Welcome to the Ammonite Repl 2.0.4 (Scala 2.13.1 Java 1.8.0_192)

@@ case class Foo(x: String, y: Int)
defined class Foo

@@ case class Bar(x: String, y: Int, z: Boolean = true)
defined class Bar

@@ Foo("abc", 10).transformInto[Bar]
res2: Bar = Bar("abc", 10, true)