CRaSH
CRaSH guide
Julien Viet
eXo Platform
Copyright © 2011 eXo Platform SAS
Table of Contents
Preface
1. Running CRaSH
1.1. Standalone
1.2. Embedded mode
2. Interacting with the shell
2.1. Shell usage
2.2. Command usage
2.3. Base commands
3. JCR extension
3.1. JCR implementations
3.2. JCR commands
3.3. SCP usage
4. Configuration
4.1. Configuration properties
4.2. Change the SSH server key
4.3. Change the ports of the telnet or SSH server
4.4. Remove the telnet or SSH access
4.5. Configure the shell default message
4.6. Configuration the authentication
5. Extending CRaSH
5.1. Pluggable authentication
6. Developers
6.1. Developping commands
6.2. Command context
6.3. Adding style
6.4. Inter command API
7. Hey, I want to contribute!
List of Examples
1.1. Embedding CRaSH in a web application
1.2. Embedding CRaSH in Spring
2.1. Remove all nt:unstructed nodes
2.2. Update the security of all nt:unstructed nodes
2.3. Add the mixin mix:referenceable to any node of type nt:file or nt:folder
6.1. The command context
6.2. Using shell session
6.3. Obtaining a Spring bean
6.4. The invocation context
6.5. Printing on the shell
6.6. Reading on the console
6.7. Decorating and coloring text
6.8. Printing styled text
6.9. Styling with the leftshift operator
6.10. dbscript.groovy
Preface
The Common Reusable SHell (CRaSH) deploys in a Java runtime and provides interactions with
the JVM. Commands are written in Groovy and can be developped at runtime making the
extension of the shell very easy with fast development cycle.
Page 5 of 57
1
Running CRaSH
There are several ways to run CRaSH.
CRaSH provides has various ways to be started, it can also be easily embedded.