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:
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 | Description |
|---|---|
| cge-cli checkpoint | Requests checkpoint creation. |
| cge-cli echo | Allows sending echo requests, which can be used to ping CGE. |
| cge-cli fe | Launches a web-based interface for accessing the server and provides SPARQL endpoints, which can be accessed via standard SPARQL APIs and tooling. |
| cge-cli help | Displays help information. |
| cge-cli get-configuration | Determines the locations being searched for configuration files and effective properties. |
| cge-cli keyword-lookup | Provides help with converting keywords between names and indexes to help determine the log options to use with other commands. |
| cge-cli log-info | Retrieves the server's current logging setup. |
| cge-cli log-lookup | Provides help with converting log levels between names and values to help determine the log options to use with other commands. |
| cge-cli log-reconfigure | Reconfigures the default logging setup of the server. The logging configuration changes persist until the server is shut down. |
| cge-cli nvp-info | Retrieves the current NVP setup of the server |
| cge-cli nvp-reconfigure | Reconfigures the default NVPs of the server. The NVP configuration changes persist until the server is shut down. |
| cge-cli output-info | Retrieves the current output directory for results from the server. |
| cge-cli output-reconfigure | Requests that the output directory for results be changed. The changes made persist until the server is shut down. |
| cge-cli query | Runs queries against the server, takes in SPARQL queries from files or from stdin only when no other query options are provided |
| cge-cli sparql | Runs 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 update | Runs updates against the server, takes in SPARQL updates from files or from stdin only when no other update options are provided |
| cge-launch | Launches 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 generate | Generates a Shiro configuration template that can be customized as desired. |
| cge-cli generate properties | Creates 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. |
$ cge-cli help commandCommand 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.logThe above example redirects the command output to the results.txt file and the logging to query-client.log file.