osfeed.dev
Projects/Hammerspoon / hammerspoon

Hammerspoon

Lua automation for macOS

Get it on GitHub
Unclaimed

Written by @iluxav from the project's code and releases, not by its maintainers. Last updated for 1.1.1 (2026-02-26), so it may lag behind newer releases.

Are you @Hammerspoon?Claim it, and your coding agent keeps it current with each release
1.1.1 · 47 things you can do 8 changes to know before upgrading

Automate macOS windows, keyboard shortcuts, menus and devices with your own Lua scripts.

What you can do with Hammerspoon

Automate your macOS environment with Lua scripts.

Present at 0.9.93
Good to know

Requires ~/.hammerspoon/init.lua; does nothing until configured.

Share
Wrong?

Inspect and reposition application windows.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Trigger Lua actions with global keyboard shortcuts.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Create custom macOS menu bar items.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Send HTTP requests from desktop automations.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Inspect connected cameras and watch their properties.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Configure and control an Elgato Stream Deck.

Present at 0.9.93
Good to know

Requires supported hardware; the official Elgato Stream Deck app must not be running.

Share
Wrong?

Capture and manipulate images for scripted displays.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?
Show all 47

Inspect and change system audio device settings.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Trigger Lua callbacks from URLs and route web links.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Read battery and power-source information.

Present at 0.9.93
Good to know

Unavailable information may return nil.

Share
Wrong?

Calculate MD5, SHA and HMAC digests from data.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Serve HTTP responses from Lua scripts.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Inspect and change the mouse pointer position.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Communicate with external devices over serial ports.

Present at 0.9.93
Good to know

Requires a serial device.

Share
Wrong?

Present searchable choices in a graphical picker.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Read and change system or named clipboards.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Run callbacks when shared Lua values change.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Display on-screen alerts from Lua scripts.

Present at 0.9.93
Good to know

Requires a Lua configuration.

Share
Wrong?

Control Spotify playback from Lua scripts.

Present at 0.9.93
Good to know

Requires Spotify.

Share
Wrong?

Trigger callbacks from Razer Tartarus V2 buttons and control its lighting.

Since 0.9.94
Good to know

Only Razer Tartarus V2 is supported.

Share
Wrong?

Send synchronous or asynchronous HTTP PUT requests.

Since 0.9.94
Good to know

Requires a Lua configuration.

Share
Wrong?

Use a Stream Deck Mk2 for scripted controls.

Since 0.9.94
Good to know

Requires a Stream Deck Mk2; quit the official Elgato app.

Share
Wrong?

Read display information, including available hardware identifiers.

Since 0.9.97
Good to know

Requires a Lua configuration.

Share
Wrong?

Choose a toolbar style for scripted web views.

Since 0.9.97
Good to know

Requires a Lua configuration.

Share
Wrong?

Preserve a custom menu bar item's position across reloads.

Since 0.9.100
Good to know

Set an autosave name for the menu item.

Share
Wrong?

Find running applications by name or Lua pattern.

Since 0.9.100
Good to know

Requires matching a running application.

Share
Wrong?

Read an application's supported and preferred localizations.

Since 0.9.100
Good to know

Requires a Lua configuration.

Share
Wrong?

Submit chooser text even when it matches no listed choice.

Since 0.9.100
Good to know

Enable the default-for-query option.

Share
Wrong?

Read the current mouse cursor type.

Since 0.9.100
Good to know

Requires a Lua configuration.

Share
Wrong?

Read or set RTS and DTR serial control lines.

Since 0.9.100
Good to know

Requires an open serial device that supports the relevant lines.

Share
Wrong?

Use Stream Deck Mini V2, Plus and Pedal devices in Lua automations.

Since 0.9.100
Good to know

Requires supported hardware; quit the official Elgato Stream Deck app.

Share
Wrong?

Calculate MD5 and SHA digests as raw bytes for protocol integrations.

Since 0.9.100
Good to know

Requires a Lua configuration.

Share
Wrong?

Connect Lua automations to WebSocket services.

Since 0.9.100
Good to know

Requires a reachable WebSocket service.

Share
Wrong?

List files in a directory and its subdirectories with filtering options.

Since 1.0.0
Good to know

Configure traversal and filtering through `hs.fs.fileListForPath()` options.

Share
Wrong?

Hash files or successive data chunks, including SHA-3 and CRC32.

Since 1.0.0
Good to know

CRC32 is a checksum; available algorithms are listed by `hs.hash.types`.

Share
Wrong?

Read the artwork URL for the currently playing Spotify track.

Since 1.0.0
Good to know

Requires Spotify; returns nil on error.

Share
Wrong?

Run a watcher callback even when a value is assigned its existing value.

Since 1.0.0
Good to know

Enable `alwaysNotify` for the watcher.

Share
Wrong?

Read the original full URL in a URL event callback.

Since 1.0.0
Good to know

Requires a Lua configuration.

Share
Wrong?

Position an on-screen alert using a supplied window.

Since 1.0.0
Good to know

Requires a Lua configuration.

Share
Wrong?

Read and set the system trackpad tracking speed from Lua.

Since 1.1.0
Good to know

Set the trackpad argument in `hs.mouse.trackingSpeed()`.

Share
Wrong?

Read and toggle direct audio monitoring on supported audio devices.

Since 1.1.0
Good to know

Requires hardware Thru support, such as a microphone with a headphone jack.

Share
Wrong?

Generate smart-magnify gestures from a Lua automation.

Since 1.1.0
Good to know

Requires a Lua configuration.

Share
Wrong?

Create, switch and remove macOS Spaces and move windows between them.

ExperimentalSince 0.9.97
Good to know

Experimental private APIs and Accessibility actions; Mission Control may visibly open and Apple changes can break behavior.

Share
Wrong?

Move floating windows into full-screen Spaces using the force option.

ExperimentalSince 0.9.100
Good to know

Experimental API; forcing a move into a full-screen Space only works for floating windows.

Share
Wrong?

Before you upgrade Hammerspoon

Newest first
Show 5 older
Hammerspoon release history 8
1.1.1

Install the release archive without the stray resource forks that could confuse Gatekeeper.

Details

The download archive no longer includes the spurious resource forks described in the release notes.

Download 1.1.1; minimum macOS version is 13.0.

Now works: Automate your macOS environment with Lua scripts.

Seeded by @iluxav with Codex

Read the evidence
1.1.0

Set trackpad tracking speed from Lua.

Details

Adds trackpad speed control, direct audio monitoring and smart-magnify events; fixes WebSocket serving and window movement.

Download 1.1.0; requires macOS 13 or later.

Action required / inferredAction required / inferredBehavior changed / inferred: Trigger Lua callbacks from URLs and route web links.Now works: Serve HTTP responses from Lua scripts.Now works: Inspect and reposition application windows.Now works: Inspect and change the mouse pointer position.Added / inferred: Read and set the system trackpad tracking speed fro…Added / inferred: Read and toggle direct audio monitoring on supporte…Added / inferred: Generate smart-magnify gestures from a Lua automati…Added: Handle web links handed off from native application…Now works: Configure and control an Elgato Stream Deck.Now works: Automate your macOS environment with Lua scripts.

Seeded by @iluxav with Codex

Read the evidence
1.0.0

Move windows between Spaces on macOS Sonoma 14.5.

Details

Restores Spaces window moves on Sonoma 14.5 and adds file enumeration, incremental hashes, Spotify artwork URLs and full URL callback data.

Download 1.0.0; requires macOS 12 or later.

Action required / inferredNow works: Create, switch and remove macOS Spaces and move win…Now works: Read battery and power-source information.Now works: Read and change system or named clipboards.Added / inferred: List files in a directory and its subdirectories wi…Added: Hash files or successive data chunks, including SHA…Added / inferred: Read the artwork URL for the currently playing Spot…Added / inferred: Run a watcher callback even when a value is assigne…Added / inferred: Read the original full URL in a URL event callback.Now works: Configure and control an Elgato Stream Deck.Added / inferred: Position an on-screen alert using a supplied window.Now works: Automate your macOS environment with Lua scripts.

Seeded by @iluxav with Codex

Read the evidence
0.9.100
with 0.9.98, 0.9.99

Keep custom menu bar items in their chosen positions across reloads.

Details

0.9.98 adds saved menu positions and more Stream Deck devices; 0.9.99 restores WebSocket connections; 0.9.100 adds binary digest output.

Download 0.9.100; requires macOS 11 or later.

Action requiredAdded / inferred: Preserve a custom menu bar item's position across r…Action required / inferredAction required / inferredNow works: Create, switch and remove macOS Spaces and move win…Added / inferred: Move floating windows into full-screen Spaces using…Now works: Inspect and reposition application windows.Now works: Capture and manipulate images for scripted displays.Now works / inferred: Inspect connected cameras and watch their propertie…Added / inferred: Find running applications by name or Lua pattern.Added / inferred: Read an application's supported and preferred local…Added / inferred: Submit chooser text even when it matches no listed…Added / inferred: Read the current mouse cursor type.Added / inferred: Read or set RTS and DTR serial control lines.Added: Use Stream Deck Mini V2, Plus and Pedal devices in…Added: Calculate MD5 and SHA digests as raw bytes for prot…Behavior changed: Automate your macOS environment with Lua scripts.Now works: Send HTTP requests from desktop automations.Added / inferred: Connect Lua automations to WebSocket services.

Seeded by @iluxav with Codex

Read the evidence
0.9.97
with 0.9.96

Create, switch and remove macOS Spaces from Lua.

Details

0.9.96 adds experimental Spaces control; 0.9.97 fixes Docker-related Spaces errors and menu bar image positioning.

Download Hammerspoon 0.9.97 from its GitHub release.

Added / inferred: Create, switch and remove macOS Spaces and move win…Now works: Create, switch and remove macOS Spaces and move win…Now works: Create custom macOS menu bar items.Added / inferred: Read display information, including available hardw…Added / inferred: Choose a toolbar style for scripted web views.Action required / inferredAction required / inferred

Seeded by @iluxav with Codex

Read the evidence
0.9.95

Check whether a camera is in use without the fixed crash.

Details

Fixes camera usage checks and restores hs.automaticallyCheckForUpdates().

Download Hammerspoon 0.9.95 from its GitHub release.

Now works / inferred: Inspect connected cameras and watch their propertie…Now works / inferred: Automate your macOS environment with Lua scripts.

Seeded by @iluxav with Codex

Read the evidence
0.9.94

Trigger automations from a Razer Tartarus V2 keypad.

Details

Adds Razer Tartarus V2 support, Stream Deck Mk2 support, mailto handling and HTTP PUT requests.

Download Hammerspoon 0.9.94 from its GitHub release.

Added / inferred: Trigger callbacks from Razer Tartarus V2 buttons an…Added / inferred: Send synchronous or asynchronous HTTP PUT requests.Now works / inferred: Inspect and change system audio device settings.Now works / inferred: Inspect connected cameras and watch their propertie…Added / inferred: Handle mailto links with a Lua callback.Added / inferred: Use a Stream Deck Mk2 for scripted controls.Now works / inferred: Communicate with external devices over serial ports.

Seeded by @iluxav with Codex

Read the evidence
0.9.93
Starting point

Automate your Mac with Lua scripts that respond to desktop events.

Details

Existing capabilities before the ten-release window include window control, global shortcuts, menu items, device access and scripted notifications.

Historical baseline at 0.9.93; create ~/.hammerspoon/init.lua to configure automations.

Added: Automate your macOS environment with Lua scripts.Added: Inspect and reposition application windows.Added: Trigger Lua actions with global keyboard shortcuts.Added: Create custom macOS menu bar items.Added: Send HTTP requests from desktop automations.Added: Inspect connected cameras and watch their propertie…Added: Configure and control an Elgato Stream Deck.Added: Capture and manipulate images for scripted displays.Added: Inspect and change system audio device settings.Added: Trigger Lua callbacks from URLs and route web links.Added: Read battery and power-source information.Added: Calculate MD5, SHA and HMAC digests from data.Added: Serve HTTP responses from Lua scripts.Added: Inspect and change the mouse pointer position.Added: Communicate with external devices over serial ports.Added: Present searchable choices in a graphical picker.Added: Read and change system or named clipboards.Added: Run callbacks when shared Lua values change.Added: Display on-screen alerts from Lua scripts.Added: Control Spotify playback from Lua scripts.

Seeded by @iluxav with Codex

Read the evidence

Share

LinkedIn takes the link and its card only; write your text there.

X LinkedIn Reddit Hacker News Bluesky