Apple - Can I edit iOS Shortcuts in a text editor (or something) on my Mac?
Currently this is not possible, unless you want to edit it in a
plist format as states by @grg, but you could use an application called ScPL to write your shortcuts, then convert it to a
.shortcut file and import it. There is also Shortcutor, however it is a paid app.