Execution & Syntax

Script Locations

The CLI ships with OS-specific wrapper scripts. On a production (customer) installation, these scripts are copied to the tools/bin directory under HCL_UNICA_DETECT_HOME. In the source repository they are located under:

OS Production location
Windows %HCL_UNICA_DETECT_HOME%\tools\bin\CliTool.bat
%HCL_UNICA_DETECT_HOME%\tools\bin\setenv.bat
Linux $HCL_UNICA_DETECT_HOME/tools/bin/CliTool.sh
$HCL_UNICA_DETECT_HOME/tools/bin/setenv.sh
Note: setenv.bat / setenv.sh are sourced automatically by CliTool.bat / CliTool.sh. Before running the CLI, open the appropriate setenv script and verify that JAVA_HOME and HCL_UNICA_DETECT_HOME point to the correct installation directories for your environment.

Running the CLI

Windows (production):

cd %HCL_UNICA_DETECT_HOME%\tools\bin
CliTool.bat <command> [options]

Linux (production):

cd $HCL_UNICA_DETECT_HOME/tools/bin
./CliTool.sh <command> [options]
Note: Linux only: Ensure the script is executable before first use:
chmod +x $HCL_UNICA_DETECT_HOME/tools/bin/CliTool.sh
chmod +x $HCL_UNICA_DETECT_HOME/tools/bin/setenv.sh

Running Directly with Java (Advanced)

If you prefer to invoke the CLI without the wrapper scripts:

Windows:

java -cp "%HCL_UNICA_DETECT_HOME%\tools\lib\*" com.hcl.unica.detect.cli.CLIMain <command> [options]

Linux :

java -cp "$HCL_UNICA_DETECT_HOME/tools/lib/*" com.hcl.unica.detect.cli.CLIMain <command> [options]
Tip: On Windows use ; as the classpath separator. On Linux use :.

Getting Help

Windows:

CliTool.bat --help
CliTool.bat get-all-datasource-names-for-logged-in-user --help

Linux :

./CliTool.sh --help
./CliTool.sh get-all-kafka-cluster-names --help