Stop Sleep / Screen Dim Mac

You can use the shell to call “caffeinate” (see “man caffeinate” in terminal).
There is already an old thread about it: Stopping Mac going to Sleep