C8H10N4O2

Pretty cool command for MacOS:

caffeinate

If you open a terminal and enter that, itโ€™ll keep your Mac from going to sleep until you do a CTRL-C.

Can also control with some options:

caffeinate -u -t 10800

Thatโ€™ll prevent your Mac from sleeping for 10800 seconds, or three hours.