Groovy Shell

The Groovy Shell, aka. groovysh is a command-line application which allows easy access to evaluate Groovy expressions, define classes and run simple experiments.

Icon

This page pertains to the newgroovysh which at the moment needs to be explicitly enabled by setting the NEWSHELL environment variable to any value (unset or empty will invoke the previous groovysh implementation).

NEWSHELL=true ./bin/groovysh

Features

No need for go command to execute buffer.

Rich cross-platform edit-line editing, history and completion thanks to JLine.

ANSI colors (prompt, exception traces, etc).

Simple, yet robust, command system with online help, user alias support and more.

User profile support

Command-line Options and Arguments

The shell supports several options to control verbosity, ANSI coloring and other features.

In addition to options, commands or expressions can be given on the command-line which will invoke the shell in non-interactive mode. The commands or expressions will be evaluated and the shell will exit.