Show HN: Hammerspoon 2 Beta 1 is released hammerspoon.org · 4 points · 2 comment...
Show HN @show
Show HN: Hammerspoon 2 Beta 1 is released hammerspoon.org · 4 points · 2 comments · HN thread
TL;DR Hammerspoon 2 beta 1 is out: a ground-up rewrite of the macOS automation tool that replaces Lua with JavaScript, running on Safari's JavaScriptCore engine. It requires macOS 27 or later and installs as a separate app, so Hammerspoon 1 can stay alongside it. The original maintainer explains in the comments that the rewrite was driven by the old Objective-C/Lua codebase becoming hard to maintain.
- Hammerspoon 2 is a rewrite that uses JavaScript instead of Lua, running on the JavaScriptCore engine used by Safari.
- It requires macOS 27 or later and is a separate app with its own configuration, so Hammerspoon 1 can stay installed.
- On first run it lets the user pick a config location (typically ~/.config/Hammerspoon2/) and creates an init.js.
- Official Getting Started and Migration guides are provided, and the API docs are built into the app via hs.docs.show().
- It is a beta; bugs and feature requests go to GitHub, and the app checks for updates itself.
Discussion The thread is small, with two comments. The original Hammerspoon maintainer, cmsj, explains the reasoning behind the rewrite and how it was built, and another commenter thanks him for the work and says the explanation makes the design choice clearer. The mood is friendly and appreciative.
- Rewrite was needed to make the project maintainable again (most): The maintainer says the 100k-line Objective-C and Lua codebase had lost motivation and that bridging ObjC to Lua was unpleasant. Swift plus JavaScriptCore gives object bridging almost for free and makes the work enjoyable again.
- AI-assisted porting with full code review (some): The maintainer wrote the core and first modules by hand, codified module conventions as agent skills, and used Claude to port the rest. He says he read all the generated code and often disagreed with it, rejecting the idea that code need not be read.
- Appreciation for the maintainer's work (a few): A commenter says the explanation makes sense now and thanks the maintainer for years of work, hoping for many more years of the project.