TLDR: https://github.com/Nosrac/KeyboardMaestroCLI
KeyboardMaestroCLI
An unofficial command line utility for interfacing with Keyboard Maestro. Currently only supports running macros.
Usage Example:
km run "Display Notification" -p "Yippity Doo!"
ARGUMENTS:
Name or ID of the script to run
OPTIONS:
-p, --parameter 
Parameter to pass to your script
-h, --help              Show help information.
ADDITIONAL SUBCOMMANDS
  enable                  Enables a macro
  disable                 Disables a macro
  macros                  List your macros
  groups                  List your macro groups
  variables               List your variables
  variable                Query, edit, delete variables
  raw                     Executes a raw script via XML