User Tools

Site Tools


user-guide:additional_interfaces:cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
user-guide:additional_interfaces:cli [2025/01/17 08:49] – created Timuser-guide:additional_interfaces:cli [2025/01/22 15:48] (current) – [More documentation] Tim
Line 1: Line 1:
-===== Command line interface=====+===== CLI =====
  
 +GroIMP can be started without its graphical interface, with a CLI. Unlike the Headless mode, the CLI enables interaction with multiple the models during run time including opening and closing models, running simulations, editing RGG files etc. Its a valuable feature especially on remote server or for small changes. It syntax of the commands is oriented on basic linux command. 
  
  
-===== Get started =====+<uml>@startuml 
 +!pragma teoz true 
 +hide footbox 
 +title CLI 
 +participant User 
 +participant "Interactive command line" as cli 
 +participant GroIMP
  
-You can start the CLI application in a terminal with  
  
-> java -Xverify:none -jar core.jar --headless -a cli+User -> GroIMPStart GroIMP 
 +cli<-> GroIMP 
 +& User <-cli
  
-Then, to create the default new rgg template project, type ''$createWB''.+@enduml</uml>
  
-You can now run the model with `run`, reset with ''compile'', or export the 3d view with ''export3d /path/to/file.x3d''.+===== Installation & Execution =====
  
-You can also open your own project with ''$open /path/to/model.gsz''.+The CLI can be installed using the GroIMP [[user-guide:pluginmanager|plugin manager]] (which also works in [[user-guide:pluginmanager#usage_from_commandline|headless]] or compiled from [[https://gitlab.com/grogra/groimp-plugins/CLI|source]] 
  
-**Note: the command ''$help'' lists most of the available commands with description**+To start the CLI application in a terminal the additional parameter -cli is needed:
  
-===== Tutorial =====+<code bash> 
 +java -Xverify:none -jar core.jar --headless -a cli 
 +</code>
  
-You can have a look at [[:tutorials:Startup-CLI-model|this tutorial]] for more information.+The name core.jar can variate based on the way GroIMP was installed.
  
-===== 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. +===== Structure ===== 
 + 
 +==== Projects ==== 
 + 
 +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. 
 + 
 +==== Commands ==== 
 + 
 +The commands to interact with GroIMP and the proejcts are sorted by level of usage. There is currently three levels:  
 + 
 +  * application for managing the different projects and for basic interaction with the operation system 
 +  * window for managing the panels(the cli version) of the current workbench 
 +  * workbench for editing and execution the current project as well general project management 
 + 
 +The list can be found below. 
 + 
 + 
 + 
 +===== More documentation ===== 
 +  * [[:user-guide:additional_interfaces:cli | CLI user guid]] 
 +    * [[:user-guide:additional_interfaces:cli#list_of_commands|List of CLI commands]] 
 +  * [[:groimp-platform:interfaces:cli|CLI implementation]] 
 +  * [[https://wkurth.grogra.de/oberlaender_msc.pdf| GroLink: implementing and testing a general application programming interface for the plant-modelling platform GroIMP]] 
 + 
 +===== Tutorials ===== 
 +  * [[:tutorials:startup-cli-model|Getting started with CLI]] 
 + 
 + 
 +===== List of 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.  
 + 
 +**Note: the command ''$help'' lists most of the available commands with a description** 
  
 | **App commands ($)**                                                                                                        | | **App commands ($)**                                                                                                        |
Line 68: Line 112:
 | ls                                      | list all files of the Project                                        | | ls                                      | list all files of the Project                                        |
 | editFile (file name)                    | open Nano to edit a file                                             | | editFile (file name)                    | open Nano to edit a file                                             |
 +| <RGG-function-name>                     | execute the RGG function with that name                                             |
 +
user-guide/additional_interfaces/cli.1737100165.txt.gz · Last modified: 2025/01/17 08:49 by Tim