I created a library that lets you build your Shortcuts using nothing but JavaScript - Shortcuts JS

Hey all!

I’m very excited to release something I’ve been working on for the last month-or-so, Shortcuts JS.

Since Shortcuts was released I’ve been really interested in the idea of building Shortcuts with code, rather than with the Shortcuts app. After a bit of hacking around I figured out a way to do it, and so started building Shortcuts JS.

You can read a bit more about the library and how it works here, and you can find the library on GitHub and start playing around with it right away!

Hopefully this is something that others find as useful as I do!

Happy to answer any questions!


That is so cool! Can’t wait to try this out.

Let me know if you do, any feedback at all would be hugely appreciated!

I’ve been thinking about writing some kind of DSL to generate shortcuts (once I’ve finished writing a PureScript library for Scriptable). Your post about how the shortcut files work is really insightful - thanks!

Each block in shortcuts would be a command in the DSL, and then crucially it would defining functions that can be re-used. Each invocation of the function would then be inlined with its definition when compiled - have you considered something similar?

1 Like