Personal tools
You are here: Home Developer Reference Executing Kepler from the Command Line

Executing Kepler from the Command Line

How to execute Kepler from the command line (with or without the GUI ("headless"))

Kepler development tree instructions

The instructions below apply only to Kepler built from the Subversion development tree, not to Kepler-1.0.0.

To run a model,"ant run" and "ant run-only" now can open up a specified workflow on startup. For example:

cd build-area
ant run -Dworkflow=../outreach/workflows/demos/getting-started/01-SimpleAddition.xml

will open up Kepler with the 01-SimpleAddition workflow loaded.  For details, see the Build System Instructions page


Kepler 2.x command line instructions

On Linux and Mac, the command line executable is kepler.sh.

On Windowskepler.exe only starts the Kepler UI; use kepler.bat (or kepler-console.bat for Kepler 1.0) to run a workflow from the command line.

 

To start Kepler from the command line (optionally loading a workflow), use the following command (examples use the Mac/Linux executable):

kepler.sh [workflow.xml | workflow.kar]

To run a workflow from the command line--with or without the Graphical User Interface (GUI)--use the following command for workflow KARs:

kepler.sh -runkar [-nogui | -redirectgui dir] [-force] [-param1 value1 ...] workflow.kar
Use -force to ignore module dependencies and attempt to execute the workflow in the KAR.
 

Use the following command for workflow XMLs:

kepler -runwf [-nogui | -redirectgui dir] [-nocache] [-noilwc] [-param1 value1 ...] workflow.xml

-nogui                  run without GUI support.
-nocache                run without kepler cache.
-noilwc                 run without incrementing LSIDs when the workflow changes.
-redirectgui dir        redirect the contents of GUI actors to the specified directory

Running a workflow without the GUI is useful in environments with no graphic support, such a Web portal. Additionally, you can specify the values of workflow parameters:

kepler.sh -runwf -x 4 -y "foo" workflow.xml

The above command runs 'workflow.xml', setting the parameters x = 4 and y = "foo".

Creating Screenshots of Workflows

The "-screenshot" argument can be used to automate taking screenshots of workflows. The usage is:

kepler -screenshot [-type png | jpg | gif] [-force] [-o output [output2 [...]] | -odir directory] workflow.xml [workflow2.xml [...]]

-force                       if true, always create the screenshot
-o output [output2 [...]]    the output filename
-odir dir                    the output directory
-type png|jpg|gif            the image type 

There are three possible ways to specify the output name and location of the screenshot images:

  1. If -odir is specified then the images are all written to this directory with the same name as the workflow.
  2. If -o is specified, then the outputs are written to the files specified by -o. There must be a file name for each workflow.
  3. If neither -odir or -o is specified, the outputs are written to the same directory as the workflow, with the same name as the workflow.
The type of the screenshot images can be specified with -type or from the extension of the output name with -o.
 
A screenshot is taken and saved to disk if the output file does not exist or the output file is older than the workflow file. This saves time by not re-opening the workflow frame and exporting the image when the workflow has not changed. You can force the screenshot to taken by using -force.

 

Document Actions