To use tapir, add the following dependency to your project:

"com.softwaremill.tapir" %% "tapir-core" % "0.2"

This will import only the core classes. To generate a server or a client, you will need to add further dependencies.

Most of tapir functionalities use package objects which provide builder and extensions methods, hence it’s easiest to work with tapir if you import whole packages, e.g.:

import tapir._

If you don’t have it already, you’ll also need partial unification enabled in the compiler (alternatively, you’ll need to manually provide type arguments in some cases). In sbt, this is:

scalacOptions += "-Ypartial-unification"

Finally, type:


and see where auto-complete gets you!

Example usages

To see an example project using Tapir, check out this Todo-Backend using tapir and http4s.

Also check out the simple runnable example which is available in the repository.