--- layout: none title: simple build tool tagline: is a minimally intrusive
build tool for Scala projects description: '' ---
{% include topbar.txt %}

# sbt

## simple build tool

is a minimally intrusive
build tool for Scala projects

Start Building
the latest version
Click here for install instructions
Are you a unix/osx or a Windows user?

If you are running an unix-based operating system, open your terminal shell and enable execute permisions on the sbt script

    $ chmod u+x sbt

Then run the install command to get the latest

    $ sbt

Afterwards you can run the sbt command in any directory to create a new project.

If you're feeling adventurous, try our MSI installer.

- Fast, transparent REPL workflow
- Scala-scripted configuration
- Flexible plugin architecture
- Continuous incremental compilation
- Triggered task execution

- Cross-Scala version compilation
- Out of the box testing with ScalaCheck, Specs, and ScalaTest
- Multi-module and external project support
- Parallel task and test execution
- Concise dependency management DSL

- ### Say hi to the REPL.

      $ sbt
      > hello_

  From the REPL you can execute project tasks and inspect settings

      > compile
      [info] Compiling 1 Scala source to ...
      [success] Total time: 1 s, completed Aug 21, 2011 7:34:52 PM

  All settings and commands are tab-completable for fast, easy access

      > show <tab>
      Display all 153 possibilities? (y or n)

  Is that all?

- ### Typesafety is a given.

  All project configuration is scripted in Scala providing out of the box modularity and all of the flexibility of the Scala programming language.

      override lazy val settings = super.settings :+
          (shellPrompt := { s => Project.extract(s).cid + "> " })

  Simple projects will only require a simple configuration in `.sbt` format.

      organization := "com.your.domain"
      name := "your-module"
      version := "0.1.3"
      libraryDependencies += "com.other.domain" %% "other-module" % "1.0"

  Is that all?

- ### Simple Extensibility.

  Plugins provide a means of injecting and augmenting settings and commands. Since plugins are just Scala code, you can package and share plugins between projects.

      object MyPlugin extends Plugin {
        val MyConf = config("my")
        override def settings: Seq[Setting[_]] = inConfig(MyConf)(Seq(
          // ...
        ))
      }

  Is that all?

- ### Only what you need.

  Sbt will only compile source code that has changed and when necessary. Why wait around for something to be recompiled when you can be doing more productive work?

      > compile
      [info] Compiling 1 Scala source to ...
      [success] Total time: 1 s, completed Aug 21, 2011 7:34:52 PM
      > compile
      [success] Total time: 1 s, completed Aug 21, 2011 7:34:54 PM

  Is that all?

- ### Do repeat yourself.

  All build tasks and commands can be re-triggered when dependent source code changes by prepending the `~` modifier, leaving you free to focus on your craft and not on life-wasting repetition.

      > ~ test

  Is that all?

- ### Fluency in many dialects.

  Scala is a fast evolving and forward thinking language which, in the past, has led to binary incompatibility between versions. Sbt makes it simple to switch between and execute commands against your Scala source code over many versions of Scala with ease.

      > + compile

  Is that all? </div< </li>

- ### Many frameworks. One test interface.

  For some, testing is an afterthought. Sbt makes testing part of your normal workflow by providing a generic interface to validate your code against any supporting testing library.

      > test-only your.EasySpec

  Is that all?

- ### There's room for more in here.

  When it's time to make the split, Sbt makes it easy to coordinate multiple projects in one simple build file.

      object YourBuild extends Build {
         lazy val root = Project(".", file("."), settings = Seq(..)) aggregate(a, b)
         lazy val b = Project("b", file("b"))
         lazy val c = Project("c", file("c")) dependsOn(b)
      }

  Is that all?

- ### Why wait?

  By default, build tasks that do not depend on one another execute in parallel. This also applies to your tests. Instead of sequentially executing your tests, Sbt will run them in parallel. ...something about parallel task execution...

      /* fill me in */

  Is that all?

- ### Simply dependable.

  Close your eyes. Now open them. You no longer have to manage your dependencies in XML. Use a simple declarative DSL to add dependencies and sbt takes care of the rest.

      libraryDependencies ++= Seq(
        "com.scalaproject" %% "module-a" % "1.4.7",
        "com.javaproject" % "module-b" % "2.1.0"
      )

  Is that all?