Ammonite is a modern Scala REPL and scripting tool designed to give Scala users a more interactive and flexible REPL experience and to free them from heavyweight project boilerplate. It provides syntax‐highlighting, multiline editing, auto‐completion, and dynamic importing of dependencies (using a magic import syntax like import $ivy…). Instead of having to set up an sbt project for many small tasks, one can write Scala scripts (with .sc extension) and run them directly, with Ammonite handling compilation and execution transparently. In the REPL, Ammonite can survive compiler errors (by restarting the compiler internally) and preserve session state, improving resilience compared to the default Scala REPL. It also integrates filesystem utilities and command-line abstractions (via Ammonite-Ops) so that common shell tasks become more Scala-native.
Features
- Improved interactive REPL: syntax highlighting, better history, multiline input etc
- Ability to load Scala scripts and external files via imports like import $file.… etc
- Support for writing and running Scala scripts outside of full build projects (lighter weight)
- Contains Ammonite-Ops: concise file system operations in Scala scripts
- Can be used as a shell replacement (or augment shell), supporting commands and scripts more idiomatic to Scala than bash etc
- Better error diagnostics / more informative stack traces in REPL / scripts than standard REPL in many cases