In our office, Onlyoffice desktop application is installed on Mac computers, users do not have administrator rights and therefore cannot update the application themselves.
To make the administrator’s work easier, it is necessary to be able to run the update from the macos terminal
Desktop Editors are packaged as .dmg, thus for respective systems you can mount those DMG files to get the contents for an “update”, copy those contents to ONLYOFFICE.app in /Applications and then unmount .dmg. You can rely on any utils tool that works with mounts.