This is an old revision of the document!
Table of Contents
CLI User guid
The CLI (command line interface) of GroIMP, can be used to interact with multiple projects without the need of a graphical user interface. This makes it a valuable feature especially on remote server or for small changes. It syntax of the commands is oriented on basic linux command.
Installation & Execution
The CLI can be installed using the GroIMP plugin manager (which also works in headless or compiled from source.
To start the CLI application in a terminal the additional parameter -a cli is needed:
java -Xverify:none -jar core.jar --headless -a cli
The name core.jar can variate based on the way GroIMP was installed.
Structure
The CLI can be used to manage multiple workbenches. The currently used workbench is defined in the prefix of the command line: [myProject]>>
After starting the CLI the first workbench is always “base”, which is similar to the empty window when starting the GUI. This workbench cant do much more then creating or opening other projects.
Tutorial
You can have a look at this tutorial for more information.
Commands
The commands are sorted by level of usage. There is currently three levels: at application, window, or workbench level.
The first character of a command indicates at which level it should be executed.
App commands ($) | |
$pwd | print the current system directory |
$ls | list all files of the current system directory |
$cd (system-path) | change the current system directory |
$editFile (system-path) | open a system file with a default application |
$open (system-path) | open an existing Project file in a new Workbench |
$createWB (selected template(optional), name of the new WB(optional)) | create a new Project based on a RGG template |
$loadExample (identifier of the Example, name of the new WB(optional)) | load an example project |
$listExamples (search parameter (optional)) | list the available examples |
$listTemplates (search parameter (optional)) | list the available templates |
$selectWB (workbench id) | select a new workbench |
$listWB | list all open Workbenches |
$listProjects | list all open projects |
Window command (%) | |
only a small selection of the most used panels… | |
%list | list all open windows |
%inspector | shows the hierarchic object inspector |
%inspector:select (tree-id) | select the node |
%inspector:show (tree-id) | opens the properties of the node |
%log | show the log |
%fileexplorer | list all files |
%fileexpolorer:show (file name or id) | opens a file in nano |
Workbench command | |
open (system-path) | open an existing Project file in a new Workbench (is equal to $open) |
save | save the file to the original location |
saveas (system-path) | save the file to a new location |
undo | undo last action |
compile | compiles the RGG code |
listFunctions | list all exiting RGG functions of the model |
addNode (system-path or -o object-path) | add a Object form either a file or a 3d object (-o) to the scene |
addFile (system-path) | add a file to the Project, create one if the path is empty |
renameFile (file name , new name) | rename a file |
removeFile (file name) | remove a file |
export3d (system-path) | export the scene to a file |
close | closes the Project |
xlconsole | open the XL console |
graph | shows the hierarchic object inspector |
ls | list all files of the Project |
editFile (file name) | open Nano to edit a file |
<RGG-function-name> | execute the RGG function with that name |