I've just used this extensively to build 200 Shortcuts for my event-based automation app on macOS [0], because some actions you simply can't do without Shortcuts: changing Focus Mode, toggling Accessibility functions like Color Filters, accessing the Private Cloud Compute model etc.
I also wrote about how Claude was able to basically learn the language from scratch and write those fully compilable Shortcuts for me [1] because it was mind boggling to me that an LLM can do that. Curiously, this is becoming more and more normal in my mind.
I felt really smart after I made a fancy Shortcut that did complex playlist generation based on rules and whatnots.
Of course, adding music to a playlist broke a couple of updates down the line and, as far as I'm aware, still doesn't work properly several years later.
(I moved to Marvis Pro[0] because it has reasonably complex smart playlists that just about mimic what I was doing with my generator except they're transient and not saved as mine were. Win some, lose some.)
[0] No link, sorry, because it'd either be iOS App Store or ad-laden bloat sites "reviewing" it. https://www.reddit.com/r/MarvisApp/ might be worth a read though.
There are some things that are only available in Shortcuts because Apple gave the app entitlements to communicate with parts of the system that an AppleScript or other apps can't. Things like setting/getting the Focus Mode, changing some system settings like Airdrop Receiving, Color Filters, Background Sounds etc.
Also some apps export Shortcut actions that can run in-app code: for example my Lunar app has an action that can help fixing arrangement when monitors flip around [1]
It's much easier to implement a struct for a Shortcut, than exporting AppleScript sdef files or creating IPC command-line tools, so a lot of apps take this route for code that needs access to the memory of the running app.
Thank you for the kind words! Love to hear from people that were helped by my work!
That was also my pain point with Lunar, working on a small balcony in a small apartment where the light from the window was constantly changing and the monitor always being way too bright or way too dim.
I broke one of those LG monitor joystick OSD buttons before I got to building Lunar.
Apple designed Shortcuts to look like a shiny toy demo, and it gets awkward fast once you leave the happy path. AppleScript is old, weird, and still wired into a lot of Mac apps, but the moment it trips over something basic like text encoding you can lose an hour digging through forum posts from 2004.
With Hammerspoon, you get Lua and direct macOS APIs, so you can push much further if you don't mind writing more glue code. If you care about serious Mac automation, you'll probably mix them and curse each one for a different reason.
I built a small app to follow my infant son's feedings and diaper changes. Simply used the shortcuts get content of url to call the API rest endpoints. This is much better !
Looks quite cool and I'd like to give a try. What is the main use case for compiling code to shortcuts? I ask because I'm working on a tool[0] that in a way does the opposite.
What you're doing is visual programming. On its own there isn't anything wrong with it. However, specifically with Shortcuts it's not very pleasant for anything complex.
I had a full garden automation running on shortcuts, but it was extreme hard to maintain and improve due to "editor" being so bare bones.
Thanks for sharing. By the editor being bare bones do you mean some missing feature might change your mind about using it, or do you find the text-based editor much more comfortable?
I was talking specifically about Apple Shortcuts. Once you have anything complex, you're going to need code reuse and its a sad story with shortcuts as provided by Apple.
From the repo, it signs natively on macOS and falls back to a cloud signing server (shortcut-signing-server). That fallback matters -- without macOS you would have to reverse-engineer Apple signing format yourself, and it changes across iOS versions. The hosted signing server is really what makes the whole cross-platform toolchain viable.
I’m interested to understand how this is different than Jelly; they seem to be similar. Same for Scriptable. I’ve been looking at this to hand over to Claude to build Shortcuts, something which has a terrible development experience.
You can definitely have Claude work with cherri files.
Jelly was a confusing experience for me, with JellyCuts becoming closed source and focusing on advertising, then Open-Jellycore branching out but not actually keeping up with the latest shortcut actions.
Cherri has almost every action you can find in the Shortcuts app, easy to use, and easy to create Shortcuts that can accept input and output so that they can be automated or scripted further.
You’ll have challenges with this too but you can get something by working with the three top labs’ models. Tried on Arena.ai and sent any errors back (in a personal effort to further iOS accessibility, but I digress).
While it's not in quite the same product category, a name change might be in order; this is uncomfortably close to CHERI (cf. https://cheri-alliance.org/).
I also wrote about how Claude was able to basically learn the language from scratch and write those fully compilable Shortcuts for me [1] because it was mind boggling to me that an LLM can do that. Curiously, this is becoming more and more normal in my mind.
[0] https://lowtechguys.com/crank
[1] https://alinpanaitiu.com/blog/how-good-is-claude-really/#che...
Of course, adding music to a playlist broke a couple of updates down the line and, as far as I'm aware, still doesn't work properly several years later.
(I moved to Marvis Pro[0] because it has reasonably complex smart playlists that just about mimic what I was doing with my generator except they're transient and not saved as mine were. Win some, lose some.)
[0] No link, sorry, because it'd either be iOS App Store or ad-laden bloat sites "reviewing" it. https://www.reddit.com/r/MarvisApp/ might be worth a read though.
Creating/maintaining Shortcuts is such a pain!
Having to do it on a small iPhone screen with a touchscreen keyboard, through a no-code interface...
I want an actual text editor, I want to version things with git...
It feels like with Cherri I'll finally be able to actually do things!
Thanks!
Python is so easy to pick up they could have given it a low code drag and drop front end but for us who can code why not a proper language ?
Also some apps export Shortcut actions that can run in-app code: for example my Lunar app has an action that can help fixing arrangement when monitors flip around [1]
It's much easier to implement a struct for a Shortcut, than exporting AppleScript sdef files or creating IPC command-line tools, so a lot of apps take this route for code that needs access to the memory of the running app.
[1] https://lunar.fyi/shortcuts#fix-monitor-arrangement
Being able to adjust my monitor brightness during the pandemic actively changed my quality of life for the better (I was in a small SF apartment).
That was also my pain point with Lunar, working on a small balcony in a small apartment where the light from the window was constantly changing and the monitor always being way too bright or way too dim.
I broke one of those LG monitor joystick OSD buttons before I got to building Lunar.
With Hammerspoon, you get Lua and direct macOS APIs, so you can push much further if you don't mind writing more glue code. If you care about serious Mac automation, you'll probably mix them and curse each one for a different reason.
Apple bought Workflow from DeskConnect (they may have bough the entire company).
[0] https://breadboards.io
I had a full garden automation running on shortcuts, but it was extreme hard to maintain and improve due to "editor" being so bare bones.
(That's what held me back most for spending more effort on shortcuts.)
Jelly was a confusing experience for me, with JellyCuts becoming closed source and focusing on advertising, then Open-Jellycore branching out but not actually keeping up with the latest shortcut actions.
Cherri has almost every action you can find in the Shortcuts app, easy to use, and easy to create Shortcuts that can accept input and output so that they can be automated or scripted further.
Wonderful project, thank you Cherri!