Wake Up Your Mac ☕️
The caffeinate
command on OSX can simulate a user interacting with the system, waking it up. Here's how you'd wake up a computer and continue the simulated activity for two seconds.
$ caffeinate -u -t 2
For more info, see man caffeinate
on a Mac.