Hammerspoon
ActiveOverview
Hammerspoon is a desktop automation tool for macOS that uses Lua scripting to control applications, windows, and system events. It enables users to create custom keyboard shortcuts, manage windows, launch apps, and automate workflows through an extensible API. Targeted at power users and developers seeking fine-grained macOS customization beyond built-in tools.346
Key Features
- Window Management - Resize, move, and arrange application windows programmatically using Lua scripts.4
- Application Control - Launch, focus, and interact with running applications by name or path.3
- Keyboard Shortcuts - Bind custom hotkeys to scripts for app launching and system actions.24
- Lua Scripting - Extend functionality with Lua code accessing macOS APIs for automation.56
- URL Handling - Route URLs to specific browsers or profiles via dispatchers.12
- API Documentation - In-app console with full API help via docs.json for scripting reference.56
- Spoons System - Modular extensions (spoons) for tasks like sending to OmniFocus or browser management.2
Pricing
| Plan | Price | Includes |
|---|---|---|
| Community | Free | Full access to all features and source code. |
Platforms & Requirements
Runs exclusively on macOS, distributed as a standalone app bundle. Compatible with recent macOS versions; requires Lua interpreter embedded in the app. No support for other platforms like Windows or Linux.
Integrations & Ecosystem
- Lua scripting language
- macOS Accessibility APIs
- Google Chrome profiles
- OmniFocus (via spoons)
- Epichrome site-specific browsers
- Clipboard operations
- Screenshot utilities
Alternatives
| App | Difference |
|---|---|
| Rectangle | Free window manager with simple GUI resizing; lacks scripting extensibility. |
| BetterTouchTool | Paid tool for gestures and shortcuts; less focus on Lua-based automation. |
| Alfred | Launcher with workflows; more GUI-oriented, limited window management. |
| Keyboard Maestro | Paid macro tool with visual editor; no open-source Lua scripting. |
Reputation
Hammerspoon is praised by power users for its powerful Lua-based automation and deep macOS integration, enabling complex customizations like hyper-key shortcuts and window snapping.4 Users appreciate its active community and spoons ecosystem for extensibility.2 Criticisms include a steep learning curve due to scripting requirements and lack of beginner-friendly GUI.7
Sources (7)
- https://github.com/gokamoda/ChromeProfileSelector
- https://zzamboni.org/post/my-hammerspoon-configuration-with-commentary/
- https://www.hammerspoon.org/docs/hs.application.html
- https://news.ycombinator.com/item?id=29533495
- http://www.hammerspoon.org/docs/0.9.91/hs.html
- https://www.hammerspoon.org/docs/hs.html
- https://joonakeskitalo.github.io/2024/06/14/Useful-things/