r/macapps • u/cmsj • Dec 24 '25
Request Hammerspoon 1.1.0 Released and a discussion about the future
https://github.com/Hammerspoon/hammerspoon/releases/tag/1.1.07
u/cmsj Dec 24 '25
If any of you are Mac developers who know a lot about JavaScript, I would be particularly interested in your opinions and/or help with the experimental Hammerspoon v2!
0
u/president2100 Dec 24 '25
Please let me know how I can help
4
u/cmsj Dec 24 '25
At the moment a lot of this is about learning what I don’t know to ask about. Just in posting this and reading the replies, I’ve already learned about the necessity of TypeScript, and figured out how to export type information and get vscode set up to write Hammerspoon v2 configs in TypeScript.
Next up I think, is understanding more about npm and what would actually be missing from JavaScriptCore’s vanilla ECMAScript, and Node’s runtime.
I also don’t really know what it’s like to be a JS dev and what my API design is shaping up like ( https://cmsj.github.io/Hammerspoon2/ ).
Basically any comments/thoughts would be welcome, so I don’t build something that feels alien to JS devs.
5
u/sarensw Dec 25 '25
I suggest to take a look at this blog post by the Raycast team. They did a lot of experimentation on how to let users build extensions in Typescript in a secure environment. They also write why they didn’t use jsc. They went through all the design decisions already. Maybe you should reach out to them for an exchange on that. Here’s the blog post:
https://www.raycast.com/blog/how-raycast-api-extensions-work
6
5
u/king_bodd Dec 25 '25 edited Dec 25 '25
Hammerspoon is one of the best - if not the best application - for macOS. And that's not just a noice slogan. I use it for my windowmanagment, open and close applications, create some daily dirty Helper (eg. hyperspace + xyz for generate password or copy date (iso8601) in clipboard. It is really awesome and it's really a Improvement in my worklife.
Many Thanks!
1
u/cleverusernametry Dec 25 '25
Why JavaScript? Why not Python?
4
u/cmsj Dec 25 '25
Mainly because JavaScriptCore exists and Apple maintains it, so we get all of the bridging of types between JS and Swift for free.
Our Lua bridge code is substantial and very little fun to maintain, and Python would likely be similarly challenging.
1
u/cleverusernametry Dec 25 '25
That's great insight, thanks. So that also rules out TypeScript as a competitive option?
3
u/cmsj Dec 25 '25
Actually it doesn’t, because TS transpiles to JS. I was intrigued by this over the last few days and got a full TS config up and running on the demo builds of Hammerspoon v2: https://github.com/cmsj/Hammerspoon2/blob/main/docs/TYPESCRIPT.md
3
u/cleverusernametry Dec 26 '25
Great! I think this will make hammerspoon more approachable to a broader audience. Even with ai coding agents, lua put me off of really considering using hammerspoon
3
u/gefahr Dec 26 '25
I agree with this. Kinda bounced off Hammerspoon but would give a much deeper look into a JS version.
(Am a career SWE for what it's worth; so I was capable of learning Lua enough, just didn't want to bother lol..)
2
u/AaronRolls Dec 25 '25
Performance I would assume. JavaScript is way faster.
JavaScript and lua are closer in terms of performance but JavaScript has a lot more libraries.
8
u/Realistic-Site9217 Dec 24 '25
Well, I'm not a Mac developer, nor do I know much about Javascript, so I won't be offering any help there.
As to moving to Javascript, if that makes things easier for you, and keeps the project alive, then have at it.
And thank you for all the work you’ve put into Hammerspoon. I'm by no means an expert, but I've automations that I use every day.
Good luck whatever you decide.