Executing Agents Interactively via the CLI

The CodeLogic Agents can be executed interactively from the CLI. Executing an agent interactively allows you to view specific decompositions immediately.

An example Linux CLI is in /opt/codelogic/java/run_agent.sh and /opt/codelogic/sql/run_agent.sh. The Windows CLI is in C:\Program Files (x86)\CodeLogic\java\run_agent.bat. The example CLIs are also listed below.

The examples assume that java is Java 11.

A list of commands executed while in the shell is saved in a text file of the current working directory.

Depending upon the User ID on a Linux system, the default permissions of the /opt/codelogic directory may require a sudo su command to use the root account. Similarly, a Windows system may require starting a cmd terminal as an Administrator.

The interactive agent must be registered and approved. It will appear in Administration > Agents.

  1. Start the Interactive Shell.

    Alternatively, the run_agent.sh (Linux) or run_agent.bat (Windows) script is used to run the agent interactively.

  2. Authorize the Interactive Agent.

    Every agent must be authorized before it will communicate with the CodeLogic Server. The interactive agent will output a reminder.

  3. Interactively Analyze a JAR.

    This example analyzes /usr/share/apport/apport.jar and sends the metadata to the CodeLogic Server.


    Timestamps are omitted and blank lines are inserted for clarity.

    When the scan is complete you will receive a message. Please note that it may take a few minutes for the results to appear in your CodeLogic Server.


    Interactive Shell Help

    The interactive shell has a help facility. The default destination for an analysis is the CodeLogic Server. Several actions are demonstrated below using the Java Agent.

    Some output is omitted for clarity.

    The prompt changes to the name of the agent.

    Type exit to leave the interactive shell.