AwakeMate AwakeMate

🥟 JavaScript runtime & toolkit

Keep your Mac awake while Bun runs

Bun's fast dev server and bun --watch are built to stay up while you iterate. AwakeMate keeps your Mac awake the whole time so a sleep cycle never drops your server or hot reload.

Download for macOS Buy AwakeMate

Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+

When your Mac sleeps mid-Bun

Run bun dev or bun --watch and the process sits ready, waiting on requests and file changes. To macOS that idle wait looks like nobody's there, so it sleeps the Mac and takes your dev server and live reload with it. Reload the page after that and you're staring at a dead port until you restart.

AwakeMate keeps it awake while Bun runs

AwakeMate watches for the bun process, so anything you launch through the Bun runtime - dev server, watch mode, a long script - is recognised by name. Add bun once to your watched tools and every Bun-driven session counts, with no per-project setup.

Detected process: bun

Tip: leave "Sleep when tools go idle" off

Keep "sleep when idle" OFF for Bun. A dev server or bun --watch process spends long stretches waiting on requests and file changes, and idle-sleep would read those lulls as finished work and cut the session short. With it off, the Mac stays awake the whole time Bun runs. Save idle-sleep for a one-shot CPU-bound task, like a heavy bun build that exits when it's done.

Get the most out of it

More questions about Buntap to expand

Will my Bun dev server stay alive while my Mac is idle?

Yes. With idle-sleep off, AwakeMate keeps the Mac awake the entire time bun runs, so your dev server and hot reload stay up through quiet periods that would otherwise trigger sleep.

Do I need to configure each Bun project separately?

No. AwakeMate matches on the bun process name, so once it's in your watched tools every Bun session counts - dev server, watch mode or script - with no per-project setup.

Does it mess with my battery or energy settings?

No. AwakeMate uses the same gentle IOKit power assertion as caffeinate, preventing idle sleep only while Bun runs. Your saved energy and battery preferences are left exactly as they are.

What's the best way to keep my Mac awake while Bun is running?

Add bun to AwakeMate's watched tools and let it handle the rest. Any time the Bun runtime is running - bun dev, bun --watch or a script - your Mac stays awake, then sleeps when Bun exits. You set it once and never have to start or stop anything by hand.

Why not just set Energy Saver to Never instead of using AwakeMate for Bun?

You can set sleep to "Never", but that's a blunt, always-on change: it keeps your Mac awake for everything, all the time, even when Bun isn't running, and you have to remember to switch it back. AwakeMate never edits your saved Energy Saver settings - it uses a temporary IOKit assertion only while bun runs, so the Mac sleeps normally the rest of the time.

Why does my Mac sleep and kill my Bun dev server when I step away?

Because bun --watch and the dev server spend most of their time idle waiting on requests and file changes, so macOS reads the lull as inactivity and sleeps. AwakeMate blocks that idle sleep while Bun runs and the lid is open. Note that closing the lid will still sleep the Mac unless it's on power with an external display - that's a macOS rule AwakeMate can't override.

Will it keep my Mac awake for Bun with the lid closed, even on battery?

Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Bun runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.

Keep your Mac awake - exactly when it should be.

Free 14-day trial. One-time $39.99, no subscription. macOS 13+.

Download for macOS Buy AwakeMate