macOS Sleep Prevention Cheat Sheet

caffeinate blocks idle sleep. pmset disablesleep blocks lid-close sleep.