A sbt plugin that adds scala-notebook capabilities to sbt projects.
This plugin mainly adds a
notebook task to your sbt project, that launches a scala-notebook server with your project build products and its dependencies on the classpath. You can think of it as a graphical in-browser
- Add the following line to
addSbtPlugin("com.github.alexarchambault" %% "sbt-notebook" % "0.1.1")
Alternatively, you can also add it to all your projects at once by adding it to
- That's it! Type
notebookat the sbt prompt, and a browser window should open at the right address. This address will also be printed in the console.
Requires sbt >= 0.13.5. Add
project/build.propertiesof the projects you want the
notebookcommand to be available for.
Does not work with scala versions other than 2.10.
Typing a key in the console while the notebook command is running does not fully stop the scala-notebook server as it should. It seems to be stuck like described in these SO questions, as the main function of the server has already exited. Some tuning of the config files or upgrading the akka version may solve this issue. As a temporary workaround, one can disable the forking of the server, by adding this line to
fork in Notebook := false, but the other options (hostname, port, notebooks dir, notebooks project name will then be ignored).
Connection to the server is not encrypted. By default, this may not be a problem, as only one session to the server can be opened. If one disables this (adding the line
notebookSecure := falseto
build.sbt) and opens a notebook on another machine, then this may be an issue.
Copyright (c) 2014 Alexandre Archambault. See LICENSE file for more details.
Released under Apache 2.0 license.