It’s well known how to call LibreOffice (soffice) from a terminal / shell. It may then open a file in different modes and/or run a macro.
However, the macro doesn’t get passed any arguments, and I can’t find a way to see them / the command line.
Example:
C:\Users\user>soffice "vnd.sun.star.script:Standard.zzXX.treatFile?language=Basic&location=application&filepath=C:\Users\user\Documents\_some\expl.ods"
The macro is called as expeceted, but doesn’t see an argument as if it were called from a link inside a document. Generally I would expect that the API gives access to a command line or otherwise to the parameters soffice was called with (last time if multiply).