sbt Cheat Sheet


Example

This sheet assumes that you are in the root directory of the project, containing the build.sbt. $ indicates a command prompt and > indicates commands run inside the SBT console.

Compile a project

$ sbt compile

Test a project

$ sbt test

Enter SBT REPL:

$ sbt

Enter Scala Console with Built Project Available

$ sbt
> console

Generate Scaladoc

This is an example of executing an SBT 'Task'. The SBT site has more information on generating Scaladoc documentation.

$ sbt doc

or:

$ sbt
> doc