# Hammerspoon

> Free, open-source macOS automation scripted in Lua

Hammerspoon is a free, open-source automation tool for macOS that connects system APIs to a Lua scripting engine. Users write a Lua configuration file that ties events, such as a hotkey, a Wi-Fi change or an app launching, to actions such as moving windows, showing alerts or running AppleScript. It does nothing until it is configured, and pre-made plugins called Spoons cover common jobs.

- **Category:** Desktop Utilities
- **Made by:** Hammerspoon contributors (since 2014)
- **Website:** https://www.hammerspoon.org
- **Runs on:** macOS
- **Facts last checked:** Oct 6, 2026

## Pricing

Hammerspoon is free to use.

- **Pricing model:** Free
- **Free plan:** The whole app is free and open source under the MIT license. The developers do not take donations and suggest giving to a charity instead.
- **Free trial:** None listed.

| Plan | Price | What you get |
| --- | --- | --- |
| Hammerspoon | $0 | The complete app with every extension, as a direct download or a Homebrew cask. Open source under the MIT license. |

Read from https://github.com/Hammerspoon/hammerspoon on Oct 6, 2026. Prices change, so confirm with Hammerspoon before buying.

## Key features

- **Lua bridge to macOS:** Extensions expose macOS APIs for applications, windows, screens, audio devices, batteries, clipboards, Wi-Fi, location and low-level keyboard and mouse events to Lua code.
- **Hotkeys:** A keyboard shortcut can be bound to any Lua function, from showing a notification to running a series of window operations or an AppleScript.
- **Window movement and layouts:** Scripts can move and resize the focused window, arrange several apps' windows into a saved layout across screens, and use window filters to act on groups of windows.
- **Event watchers:** A configuration can react to application events, Wi-Fi network changes and USB devices, for example muting the volume when the Mac leaves the home network.
- **Spoons:** Spoons are pre-made plugins, installed by double-clicking a .spoon file and loaded from the config. The official list includes an app launcher and a window switcher.
- **Menu bar items and URL triggers:** Scripts can create menu bar items, draw on the screen and send iMessage or SMS messages, and other apps can trigger them through hammerspoon:// URLs.

## Good for

- Mac users comfortable writing Lua who want to script their own automation
- Custom window management driven by keyboard shortcuts
- Triggering actions from system events such as joining a Wi-Fi network

## Worth knowing

- macOS only. Release 1.1.1 lists a minimum of macOS 13.0; older Macs need an earlier release.
- Out of the box it does nothing: every behavior has to be written in Lua in ~/.hammerspoon/init.lua or added as a Spoon.
- It depends on the macOS Accessibility permission, which the user has to grant by hand in the system's privacy settings.
- Crash information is collected by default; the FAQ says this can be turned off in the preferences.

## Works with

AppleScript, Spotify, Music.app, Messages, Stream Deck, Asana

**Tags:** Workflow automation, Open source, Window management

## Alternatives

- [Keyboard Maestro](https://toolgpa.com/tools/keyboard-maestro): Macro automation for macOS with triggers and actions. [Compare](https://toolgpa.com/compare/hammerspoon-vs-keyboard-maestro)
- [BetterTouchTool](https://toolgpa.com/tools/bettertouchtool): Mac input customization: gestures, shortcuts and automation. [Compare](https://toolgpa.com/compare/bettertouchtool-vs-hammerspoon)
- [Karabiner-Elements](https://toolgpa.com/tools/karabiner-elements): Free, open-source keyboard customizer for macOS. [Compare](https://toolgpa.com/compare/hammerspoon-vs-karabiner-elements)
- [AutoHotkey](https://toolgpa.com/tools/autohotkey): Free, open-source scripting language for Windows automation. [Compare](https://toolgpa.com/compare/autohotkey-vs-hammerspoon)
- [Apple Shortcuts](https://toolgpa.com/tools/apple-shortcuts): Free automation app for iPhone, iPad and Mac, built by Apple. [Compare](https://toolgpa.com/compare/apple-shortcuts-vs-hammerspoon)

## Sources

The prices, plans, platforms and features above were read from these pages on Oct 6, 2026:

- https://www.hammerspoon.org/
- https://www.hammerspoon.org/go/
- https://www.hammerspoon.org/faq/
- https://www.hammerspoon.org/releasenotes/
- https://www.hammerspoon.org/Spoons/
- https://github.com/Hammerspoon/hammerspoon

Page: https://toolgpa.com/tools/hammerspoon
Listed by ToolGPA (toolgpa.com).
