For MacOS, keep awake with:
sudo pmset -a disablesleep 1
Reset back:
sudo pmset -a disablesleep 0
sudo pmset -a disablesleep 1
Reset back:
sudo pmset -a disablesleep 0
https://github.com/narcotic-sh/modafinil
(yes, I know, another *afinil named Mac sleep prevention app? but hey, I was first :P)
Thanks!