Sleep on Shortcode Example (similar to using an "alias")

To run the script quickly, from the main prompt type:

s, then l, then space, then y to confirm.

So these four characters:

sl y

Using the //Shortcode: metadata will run the script when you hit the "spacebar" after a shortcode/alias.

Open sleep-on-shortcode in Script Kit

// Name: Sleep on Shortcode
// Shortcode: sl
import "@johnlindquist/kit"
let confirm = await arg({
placeholder: `Sleep system?`,
// Script Kit parses hints and assigns single key shortcuts to single letters inside of []
hint: `[y]/[n]`,
})
if (confirm === "y") {
sleep()
}

Sidenote: From the main menu, you can also type - to bring up system commands.