Yeah, most of these repositories contain more files than caffeinate+ has lines of code.
The API call that 'sudo pmset -a disablesleep 1' does is literally the first thing caffeine+ does. But is only part of the full solution: As soon as the lid closes the command is automatically reverted so you can't forget to do it yourself. Also if you kill caffeinate+, the MacBook is put to sleep when the lid is still closed.
Yes, most of the very many that you didn't know existed just a moment ago also handle that tricky case of restoring normal operation.