Trigger keyboardmaestro actions by shell script?

image

e.g. Is there a way to execute these actions by a shell script? so that other app can run this script to execute keyboard maestro actions。

Yes, if you mean trigger your Macro. If you look here it mentions triggering Macros by Shell Script.

If you choose "Or by script" at the top of the Macro you get a choice of script types, including Shell Script. This will show example code that you can copy/paste/edit. The current Macro ID is already included in the code.