Logo of Hammerspoon: Lua scripting bridge for automating windows, keyboard shortcuts, Wi-Fi events and more on macOS

Hammerspoon

Lua scripting bridge for automating windows, keyboard shortcuts, Wi-Fi events and more on macOS

Visit hammerspoon.org

Hammerspoon is an automation tool for macOS that connects the operating system to a Lua scripting engine. It's for power users and developers who are comfortable writing code to make their Mac react to events.

Key features:

  • Write Lua code that controls apps, windows, the mouse pointer, files, audio devices, screens, the clipboard, and Wi-Fi.
  • Bind a keyboard shortcut to a series of window operations or an AppleScript.
  • Run commands when events happen, such as joining your home Wi-Fi network or the battery dropping below a set level.
  • Add ready-made plugins called Spoons, or write your own extensions in Lua or Objective-C.

Hammerspoon does nothing out of the box; you configure it in ~/.hammerspoon/init.lua using the Getting Started Guide and API documentation. Install it by dragging the app to Applications, and check the release notes for versions that work on older macOS releases. It's an open source project on GitHub with a community Discord.

Press the keys to navigate to the next or previous product.