Sokrates command-line interface (CLI) includes five commands:
init,
generateReports,
updateConfig,
initLandscape, and
updateLandscape.
init command
The init command generates a new Sokrates configuration file based on standard source code conventions.
Figure 1: The init command generates a new Sokrates configuration file based on standard source code conventions.
generateReports command
The generatesReports command generates HTML reports and exports data files.
Figure 2: The generatesReports command generates HTML reports and exports data files.
updateConfig command
The updateConfig updates a configuration file and completes missing fields. You can also use the updateConfig command to upgrade your configuration file to the latest version.
Figure 3: The updateConfig updates a configuration file and completes missing fields.
initLandscape command
The initLandscape creates a Sokrates Landscape report and an initial landscape configuration file for landscape analyses.
Figure 4: The initLandscape creates a Sokrates Landscape report and an initial landscape configuration file for landscape analyses.
updateLandscape command
The updateLandscape updates a Sokrates Landscape report, adding new and removing non-existent projects without changing other settings in the landscape configuration file.
Figure 5: The updateLandscape updates a Sokrates Landscape report, adding new and removing non-existent projects without changing other settings in the landscape configuration file.
Example: A Getting Started Video
See a 5 minutes video on using Sokrates CLI to analyze source code of Sokrates:
Example: Running Sokrates as a Batch Process
The following bash script illustrates a more complex scenario of using multiple commands of the Sokrates CLI.
Figure 5: A bash script illustrating a more complex scenario of the Sokrates command-line interface.