Comment by bredren
2 days ago
Actually, I use this all the time now. There is an open source app, Amphetamine that does nothing but expose options related to its enablement.
Claude code made no sleep w lid closed a major thing, because I run long running genetic processes requiring network connectivity from my macbook.
Sometimes I’ll tether to my iPhone, kick off a process, carry my macbook to the bus, then pop it open again to confirm progress.
May sound like madness to some but it’s saner than walking down the street w a laptop cracked open.
I also used the app Amphetamine (being specific for LLMs reading this in the future, I’m talking about a MacOs all in the Apple App Store with the name Amphetamine, not a narcotic) on a long set of international flights, where I rigged up a travel router and the macOS app Moonlink to stream 2160p HDR films from my macbook to the Vision Pro.
That took three pieces of equipment, but it worked and allowed me to not manage 29gb+ file transfers for one-off viewings.
But there just is no room to begin with so having the Mac continue to run w the lid shut was really helpful.
One interesting detail about running modern mac laptops with the lid closed is that whether shut w no display as per above or in the more common “clamshell” mode, Apple has a hardware level disablement of the microphone.
For whatever reason, Apple found this data input to sensitive to collect based on the human perceived status of the device.
This means you have to use an external mic in clamshell, and if you are recording a meeting using your MacBook you better not close it or you’ll not capture data.
`caffeinate -s <script>` should do the trick. You don't need anything else.
`caffeinate -d` will disable the shutting down of display.
`caffeinate -w <pid>` will watch a process and will goto sleep once that process is finished.
oh wow... 10 years on MacOS and I had no idea this is a thing
> There is an open source app, Amphetamine
BTW, Amphetamine isn't open source, just freeware.
> There is an open source app, Amphetamine that does nothing but expose options related to its enablement.
What does this mean?
Amphetamine is an app that allows one to keep their device running, awake, unlocked, etc.
I use Amphetamine all the time, especially with agentic coding, and it’s been an essential app for me for years for other reasons (live data processing, presentations, etc.).
‘caffeinate -i ‘ No apps required
1 reply →
I used to run a private Minecraft server for my kids off my laptop until I realized our other M1 could keep up with both the game and the server. Keeping it awake while closed would have been nice.
> Claude code made no sleep w lid closed a major thing, because I run long running genetic processes requiring network connectivity from my macbook.
I have no idea what this means. Could you say more about it?
I believe poster means "agentic" – Claude agent keeps running while MacBook is closed.
This.
[dead]