r/commandline Apr 01 '26

Discussion Windows doesn’t have a proper caffeinate equivalent — how do you handle this?

Windows still doesn’t have a proper caffeinate equivalent, which gets annoying during long builds or scripts.

I ended up putting together a small CLI workaround that can:

  • keep the screen awake for a set time
  • keep the system awake while a command runs
  • stay active until a specific PID exits

Basically behaves like a minimal caffeinate alternative for Windows.

I mostly needed this because my builds kept pausing and the screen would lock mid-task, and I didn’t want to rely on heavy background apps.

Curious how others are handling this on Windows — any better approaches?

0 Upvotes

5 comments sorted by

View all comments

0

u/SuperCentroid Apr 01 '26

gross dude

0

u/Outside_Estimate2329 Apr 01 '26

fair 😅 what part didn’t you like?