Hammerspoon Overview
Hammerspoon is a macOS automation framework based on Lua. Through the hs modules it calls system APIs directly to enable low-latency control of keyboard shortcuts, window management, the menu bar, file/directory watching, network requests, accessibility events, and more.
Core features & highlights
- Write scripts in
Luato customize event handling and workflows - Rich modules like
hs.hotkey,hs.window,hs.eventtap,hs.filewatcher, etc., to directly control system functions - Supports community extensions (Spoons) and hot-reloading for a smooth development and debugging experience
Suitable scenarios and target users Suitable for developers, DevOps engineers, and advanced macOS users, or anyone who needs fine-grained workflows, key remapping, automated repetitive tasks, or cross-application automation.
Key advantages
- Highly customizable: code-driven configuration enables flexible implementation of complex logic
- Low-latency performance: direct system API calls for fast responses
- Open source and community ecosystem: many existing Spoons and example scripts for easy extension and reuse
Note: Basic Lua knowledge and configuring macOS permissions are required, but once you get started it can greatly improve productivity and control.