CGE CLI

List of CGE CLI commands, their purpose and output.

The CGE CLI provides access to all the core functionality of the database via the command line. This interface is provided as part of the standard installation of CGE. The default JVM’s maximum memory allocation when launching cge-cli is 2GB.

The list of available CGE CLI commands can be retrieved by executing the cge-cli help command without any options, as shown below:
$ cge-cli help
Table 1. CGE CLI Commands and Descriptions
CommandDescription
cge-cli checkpointRequests checkpoint creation.
cge-cli echoAllows sending echo requests, which can be used to ping CGE.
cge-cli feLaunches a web-based interface for accessing the server and provides SPARQL endpoints, which can be accessed via standard SPARQL APIs and tooling.
cge-cli helpDisplays help information.
cge-cli get-configurationDetermines the locations being searched for configuration files and effective properties.
cge-cli keyword-lookupProvides help with converting keywords between names and indexes to help determine the log options to use with other commands.
cge-cli log-infoRetrieves the server's current logging setup.
cge-cli log-lookupProvides help with converting log levels between names and values to help determine the log options to use with other commands.
cge-cli log-reconfigureReconfigures the default logging setup of the server. The logging configuration changes persist until the server is shut down.
cge-cli nvp-infoRetrieves the current NVP setup of the server
cge-cli nvp-reconfigureReconfigures the default NVPs of the server. The NVP configuration changes persist until the server is shut down.
cge-cli output-infoRetrieves the current output directory for results from the server.
cge-cli output-reconfigureRequests that the output directory for results be changed. The changes made persist until the server is shut down.
cge-cli queryRuns queries against the server, takes in SPARQL queries from files or from stdin only when no other query options are provided
cge-cli sparqlRuns a mixture of queries and/or updates against the server, takes in SPARQL queries/updates from files or from stdin only when no other input options are provided
cge-cli updateRuns updates against the server, takes in SPARQL updates from files or from stdin only when no other update options are provided
cge-launchLaunches the CGE Query Engine
cge-cli generate keystore Creates/inspects a Java keystore file, which is used to enable SSL support for the fe command.
cge-cli generateGenerates a Shiro configuration template that can be customized as desired.
cge-cli generate propertiesCreates a properties file that can be used to provide a variety of configuration to commands, without needing to specify it directly at the command line.
Use the cge-cli help command to retrieve help information for a specific CGE command, as shown in the following example:
$ cge-cli help command

Command Output

CGE CLI commands produce the following types of output:
  • Logging - Provides diagnostic information about what a command is doing and is useful primarily for diagnosing any issues that may occur. All logging output goes to standard error.
  • Command Output - Provides actual informational output of the command's status, such as query results, update success/failure etc.  All command output is transmitted to the standard output.

As each type of output goes to a different output stream. Output can easily be separated using standard shell redirection, as shown in the following example:

$ cge-cli query example.rq > results.txt 2> query-client.log
The above example redirects the command output to the results.txt file and the logging to query-client.log file.