Hammerspoon

A bridge between macOS and Lua that lets a short script move windows, bind hotkeys and react to system events.

These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.

1 more ways to get Hammerspoon

Package managers

About Hammerspoon

Hammerspoon exposes chunks of macOS to a Lua interpreter. Its extensions cover windows, screens, spaces, hotkeys, the menu bar, wifi networks, battery state, USB devices, files, timers and more, so a few lines of Lua can tile your windows, mute the mic when you join a call, or switch audio output when you plug in headphones.

Out of the box it does nothing at all. You create `~/.hammerspoon/init.lua` and write the behaviour you want, which is either the appeal or the deal-breaker depending on how you feel about configuration as programming. The getting started guide and a pile of published sample configs make the first hour much easier.

Strengths

  • Extensions reach a large part of macOS: windows, spaces, hotkeys, wifi, battery, USB, menu bar and more
  • Lua is small enough to learn in an afternoon
  • Huge collection of published sample configurations to start from
  • One app rather than a dozen small utilities each doing one trick

Limitations

  • Does nothing until you write a config file, so there is no point installing it casually
  • macOS only
  • Needs broad accessibility and automation permissions to work
  • Some extensions break when Apple changes system internals in a major release

Details

Pricing
FreeFree and open source under the MIT licence.
License
MIT
Developer
Hammerspoon project
Platforms
macOS
How it runs
Downloadable app
Account
Not required
Works offline
Yes
Best suited for
Scripting your own window management and system automation on a Mac
Categories
Automation
Last verified
Added
Provenance
Selected from the TechWalrus downloads catalog (Automation); facts checked against the developer's own pages, 2 sources on file.

Alternatives to Hammerspoon

Compare all

Software that can replace Hammerspoon for an important use case, and what changes if you switch.

  • Keyboard Maestro

    Visual macro builder for automating apps, files, and workflows on macOS.

    PaidProprietarymacOS

    Keyboard Maestro replaces Lua scripting with a visual macro editor for macOS automation, but it is closed source and requires a one-time paid license.

  • BetterTouchTool

    macOS customization tool for trackpad gestures, shortcuts, and window snapping.

    PaidProprietarymacOS

    BetterTouchTool offers gesture, shortcut and window snapping settings without writing a config file, but it is closed source and needs a paid license after the trial.

  • Keyboard Cowboy

    Builds macOS keyboard shortcuts that launch apps, run scripts and react to app changes.

    Keyboard Cowboy is also free and MIT licensed, binding workflows to key sequences scoped to particular apps, without requiring you to write Lua code.

  • Apple Shortcuts

    Apple's built-in drag-and-drop automation app for Mac, iPhone, and iPad.

    FreeProprietarymacOSiOS

    Apple Shortcuts is built into macOS and iOS with a drag-and-drop editor, but it is closed source and less capable for complex conditional logic.

Hammerspoon as an alternative

Listings that name Hammerspoon as an alternative.

  • AutoHotkey

    A Windows scripting language for hotkeys, text expansion, key remapping and automating anything on screen.

    Hammerspoon brings scripted hotkeys and window control to macOS using Lua instead of the AutoHotkey language, and it remains free MIT-licensed open source.

  • AutoKey

    Desktop automation for Linux under X11: abbreviations that expand into text, and hotkeys that run Python.

    Hammerspoon moves scripted hotkeys and window automation to macOS, using Lua scripts instead of Python, and needs broad accessibility and automation permissions to work.

Similar software

Related functionality, not necessarily a direct replacement.

Report a wrong fact or a dead link on this listing