Keep awake

Keep the Mac awake only as long as the job needs.

Kilobat Awake stops your Mac from sleeping while it is plugged in, while a download runs, while an AI agent works or for a time you pick. When the job ends, the Mac sleeps as usual. It is free in the app and the CLI.

Download for Mac ↓
brew install seifip/kilobat/kilobat
  • Free forever
  • Pro $29 once
  • 14-day refunds
  • macOS 14+
  • Open-source CLI
Keep this Mac awakeAwake · 1 h 12 min left
Until downloads finishWhile plugged inWhile AI agents workKeep the screen on

Sound familiar?

How long

Pick a time, or let the job decide.

Click the teacup in the Kilobat popover. The Keep this Mac awake panel shows how long the Mac stays awake and what is holding it.

  • For a number of hours. A timer counts down, then the Mac sleeps again.
  • Until I turn it off. The panel shows how long the Mac has been awake.
  • Until downloads finish. The Mac stays awake while the traffic runs. It sleeps after 3 minutes of quiet by default.
  • While an app is in front. Pick an open app, for reading or presenting. Switching away lets the Mac sleep.

Turn off from the same panel at any time. See the guide for a Mac that sleeps and stops downloads.

Until downloads finishSleeps after 3 min of quietWhile an app is in frontSleeps when you switch away

Automatic rules

Let rules start it for you.

The Automatically section of the panel holds rules. Each one starts an awake session when its condition is true.

  • While plugged in. From plugging in until you unplug. Closing the lid still sleeps the Mac.
  • While AI agents work. The Mac stays awake only while an agent talks to its service.
  • While an agent waits for you. This needs the agent’s hooks. Without them, the Mac may sleep until you answer.
  • Keep the screen on. This applies to everything Kilobat keeps awake. Without it, the screen sleeps while the Mac keeps working.

Set up the agent side in Set up Kilobat in your agent. Each session lands in History with the data moved and the battery used.

AUTOMATICALLYWhile plugged in
From plugging in until you unplug
While AI agents work
Only while an agent talks to its service

Terminal

The same, from the CLI.

The CLI does the same without the menu bar. kilobat awake -- <command> keeps the Mac awake while one command runs, then reports the data it moved.

Terminal
# Awake for two hours
$ kilobat awake --for 2h
# Awake until downloads go quiet
$ kilobat awake --until-quiet
# Awake while one command runs
$ kilobat awake -- make release

Prefer the built-in tool? caffeinate -i does the basic job and costs nothing. See caffeinate on Mac.

Awake sessions and agent runs also appear in kilobat sessions.

Lid closed

Closing the lid still sleeps the Mac.

Awake keeps a Mac from idle sleep. A closed lid on a laptop still puts it to sleep. To keep working agent runs going with the lid shut, turn on Settings › Calls, streaming & Awake › Allow running with the lid closed. This installs a small helper that you approve in System Settings.

  • Set a battery level at which the Mac sleeps: 10, 20, 30 or 50%.
  • Choose to run only on the power adapter.
  • Set the longest time with the lid closed: 1, 2, 4 or 8 hours.

See a Mac with the lid closed.

With the lid closed too
Within the limits in Settings

Questions

How do I stop my Mac from sleeping?

Click the teacup in Kilobat’s popover and pick a time or Until I turn it off. Or run kilobat awake in Terminal. Kilobat lets the Mac sleep when the session ends.

Can Kilobat keep my Mac awake only while it is plugged in?

Yes. Turn on While plugged in. The Mac stays awake from plugging in until you unplug. Closing the lid still sleeps it.

How does Until downloads finish know the download is done?

It watches the Mac’s traffic. It lets the Mac sleep after 3 minutes of quiet by default. The CLI treats traffic below 16 KB/s as quiet.

Does it work with AI agents?

Yes. With While AI agents work on, the Mac stays awake while an agent talks to its service. To tell waiting for you from finished, connect the agent’s hooks.

Does it keep the screen on?

Only if you turn on Keep the screen on. Otherwise the screen sleeps while the Mac keeps working.

Is there a free built-in option?

Yes. The caffeinate command is part of macOS. It holds the Mac awake from Terminal and has no menu. See caffeinate on Mac. Kilobat adds the menu bar switch, rules and the record in History.

Is it free?

Keeping the Mac awake is free in the app and the CLI.

Awake until it is done, then asleep.

Download for Mac ↓
brew install seifip/kilobat/kilobat