I recently had the need to have a program run every time my Mac was booted. In
this particular case, I’m using an old Mac Mini to host a variety of things
around the house, among them it runs homebridge with the
Broadlink RM plugin to control a Broadlink RM Pro device. The
Broadlink RM Pro uses WiFi to receive commands from Homekit, and controls my
20+ year old receiver. I’ll write more about this setup in the future, but
for now, lets focus on using launchd to automatically run the homebridge
node.js application.

For starters, I wanted to run the homebridge application at each boot. This
is a simple application which can be installed with homebrew, and is run
from the command line as /usr/local/bin/homebridge. Easy, right? After
some digging through man pages and reading some helpful post I
found online, I came up with the below as my plist file: