# Hammerspoon

Hammerspoon tool for keyboard\-driven desktop automation or reusable text expansion\.

ID: Q727 · Revision: 775

Type: software · License: MIT[^hammer-license] · Status: active

Website: https://www.hammerspoon.org/



Hammerspoon is an open\-source macOS automation environment that connects a Lua scripting engine to operating\-system APIs\. It can coordinate windows, applications, input, clipboard data and system events\. It does not provide a finished workflow immediately after installation: users supply a Lua configuration or load suitable extensions\.[^hammer]

## Capabilities and substitutions

### All\-Space window enumeration — limited

The general allWindows API is limited to the current Space; broader tracking uses other APIs\.[^hammer-window]

Use case: Desktop automation and text expansion · Platforms: macOS · Region: Operating\-system, application and permission requirements apply

### [Substitute for Keyboard Maestro](/keyboardmaestro) — limited

Suitable for macOS shortcut and event automation when Lua authoring is acceptable; macros must be rewritten\.[^hammer][^km-macros]

Use case: Desktop automation · Platforms: macOS · Region: Operating\-system, application and permission requirements apply

## References

[^hammer-license]: [Hammerspoon license](<https://github.com/Hammerspoon/hammerspoon/blob/master/LICENSE>) — MIT license (vendor; retrieved 2026-10-07T05:10:26Z)

[^hammer]: [Hammerspoon](<https://www.hammerspoon.org/>) — macOS Lua bridge; events, windows and configuration requirement (vendor; retrieved 2026-10-07T05:10:14Z)

[^hammer-guide]: [Hammerspoon getting started](<https://www.hammerspoon.org/go/>) — Accessibility, Lua configuration, Spoons, variable lifetimes and reload (vendor; retrieved 2026-10-07T05:10:26Z)

[^hammer-window]: [Hammerspoon window API](<https://www.hammerspoon.org/docs/hs.window.html>) — allWindows current\-Space limit; window\.filter alternative (vendor; retrieved 2026-10-07T05:10:44Z)

[^km-macros]: [Keyboard Maestro macros](<https://wiki.keyboardmaestro.com/manual/Macros>) — Triggers, ordered actions, application groups; live saving; recorder edits (vendor; retrieved 2026-10-07T05:11:59Z)

Source revision: https://substitutefor.net/entities/Q727?revision=775
