Where Is the Hammerspoon Config File?
Hammerspoon keeps its Lua config at ~/.hammerspoon/init.lua on Mac, with Spoons beside it and one defaults key to move it.
Last updated
Everything Hammerspoon runs lives in ~/.hammerspoon, and the file that matters is init.lua inside it. First launch with no config shows a notification pointing at the getting started guide instead of failing silently.
Backing up is just copying that one folder. Your init.lua plus the Spoons subdirectory carry the whole setup to a new Mac. Reload from the menu bar icon after edits, or add an hs.pathwatcher block so saving the file reloads it automatically.
Where Hammerspoon stores this, by platform
~/.hammerspoon/init.lua
Create init.lua here if it does not exist yet. Reach it in Finder with Go > Go to Folder, since .hammerspoon is hidden. Spoons install to the Spoons subfolder beside it.
Frequently asked questions
Where do Hammerspoon Spoons live?
Spoons live in ~/.hammerspoon/Spoons, one folder per Spoon. Installing a Spoon is just dropping its .spoon bundle there and calling hs.loadSpoon from init.lua.
Can I move the Hammerspoon config out of my home folder?
Run defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua" (or any path you like), then restart Hammerspoon. The Spoons directory follows the config file, so everything moves together.
Notice an outdated path? Let us know.