OP's question is very poorly phrased. From a bit of web searching:
Savant is a home automation system that's hosted on OS X. Unfortunately, the website is all flash and no substance, so I gave up looking for documentation there.
scli
is a command line-based remote management program, used to control networked devices such as routers (and, presumably, a headless Mac Mini running a Savant server) via SNMP. Presumably sclibridge
is a vendor-specific implementation; it's not a common term.
Whether scli[bridge]
is used to control Savant directly is unclear, but I'm guessing probably not: it seems a bit low-level and general-purpose for that, so may just be for managing the Mac itself. It may well be that it includes an option for sending shell commands to the remote machine, avoiding the need to hop between scli
and ssh
all the time, but I didn't bother reading up in detail.
Quite how the OP got from there to wanting to run Ruby scripts I don't know, nor why their example code wants to talk to their Mac via Remote Apple Events, which aren't available on Linux. I suspect it's a mess of confusion largely due to lousy vendor docs.
At any rate, assuming they can use scli
or ssh
to run remote *nix commands, the simplest thing would be to add a bunch of executable AppleScripts to the Mac which the Linux box can then remote-execute just as it would any other shell command. e.g. Save the following as a plain-text (uncompiled AppleScript) file named kodi-remote
:
#!/usr/bin/osascript
on run argv
-- argv : list of string -- any arguments to `kodi-remote` command
if argv is {} or item 1 of argv is "help" then
log "Usage: kodi-remote [ run | quit | help ]"
return
end if
set cmd to item 1 of argv
if cmd is "run" then
tell application "Kodi" to run
else if cmd is "quit" then
tell application "Kodi" to quit
else
error "Unknown command: " & cmd number 1
end if
end run
Use chmod +x kodi-remote
to make it executable and put it somewhere that the remote shell can find it (e.g. /usr/local/bin
).
You can test it locally by opening a new window in Terminal.app and running:
kodi-remote run
kodi-remote quit
The same commands should then work in whatever you use to run remote shell commands on the Linux box.