Get your project up and running with giter8

Giter8 is a command line tool that helps you to easily setup your project structure from templates published on github. It is written in Scala and based on sbt, but it is not restricted to Scala or sbt projects. You can create and use templates for any project type you like. From version 0.5.0 giter8 also has support for other git repositories than github.


Just follow the installation instructions, the installation with Conscript worked fine for me.
Verify your installation by typing g8 without parameters on the command line.

$ g8

giter8 0.5.0
Usage: g8 [TEMPLATE] [OPTION]...


Now we’re good to go, so lets create a Scala sbt project:

$ g8 kobmic/plain-scala.g8

Plain Scala project with scalatest and/or specs2

version [0.1.0-SNAPSHOT]:
organization [my.organization]: com.jayway
name [MyScalaProject]: TheProject

Template applied in ./theproject

After the project is created from your template start coding and run your build with sbt compile. As stated above giter8 uses sbt, but you can use your favourite build tool in your project template. Here’s an example using maven:

$ g8 kobmic/java-scala-mvn.g8

Mixed Java/Scala maven project with scalatest

version [0.1.0-SNAPSHOT]:
name [MyProject]:
group_id [my.organization]: com.jayway

Template applied in ./myproject

$ cd myproject
$ mvn compile

It is quite easy to create your own templates, just have a look at the documentation. You can use the file protocol to test your template locally:

$ g8 file:///Users/michaelkober/Documents/code/java-scala-mvn.g8/


Leave a Reply