Description
Hammerspoon is an open-source tool for automating macOS with the Lua scripting language. At its core it is a bridge between the operating system and a Lua engine, and its power comes from extensions that expose parts of the system to scripts, including applications, windows, the mouse pointer, files, audio devices, batteries, screens, keyboard and mouse events, the clipboard, location services and Wi-Fi. A typical setup is a Lua configuration file that connects events to actions, such as a keyboard shortcut that runs a series of window moves, a command that runs when the Wi-Fi joins a home network, or an alert when the battery drops below a set level. Out of the box Hammerspoon does nothing, and the user writes a script in ~/.hammerspoon/init.lua. The project has a Getting Started guide, an API reference, and pre-made plugins called Spoons. To install it, you download the latest release and drag the app to the Applications folder, and older Macs can use an earlier release listed in the release notes. macOS requires the user to allow Hammerspoon in the Accessibility settings. Crash reporting is on by default and can be turned off in the preferences.…
Highlights
- Lua scripts that control macOS
- Windows, keyboard, clipboard and Wi-Fi access
- Spoons, pre-made plugins
- Accessibility permission needed on macOS
Ratings & Reviews
No ratings yet
Be the first to rate Hammerspoon.
People also visit
Hammerspoon FAQ
What is Hammerspoon?
A macOS automation tool that runs Lua scripts, letting you control windows, shortcuts, events and system features.
How do I install it?
Download the latest release from the site and drag the app to the Applications folder.
Where do I write my script?
In ~/.hammerspoon/init.lua, using Hammerspoon's APIs and standard Lua.
Why does it need extra permission?
macOS requires you to allow Hammerspoon in the Accessibility list under Security and Privacy before it can interact with the desktop.
Does it collect crash information?
By default, yes. The FAQ says this can be disabled in the Hammerspoon preferences.
What are the best Hammerspoon alternatives?
Popular alternatives to Hammerspoon include AutoHotkey, CrossMacro and HopTab. See all Hammerspoon alternatives




