Install the CLI

There is the official hs.ipc.cliInstall() command but it requires you to make /usr/local/bin writable for the login user. So just do it manually

sudo ln -s /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs /usr/local/bin