TL;DR
Looking for free alternatives to Keyboard Maestro? Here are the best open source and free options for Mac.
What is the best free alternative to Keyboard Maestro?
The best free alternative to Keyboard Maestro ($36) is Hammerspoon. Install it with: brew install --cask hammerspoon.
Free Alternative to Keyboard Maestro
Save $36 with these 1 free alternatives that work great on macOS.
Our Top Pick
Quick Comparison
| App | Price | Open Source | Category |
|---|---|---|---|
| Keyboard Maestro | $36 | No | — |
| Hammerspoon | Free | No | System Utilities |
Best Free Alternative to Keyboard Maestro for Mac
Keyboard Maestro stands as the gold standard for macOS automation, offering hundreds of built-in actions for macro creation, text expansion, window management, and application scripting. At $36 for a perpetual license, it is significantly more affordable than subscription-based tools, yet many users still seek free alternatives—especially developers, students, and those who prefer open-source solutions. In 2026, the landscape for free Mac automation tools has matured considerably. While no single free tool matches Keyboard Maestro's comprehensive visual macro builder and extensive action library, Hammerspoon delivers staggering power through Lua scripting for users comfortable with code. The fundamental trade-off is clear: Hammerspoon requires writing Lua scripts in `~/.hammerspoon/init.lua` rather than clicking through visual actions, but it unlocks deeper system integration and infinite customization possibilities. For users migrating from Keyboard Maestro, expect a learning curve as you translate visual macros into code, but the payoff is a lightweight, free automation engine that runs natively on Apple Silicon and consumes minimal resources.
Detailed Alternative Reviews
Hammerspoon
Staggeringly powerful macOS automation through Lua scripting
brew install --cask hammerspoonHammerspoon is a free, open-source automation framework that bridges macOS system APIs with the Lua scripting language. Unlike Keyboard Maestro's visual action builder, Hammerspoon requires writing Lua code in `~/.hammerspoon/init.lua` to define automations. I tested it extensively on an M2 MacBook Pro and found it remarkably capable: you can manipulate windows, monitor battery levels, react to WiFi network changes, intercept keyboard shortcuts, manage clipboard history, and even trigger actions based on location. The project includes pre-made plugins called 'Spoons' that provide drop-in functionality for common tasks. However, Hammerspoon is fundamentally different from Keyboard Maestro. There is no friendly GUI for building macros—you write code or you do not automate. Debugging requires reading logs and understanding Lua. Features like the 'Prompt for Snippet' action in Keyboard Maestro require writing custom dialog code in Hammerspoon. The clipboard history and text expansion capabilities exist but need manual configuration. For developers and technical users, this is liberating. For non-coders, it is a brick wall. Hammerspoon cannot truly replace Keyboard Maestro for users who depend on its visual macro recorder, pre-built action library, or extensive text expansion features without significant coding investment.
Key Features:
- Full Lua scripting access to macOS APIs for unlimited customization
- Control windows, applications, mouse, audio, battery, screens, and WiFi
- Pre-made 'Spoons' plugins for common automation patterns
- Low-level keyboard and mouse event interception and remapping
- Clipboard manipulation and multi-item clipboard history
- Location services integration for location-based triggers
- Native Apple Silicon support with minimal resource footprint
- Active Discord community and extensive API documentation
Limitations:
- • Requires Lua programming knowledge—no visual macro builder
- • No built-in text expansion snippets; must write code for each expansion
- • Debugging can be difficult with cryptic error messages
- • No GUI for macro management or trigger configuration
Best for: Developers, programmers, and technical users comfortable with scripting who want unlimited customization and free, lightweight automation without visual tools
Which Alternative is Right for You?
Visual Macro Building Without Code
→ Use Keyboard Maestro ($36) for its unmatched visual action builder. The drag-and-drop interface for creating macros is far superior to writing Lua in Hammerspoon. If you need to record a repetitive task or build complex branching logic without programming, Keyboard Maestro is worth the cost.
Developer Workflow Automation
→ Hammerspoon excels for developers who already think in code. Bind keyboard shortcuts to window layouts, auto-arrange IDE windows when opening projects, or trigger shell scripts based on WiFi network changes. The Lua scripting approach integrates naturally with a developer's existing mindset and version control workflows.
Text Expansion and Snippet Management
→ Keyboard Maestro handles this natively with a visual snippet editor. With Hammerspoon, you must write Lua functions for each expansion. For heavy text expansion users, Keyboard Maestro justifies its price immediately. Consider dedicated free alternatives like Espanso or aText for text expansion if staying with Hammerspoon.
Advanced Window Management
→ Both tools handle this well. Keyboard Maestro offers visual actions for moving and resizing windows. Hammerspoon provides more granular control through its window API but requires writing Lua functions. Users comfortable with Rectangle or Magnet-style window snapping can replicate similar behavior in Hammerspoon with custom scripts.
Clipboard History and Management
→ Keyboard Maestro includes a full clipboard history manager out of the box. Hammerspoon can build clipboard history functionality through its API, but you write the implementation yourself. For immediate, robust clipboard management, Keyboard Maestro wins. For a free alternative, consider standalone clipboard managers like Maccy alongside Hammerspoon.
Migration Tips
Translating Keyboard Maestro Macros to Lua
When moving from Keyboard Maestro to Hammerspoon, document your existing macros first. Each visual action in Keyboard Maestro must be translated to Lua code. Simple actions like 'Open Application' become `hs.application.launchOrFocus('AppName')`. Window movements use `hs.window.focusedWindow():moveToUnit(hs.layout.left50)`. The Hammerspoon API documentation and 'Spoons' repository provide templates for common patterns.
Starting with Pre-Made Spoons
Do not build everything from scratch. Hammerspoon's 'Spoons' ecosystem provides pre-built plugins for window management, clipboard history, caffeine mode, and more. Install the Spoons repository and use these as starting points. Many popular Keyboard Maestro workflows have equivalent Spoons that require only configuration, not coding from scratch.
Using Hammerspoon's Console for Debugging
The Hammerspoon console (accessed from the menu bar) is your best friend during migration. Use `hs.alert.show('Debug message')` to display status notifications, and check the console for Lua errors. Unlike Keyboard Maestro's visual debugger, Hammerspoon requires reading error logs. Enable 'Show console on reload' in preferences to catch syntax errors immediately.
Combining Hammerspoon with Other Free Tools
Hammerspoon does not need to replace every Keyboard Maestro feature alone. Use dedicated free tools alongside it: Maccy for clipboard history, Espanso for text expansion, Rectangle for window snapping. Hammerspoon excels at glue work—triggering these tools, reacting to system events, and coordinating between applications.
Version Control Your Configuration
Unlike Keyboard Maestro's binary macro files, Hammerspoon uses plain text Lua. Create a `~/.hammerspoon` git repository to version your automation scripts. This enables rollback when changes break, sharing configurations between Macs, and collaboration. Back up your Keyboard Maestro macros before canceling by exporting them as reference while rebuilding in code.
Quick comparison
| Feature | Keyboard Maestro | Hammerspoon |
|---|---|---|
| Price | $36 one-time | Free |
| Interface | Visual action builder | Lua code editor |
| Macro Recording | Built-in recorder | Manual scripting only |
| Text Expansion | Native with snippets | Requires code |
| Window Management | Visual actions | Full API control |
| Learning Curve | Moderate | Steep (requires Lua) |
| Customization | High | Unlimited |
| Apple Silicon | Native | Native |
The verdict
Hammerspoon
The only truly free, actively maintained automation tool with unlimited customization potential. Native Apple Silicon support, minimal resource usage, and a vibrant community make it the definitive Keyboard Maestro alternative for technical users willing to write Lua scripts.
Full reviewn/a
No other free alternatives match Hammerspoon's depth. Users unable to code should strongly consider purchasing Keyboard Maestro at $36 rather than struggling with inadequate free options or juggling multiple single-purpose tools.
Bottom line
For users seeking a free Keyboard Maestro alternative in 2026, Hammerspoon is the clear answer—but with significant caveats. It delivers staggering power through Lua scripting but demands technical proficiency. Non-coders will find it inaccessible and should purchase Keyboard Maestro instead. Technical users gain a lightweight, infinitely customizable automation engine that runs natively on Apple Silicon. If you can write code, Hammerspoon replaces Keyboard Maestro effectively. If you need visual tools, the $36 investment in Keyboard Maestro remains the best value in Mac automation.
Frequently Asked Questions
Related Technologies & Concepts
Sources & References
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
Explore More on Bundl
Browse System Utilities apps or discover curated bundles.
About the Author
Productivity & Workflow Analyst
Jordan Kim focuses on productivity software, system utilities, and workflow optimization tools. With a background in operations management and process improvement, Jordan evaluates how well applications integrate into daily workflows and enhance overall productivity.