Sharing scripts

Directly in the URL

You can encode the script as Base64 (URL-safe without padding) and then, simply append it to the url via &code=<code>. This is best used for shorter scripts.

Example


For larger scripts you can also use a compressed (deflate) Base64 encoded version with via &codez=<code>. This is also used by the groovy console.

Example

As gist

You can save your code on https://gist.github.com and then share by appending the gistId in the url&gist=<gistid>.

Important: that file needs to have the .groovy extension, otherwise it won't be picked up.

Example

From a repository

You can share a file from a Github repository via its canonical url via this parameter &github=<canonical-path-to-file>. You can get the canonical-path-to-file by going to the file on the Github frontend, then press y now your url should include the commit hash instead of the branch name in the url, then omit the https://github.com/ and copy the rest.

Example

History and Storage

The Groovy Web Console stores your scripts in the browser's local storage.

The history is stored per session which is identified by the #sessionId in the url.