Scale your Shortcut projects and maintain them long-term.
Cherri (pronounced cherry) is a Siri Shortcuts programming language that compiles directly to a signed Shortcut you can then run on your Apple devices.
Try Cherri/* Hello, Cherri! */
#define glyph smileyFace
#define color yellow
@message = "Hello!"
alert("Message: {message}", "Alert")
Why Cherri?
- đĨī¸ Laptop/Desktop based development
- đ Easy to learn and syntax similar to other languages
- đ 1-1 translation to Shortcut actions as much as possible to make debugging easier
- đĒļ Optimized to create as small as possible Shortcuts and reduces memory usage at runtime
Glyphs Search
Use the glyphs search site to easily generate a Shortcut icon for Cherri outside of Shortcuts.
How does it work?
Cherri is designed to be easy to learn and use, and is likely similar to a language that you are already familiar with.
đĒ Magic variables are constants
As Magic Variables cannot be changed, use the typical constant syntax found in many languages to use the output of an action directly.
const int = 37
show("{int}")
#ī¸âŖ Includes
Include multiple files and files within folders, etc., to create and maintain large Shortcut projects.
#include 'other-file.cherri'
// ...
#include 'another-file.cherri'
đ Define Functions
Functions run within their own scope at the top of the Shortcut, called via the Run Shortcut action.
#include 'actions/scripting'
function myFunc(text test) {
output("{test}")
}
@result = myFunc("Test")
show("{result}")
đ§ Define actions
Define your own version of Standard actions or 3rd party actions.
action 'alert' showConfirm(text alert: 'WFAlertActionMessage')
showConfirm("Are you sure?")
đ Copy-paste automatically
Macros exist to copy and paste code automatically at compile-time.
#include 'actions/network'
copy checkConnection {
const online = isOnline()
if !online {
alert("No internet connection!")
}
}
// ...
paste checkConnection
đĨŠ Add Actions Raw into your Shortcut
Add a single custom-implemented or 3rd party action into your Shortcut with a Raw Action.
rawAction("is.workflow.actions.gettext", {
"WFTextActionText": "Hello, world!"
})
đ Generate VCards for menus
Creates a text action in the VCard format based on the arguments. It also supports images.
makeVCard("Title", "Subtitle")
đĸ Type system and type inference
Types are checked to match Shortcuts to ensure the compiled Shortcut will work when run and warn you when your defined types are used incorrectly.
/* Declared types */
@string: text
@integer: number
/* Inferred types */
@txt = "Test"
@int = 37