Nice post. Thanks for sharing!!
Recently I discovered a tool to use in the MacOS command-line: caffeinate — prevent the system from sleeping on behalf of a utility — to avoid going to System Preferences and change the energy saver properties just to forget to change it back later.
You can use it with a program, e.g.
caffeinate -i make to stay on until the program is over. Check the man page for other parameters.