I want to be able to reload the config from the command line tool, can I do that? In 'getting started' there is only the example with hotkey I believe.
Thank you for any help.
I think what you're looking for is hs.reload().
If you want to do it strictly from the command line (Terminal), try hs -c "hs.reload()"
does not work :

Take a look at the documentation for hs.ipc... If you don't have Dash or don't want to use the web pages, you can type help.hs.ipc into the Hammerspoon console. Probably the most relevant portion is:
> help.hs.ipc.cliInstall
Function: hs.ipc.cliInstall([path][,silent]) -> bool
Installs the `hs` command line tool
Parameters:
* path - An optional string containing a path to install the tool in. Defaults to `/usr/local`
* silent - An optional boolean indicating whether or not to print errors to the Hammerspoon Console
Returns:
* A boolean, true if the tool was successfully installed, otherwise false
hs.ipc.cliInstall creates symbolic links to the hs binary and hs.1 man page included in the Hammerspoon application bundle at the path you specify... if you're only using the Hammerspoon releases or always install Hammerspoon when you build it to the exact same location, you should only need to run this once. Or, like some do, it's safe to put it into your init.lua file -- this will cause error messages to appear in the console when you start Hammerspoon if it can't match existing links to the currently running version of Hammerspoon.
Oh, and I should probably clarify this in the docs at some point -- the path assumes that binaries go into path .. "/bin", and man pages go into path .. "/share/man/man1", so just include the prefix (i.e. "/usr/local", not "/usr/local/bin") if you want a location other than /usr/local.
I am not quite sure what I should write to get the cli commands working. Typing in hs.ipc.cliInstall says that command is not found. It seems that I do not have the 'hs' command at all on my system.
The commands needs to be typed into the Hammerspoon console. If you have the Hammerspoon icon in your Dock, click on it, and then when it is the active application, tap Command-R to bring up the console.
If you don't have the Dock icon, but do have the Hammerspoon icon in your status menus, click on the icon and select "Console..." from the menu.
If you've disabled both in the Preferences, in the Terminal application type open -a Hammerspoon. This will either open up the Hammerspoon console (it should, if Hammerspoon is already running), or if it appears to do nothing, try tapping Command-R before clicking on anything else.
One of these methods should give you a screen that looks something like:

The text field highlighted in blue at the bottom is where you should try typing in commands like help.hs.ipc and help.hs.ipc.cliInstall.
Hope this helps!
This makes sense, I didn't think you would need to type it in the console.
I have run the command in the console and get this :

I would suppose then typing hs -c "hs.reload()" would work from my bash terminal prompt. Or am I misunderstanding something?
You left off ()
Without the parenthesis, lua sees this as a request to show the value of hs.ipc.cliInstall, which it has -- it's a function. Add the parenthesis, and it will execute the function.
And yes, once installed, that command line should reload your hammerspoon configuration. I should also point out that you will want to add require("hs.ipc") in your init.lua file somewhere... or hs.ipc.cliInstall() -- as I mentioned earlier, running this each time you load won't cause a problem and might even warn you if the links to the command or man page get out of sync with your Hammerspoon installation (shouldn't happen unless you work with development builds, but you never know!)
The reason for adding some reference to hs.ipc in your init.lua file is to make sure that it loads the necessary backend support -- Hammerspoon has to open up a Mach port for the external command to access -- loading the hs.ipc module, either with require("hs.ipc") or by taking advantage of Hammerspoon's module autoload feature with hs.ipc.cliInstall() makes sure that this happens every time you start up Hammerspoon.
Thank you a lot. This works. :)
Most helpful comment
I think what you're looking for is
hs.reload().If you want to do it strictly from the command line (Terminal), try
hs -c "hs.reload()"