Modes of operation

TonCut for Automation may be run in one of two modes, either as a Windows service or a command line tool.

Windows service

The service version of the application accepts only one command line parameter. The rest of the settings can be configured using the TonCut for Automation Configurator application. You can also check there if the connection is working correctly.

Command Description
-reload-ssl-cert Reload SSL certificate and key.

Command line

The command line version can also work in server mode, but this is rather for development purposes only. Normally you should install TonCut for Automation as a Windows service if you want to use it in server mode.

When using in command line mode you can provide input data as a file or send it directly to stdin. The same applies to output data - you can write it to a file or send to stdout for further processing.

Note that you should use -q option when sending output to stdout.

Different ways to handle data in command line mode

rem Using files only
TonCutForAutomation.exe -c config.json -i input.json -o output.json

rem Using stdin & stdout
type input.json | TonCutForAutomation.exe -q -c config.json > output.json

rem Mix files and stdout
TonCutForAutomation.exe -q -i input.json -c config.json > output.json

rem Full batch chain
SomeApp.exe | TonCutForAutomation.exe -q -c config.json | SomeOtherApp.exe
Command Description
-c <config.json> Configuration file. It is a JSON file containing the configuration data group.
-i <input.json> Input data for command line mode (excludes -s). It is a JSON file containing the input data group.
-o <output.json> Write results to specified output JSON file. It is a JSON file containing the output data group.
-s Server mode (excludes -i and -o).
-lu {mm|cm|in} Selects length units for results.
-fu {sqmm|sqcm|sqm|sqin|sqft} Selects field units for results.
-au {deg|rad} Selects angle units for results.
-p <port> HTTP port to listen on (used only in server mode).
-cert <path> Path to SSL certificate file (used only in server mode).
-key <path> Path to SSL private key file (used only in server mode).
-reload-ssl-cert Reload SSL certificate and key (used only in server mode).
-q Silent mode (used only in command line mode).
-h Print usage information.