Control Shake It On with AppleScript

Shake It On 1.1.0 ships a full AppleScript dictionary: tell application "Shake It On" to enable / disable / toggle / shake / snooze for N / keep awake for N / switch session NAME. Drive it from anywhere that runs osascript.

Why AppleScript still matters

AppleScript predates Shortcuts by about 30 years and it's still the most reliable way to drive a Mac app from another script. If you live in Hammerspoon, Keyboard Maestro, BetterTouchTool, or just a bash script that does osascript, you want AppleScript.

The command set

Shake It On's AppleScript dictionary covers seven verbs:

tell application "Shake It On" to enable
tell application "Shake It On" to disable
tell application "Shake It On" to toggle
tell application "Shake It On" to shake
tell application "Shake It On" to snooze for 15
tell application "Shake It On" to keep awake for 60
tell application "Shake It On" to switch session "Render"

Durations are in minutes. Session names are matched case-insensitively. Every command posts a brief macOS notification confirming what happened.

Shake It On 1.1.0 ships with a full AppleScript dictionary. Drive it from any script that can run osascript.

From the command line

Wrap any of the commands above in osascript -e to call them from a shell:

# Enable Shake It On
osascript -e 'tell application "Shake It On" to enable'

# Snooze for 30 minutes
osascript -e 'tell application "Shake It On" to snooze for 30'

# Switch to a render session
osascript -e 'tell application "Shake It On" to switch session "Render"'

Hammerspoon hot-key example

Bind a global hot-key (here โŒƒโŒฅโŒ˜ S) to toggle Shake It On:

hs.hotkey.bind({"ctrl", "alt", "cmd"}, "S", function()
  hs.osascript.applescript(
    'tell application "Shake It On" to toggle'
  )
end)

Cron-style scheduling

Combine with launchd / cron to flip Shake It On on a schedule:

# Enable Mon-Fri at 9 AM (in your crontab)
0 9 * * 1-5 osascript -e 'tell application "Shake It On" to enable'

# Disable at 6 PM
0 18 * * 1-5 osascript -e 'tell application "Shake It On" to disable'
Tip
For day-of-week scheduling without cron, use Shake It On's built-in Schedule section (Settings โ†’ Schedule). It handles midnight crossings and DST automatically.

Error handling

AppleScript can try ... on error around any command โ€” the most common failure mode is "Shake It On isn't running":

try
  tell application "Shake It On" to enable
on error
  display notification "Shake It On isn't running" with title "AppleScript"
end try

If AppleScript isn't your thing

Shake It On exposes the same surface two other ways: a shakeiton:// URL scheme (any tool that opens URLs can use it) and Shortcuts intents (no-code automation).

Keep your Mac awake the easy way.
Shake It On lives in your menu bar and uses organic mouse movement to prevent sleep. Set it once and forget it.
One-time purchase. No subscription. Free updates forever.