Plugins You can find out about all the publicly available Grails plugins.

CRaSH Grails Plugin

2 votes
compile "org.grails.plugins:crash:1.3.0"

 Documentation  Source  Issues


Integrates the Common Reusable SHell (CRaSH - ) into Grails.


grails install-plugin crash


A plugin for grails to include the Common Reusable SHell - CRaSH


Add the plugin to your grails plugins in BuildConfig.groovy to embed CRaSH into your grails application:

plugins {
        compile ":crash:1.3.0-cr7"

It includes the ssh shell and by default listens on port 2000 with the username/password 'admin'. So make sure to change that for production! For general documentation on CRaSH visit the CRaSH project website.


To start up CRaSH, a spring bean named crashSpringWebBootstrap of type org.crsh.grails.GrailsBootstrap is defined. Its config properties can be set by assigning a map of config properties to plugin.crash.config for instance:

plugin.crash.config = [
            'crash.ssh.port': 2001,
            'crash.auth.simple.password': 'secretPassword'

To include telnet support include the following dependency in your own BuildConfig:

runtime 'org.crashub:crash.connectors.telnet:1.3.0-cr7'


The plugin install CRaSH commands in the directory /WEB-INF/crash/commands of your web application

h4.Adding or modifying commands

Existing commands or new commands can be done at anytime during runtime.

Switching repl

You can switch to the Groovy repl using the repl command:

% repl groovy

The Groovy Repl is similar to the Groovy Shell but can evaluate commands:


You can switch back to the Script repl with the same command but with a Groovy syntax:

% repl("script")

Grails specific usage

There are a few commands available specifically developed for Grails:

  • the application management
  • the grails management
  • the plugin management

Using Grails objects or Spring services

Within a command or in the Groovy repl you can access the contextual attributes:

  • the context.attributes.application is the current GrailsApplication
  • the context.attributes.beans is a map of Spring beans
  • the context.attributes.factory the Spring bean factory