Close the lid.
Your agents keep working.

Nuit Blanche keeps your MacBook running with the lid shut, on battery, with no monitor plugged in. Press ⌃⌥⌘L before you leave and the moon in your menu bar turns into a sun. Press it again when you’re back.

Buy from $3 Pay what you want, $5 suggested. You pay once. macOS 13 or later.

It’s for people who leave AI agents running for hours.

You start Claude Code on a four-hour migration, or a few Codex agents on a test suite, and then you have to be somewhere else: a train, a meeting across town, dinner.

macOS puts a MacBook to sleep the moment the lid shuts, so closing it ends the run. Carrying it around open isn’t a plan. Nuit Blanche adds the switch macOS doesn’t have: the lid closes, the screen goes dark, and the Mac keeps working, on Wi-Fi or your phone’s hotspot.

One hotkey turns the moon into a sun.

  1. Press ⌃⌥⌘L, or click the moon.

    The moon in your menu bar becomes a sun and a small banner confirms it. Nothing else changes while the lid is open.

  2. Close the lid and go.

    The screen turns off and the Mac keeps running. Your agents, downloads and SSH sessions carry on, and you can check in from your phone. Set it down somewhere with air, not inside a bag.

  3. Press it again when you’re back.

    The sun goes down, the moon comes back, and your Mac sleeps on lid close like it always did.

It lets your Mac sleep again when it should.

A laptop that never sleeps is its own problem, so Nuit Blanche watches the clock, the battery and the temperature for you.

A timer, if you want one
Stay awake for 1, 2, 4 or 8 hours, then sleep like normal.
A battery floor at 20%
On battery, it lets the Mac sleep before a long run drains it flat.
A heat cut-off
If the battery passes 45°C or macOS reports the Mac is overheating, it lets it sleep. Keep it on a hard surface with some air around it, never zipped inside a bag.
No way to forget it
The sun stays in your menu bar while it’s on, and quitting the app puts normal sleep back.

Your agents can flip the switch themselves.

Nuit Blanche installs a small nuitblanche command. Add two lines to your CLAUDE.md or AGENTS.md and the agent keeps the Mac up while it works, then switches it off when the job is done.

If the lid is already closed when it switches off, the Mac goes to sleep right away instead of waiting for you to open it. Nuit Blanche doesn’t watch your agents, so the agent has to say when it’s done. The timer covers you if it never does.

$ nuitblanche on 4h
Awake with the lid closed for 4h.
$ nuitblanche status
on (3h 59m left)
$ nuitblanche off
Sleeps normally again.
CLAUDE.mdWhen I say I’m heading out, run `nuitblanche on 4h`.
If you did, run `nuitblanche off` once the whole task is done.

Yes, it’s one pmset flag underneath.

The switch is sudo pmset -a disablesleep 1, and you’re welcome to type it yourself. What Nuit Blanche adds is everything around it: a hotkey instead of a password prompt, a sun that tells you it’s on, a timer and a battery floor so you don’t come back to a dead laptop, and an uninstaller that takes it all back out.

It also handles the part that catches people out. Clearing the flag while the lid is already shut doesn’t put the Mac to sleep, so when the timer or the battery floor switches it off, Nuit Blanche sleeps the Mac for you.

It asks for your password once, to add a rule you can read afterwards with cat /etc/sudoers.d/nuitblanche. The rule allows that one command, on and off, and nothing else. Uninstall Nuit Blanche… in the menu takes it back out.

Questions

Why not caffeinate, Amphetamine or KeepingYouAwake?

caffeinate and KeepingYouAwake stop idle sleep while the lid is open. Close the lid on battery and the Mac sleeps anyway (caffeinate -s only holds on a charger). Amphetamine can keep a closed Mac awake through its Closed-Display Mode, with an extra helper to install. Nuit Blanche does the one job: lid closed, on battery, one key.

Why does macOS say it can’t verify Nuit Blanche?

It isn’t signed with a paid Apple developer account, so macOS stops it the first time you open it. Click Done, then open System Settings › Privacy & Security, scroll down to Security and click Open Anyway. Confirm with your password and click Open. You only do this once.

Does it need my password?

Once. Setup adds a rule in /etc/sudoers.d/ that allows exactly two commands, pmset -a disablesleep 1 and pmset -a disablesleep 0, so it can switch without asking each time. Skip it and macOS asks for your password on every switch instead. Uninstalling removes the rule.

I run several agent sessions at once. Which one switches it off?

The one you told you were heading out. With the two lines above, only the session that ran nuitblanche on runs nuitblanche off. Tell several sessions and the first to finish puts the Mac to sleep under the others, so tell one, or leave the second line out and set a timer long enough for the slowest.

Will it cook my laptop?

A closed MacBook doing heavy work runs warm, with less air than when it’s open. Put it down on a desk, a table or a car seat. Don’t zip it into a bag while it works. If the battery passes 45°C or macOS reports the Mac is overheating, Nuit Blanche lets it sleep.

Does it collect anything or go online?

No. It makes no network connections at all: no analytics, no account, no update checks.

Which Macs does it run on?

macOS 13 Ventura or later, on Apple silicon and Intel. It’s made for MacBooks; on a desktop Mac it simply keeps the machine from sleeping.

What if I restart or quit the app?

Quitting puts normal sleep back, and so does logging out or restarting. If the Mac crashes or loses power while it’s on, Nuit Blanche switches the setting off the next time it starts.

What does it cost?

You choose the price at checkout, from $3, with $5 suggested. You pay once. There’s no subscription, and updates come with it.

How do I get it after paying?

The download is on the page right after checkout. Polar, the shop that takes the payment, also emails you a link so you can download it again later.

Pay what you want, from $3.

$5 is the suggestion. You pay once, with no subscription, and updates come with it.

Buy from $3