Thanks Jim, and thanks Ville @finlander,
Yes, I'm interested, but for a while I'm still on Catalina. There's a Beta of HS from March 28, 2022 (v0.9.96) that I could try. It has one AppleScript command: "execute lua code"
, so clearly I'd lean to learn LUA to use it. Not a serious problem, but a seeming barrier to just banging around on it.
From a little browsing, the one feature I've found so far that I think I'd be interested in is making new Spaces, but I've solved that for now, for myself, by just making 45 Spaces up front by using a second monitor. At this point I still have a dozen Spaces that are so-far unused. (I have yet to find any mention of anyone else using that many Space and the erroneous advice that 16 is the limit is widespread.)
One thing I would like to test about HS in that regard: Is it limited like Mission Control to only being able to add a Space if there are 15 or less in the current monitor?
I got my Spaces count up to 45 by using a second monitor. I made 16 Spaces in each monitor and then I moved several spaces between monitors (moving Spaces is not limited to 16 per monitor) to have most of my spaces in my main monitor and just a few in the second. Then I could make more (up to 16 total) in the second monitor. Then I moved a bunch of those spaces to the main monitor to make room for more. Now that all of that is done, I have 45 spaces available on my laptop, with no external monitor, and I have not had a need for more. I also discovered that in Going from two monitors to one, the first Space in the second monitor disappears and its windows are moved to the first Space in the single monitor, so with a second monitor connected (not for over three years now) I would have 46 total spaces.
If Hammerspoon has the same limitation as Mission Control, then it wouldn't be buying me anything. Even for people wanting to copy my system, it doesn't seem worth what it would take to install HS and learn Lua to save a few dozen create and move operations. However, if someone were to create a script like Ville's StackExchange example, that did the creating and moving, it could definitely save some tedium for anyone creating a large Space array from scratch. Also, if I had a workflow that somehow depended on creating and removing Spaces, and if HS somehow gets around the 16-Space limit, then it could be useful.
I don't want to be shortchanging HS here. I haven't dug into it yet. It looks like it may be very useful for a lot of other OS operations, some that go beyond what KBM can do, but again I have not yet dug into it and probably won't any time soon.
Again, thanks Jim for the tag and thanks Ville for the Hammerspoon tip and for the example on Apple Stack Exchange / Ask Different.