KeepingYouAwake is a small menu bar utility for OS X Yosemite and above that can be activated to prevent your Mac from going into sleep.
You can toggle the state directly from your menu bar.
The app is a small wrapper around Apple's caffeinate command line utility. All current versions of macOS ship with this tool by default..
This utility will not harm your Mac because it is based on an official command line tool by Apple. BUT I cannot guarantee anything, so use this tool at your own risk.
Updated on Feb 20 2022