/
CLI for Synergy

CLI for Synergy

Using Agent via command line interface (CLI) executable


Previously (versions prior to 3.0) it was possible to call the Agent executable with parameters to change classification/distribution/compliance of a file from command line.

Starting with version 3.0 we do ship a separate CLI executable with each Agent installation (GVClient.CLI.Windows.exe) that can be used to:

  • manually apply a given classification to a file

  • manually apply a given distribution to a file

  • manually apply a given compliance to a file

  • apply classification/distribution/compliance as described in Expert Configuration, section “externalLabelMappings”

For the CLI functionality to work as expected in this document Agent version 3.5.9 is required.

What does it do?

By calling the CLI with parameters we run actions listed in previous paragraph and as a result ADD or OVERWRITE metadata of requested file.

What it does not do?

It is not possible to REMOVE any metadata from the file, you can only ADD or OVERWRITE.

It is not possible to add visual markings to the file (December 2023).

No machine learning capabilities - we need user to provide required classification/compliance/distribution as parameter.

Supported files

Setup and functionality

Basic functionality and parameters

To classify a file using CLI and add PCI compliance you can run it as:

GVClient.CLI.Windows.exe filename.docx --silent --overwrite --save --tag e16409a7-1700-4153-9090-3955bc2f0ae8/Classification/Confidential --tag f14fc1f1-8950-40d5-8a29-45909da947d6/PCI/true

--silent - Optional. Silent executes the command in the background.

--save - Optional. A “Save” parameter is required to write changes to the files. W/o “save” the commands are executed in a “dry-run” mode

--tag - Optional. Tag parameter specifies what labels to write to a file.

--map-external - Optional. Map-external will use the mapping specified in the configuration under the “externalLabelMappings” stanza, as shown in the screenshot below. This parameter checks file’s metadata with the regex specified in the configuration and applies a GV label specified in tagset and tag sections of the externalLabelMapping stanza of the configuration.

--overwrite - Optional. Overwrite means to disregard all existing GV tags inside of a file. For example if we want to tag a file, and a file is already tagged by GV, then we won’t overwrite GV tag if the overwrite option is specified.

Running CLI will result in logs being shown in the console. You can redirect the logs to a file or null device if you are running the CLI for multiple files.

Sample result:

Applying classification based on existing metadata content

Please refer to: Boldon James migration

Other limitations

User under which the CLI is executed needs access/write rights to a file you are trying to modify. This may cause issues if CLI is executed under different user context.

Troubleshooting

Log files for CLI can be located at:

%AppData%\Roaming\GVClient.CLI.Windows\Logs

Example of log after running CLI with --map-external:

 

Related content

Agent CLI Usage Guide
Agent CLI Usage Guide
More like this
Admin Guide Agent v4
Admin Guide Agent v4
Read with this
Synergy Supported File Types
Synergy Supported File Types
More like this
User selects classification lower than AI suggested details
User selects classification lower than AI suggested details
Read with this
Synergy Support: Troubleshooting Agent for Windows
Synergy Support: Troubleshooting Agent for Windows
More like this
Synergy Server Installation Guide
Synergy Server Installation Guide
Read with this

Classified as Getvisibility - Partner/Customer Confidential