I'm trying to automate the installation of a Universal Forwarder, the download and installation of the package is ready, the configuration of the forward-server and the inputs is done, but i've found no way to set the compression to true via the CLI.
The command "add forward-server" allows to configure the certificates, but there is no mention about the compression setting.
There is no way to do this via CLI, and generally there any many settings that can not be set via CLI commands. (They can be set by config file or via REST API call.)
You should generally automate installations by supplying the desired end-state, rather than trying to specify a procedure. In this case, that means that you should simply put a config file with the appropriate settings you want into your install, rather than running CLI commands to modify the files for you. Splunk's configuration file layering system makes this pretty modular and straightforward.
I appreciate there are a lot of possible parameters to cover but it seems like not supporting at least the most important param's (e.g. forwarder will fail to upload data if compressed is not set correctly) makes the dev effort of trying to support any via CLI a little pointless in the long run.