About Hammerspoon
Hammerspoon is a free automation tool for macOS that links the operating system to a Lua scripting engine. By itself it does nothing; you create an init.lua file in a .hammerspoon folder in your home directory and fill it with scripts that tell your Mac what to do.
Its flexibility comes from a large set of extensions that expose pieces of system functionality to Lua, such as window management, application control, keyboard shortcuts and reactions to system events. People use it to build custom hotkeys, tile windows, automate repetitive tasks and wire apps together in ways the stock system does not allow. A Discord server and shared configurations help newcomers get started.
Hammerspoon is MIT-licensed and installs either by dragging the app into Applications or with the Homebrew cask. It runs locally on macOS only, so there is no server to manage and no hosted version, and it suits power users and developers who like to script their desktop.
Key features
- Lua scripting bridge to macOS
- Window management and layout control
- Custom hotkeys and keyboard automation
- Application and system event hooks
- Modular extensions for system functions
- Installable via Homebrew cask
Good fit for
- Custom window tiling on macOS
- Building personal keyboard shortcuts
- Automating repetitive desktop tasks
Hammerspoon: questions and answers
- What is Hammerspoon used for?
- Hammerspoon is a macOS automation tool that exposes system functions to Lua scripts, letting you control windows, apps, hotkeys and more. It is a good fit for custom window tiling on macOS, building personal keyboard shortcuts and automating repetitive desktop tasks.
- Is Hammerspoon open source?
- Yes. Hammerspoon is open source under the MIT licence. Its source code is on GitHub at Hammerspoon/hammerspoon and is written mainly in Objective-C.
- Is Hammerspoon free?
- Yes. Hammerspoon is open source, so the software itself is free to use.
- What is Hammerspoon an alternative to?
- Hammerspoon is an open-source alternative to Keyboard Maestro, Hazel, Apple Shortcuts and BetterTouchTool. Other open-source alternatives to Keyboard Maestro include Karabiner-Elements and AutoHotkey.
- Is Hammerspoon actively maintained?
- The most recent commit to Hammerspoon was on 8 July 2026, and the latest release is 1.1.1, published on 26 February 2026. The project has 16k stars on GitHub, with 145 added in the last 30 days.
Open-source alternatives to Hammerspoon
See all
Rectangle
Productivity
Move and resize windows on macOS with keyboard shortcuts and snap areas
OSSvs BetterTouchTool★ 30k
Karabiner-Elements
Open source
Karabiner-Elements is a powerful tool for customizing keyboards on macOS
Unlicensevs Keyboard Maestro★ 23k
Amethyst
Utilities & System Tools
Automatic tiling window manager for macOS à la xmonad.
MITvs BetterTouchTool★ 16k
Slate
File Storage & Sharing
WIP - We're building the place you go to discover, share, and sell files on the web.
MITvs Dropbox★ 520
AutoHotkey
Workflow Automation
AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.
GPL-2.0vs Keyboard Maestro★ 13k
n8n
Workflow Automation
n8n is a workflow automation platform that uniquely combines AI capabilities with business
OSSvs Zapier★ 210k
SaaS alternatives to Hammerspoon
See all
Keyboard Maestro
Workflow Automation
macOS app for building keyboard-triggered macros that automate Mac tasks
SaaS
Hazel
Workflow Automation
macOS utility that watches folders and organizes files with rules automatically
SaaS
Apple Shortcuts
Workflow Automation
Automation app built into iOS, iPadOS and macOS for chaining actions across apps
SaaS
BetterTouchTool
Productivity
Mac utility to customize trackpad gestures, keyboard shortcuts and window snapping
SaaS
Magnet
Productivity
Window manager for macOS that snaps windows into screen positions
SaaS
Bartender
Productivity
Menu bar organizer for macOS that hides and rearranges menu bar icons
SaaS

