Skip to main content

Getting started

Maven Central

Dependencies

In order to begin, the following dependency needs to be added to your build.sbt:

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-core" % "<version>"

For automatic derivation of Bson codecs via Circe, add this:

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-circe" % "<version>"

For automatic derivation of Bson codecs via ZIO Json, add this:

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-zio-json" % "<version>"

For the ability to use embedded MongoDB in your tests, add this:

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-embedded" % "<version>" % Test

For ZIO 2 integration, add this:

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-zio" % "<version>"

libraryDependencies += "io.github.kirill5k" %% "mongo4cats-zio-embedded" % "<version>"

Next steps

Once everything is in place, you can start accessing your data: