Insomnia

One click.Stays awake.Sleeps later.

Pick Keep Awake or a timer from the menu bar. Your download, build or export runs to the end, and your Mac goes back to its normal sleep when the timer runs out or you choose Stop.

Free and open source · Apple silicon Macs · macOS 26 or later, or build it yourself for macOS 12 and up · Lives in the menu bar, no Dock icon · No account, no network

FinderFileEditViewWindow
Thu 23:48
Exporting harbour-at-dusk.mov
Exporting… 38%
Asleep. Click to wake the Mac.

Click the moon in the menu bar to try it.

An example in fast-forward: a minute of the Mac is a few seconds here. Nothing on this page touches your Mac.

A day and a half with Maya

Maya edits short films at home on her MacBook. Long exports and backups used to stop halfway whenever the Mac dozed off. This is how she uses Insomnia now.

  1. A long export, and a train to catch

    The client film needs a final export, and the estimate says three and a half hours. Maya clicks the moon in the menu bar and picks Sleep After › 5 hours.

  2. A sun in the menu bar

    The moon turns into a sun. Hovering over it shows how long the Mac stays awake. The display stays on too, so the export window is still there when she gets back.

  3. Done, with nobody home

    The export finishes while Maya is on the train. Nothing was paused on the way, and the Mac stays awake for what's left of the five hours.

  4. Back to normal on its own

    The timer runs out and Insomnia lets go. The moon is back, and the Mac sleeps the way it always does. There was no Stop to remember.

  5. A backup with no end time

    Friday's job is copying the archive to the studio's network drive, and nobody knows how long that takes. She picks Keep Awake (indefinite).

  6. One click to let it sleep

    The copy is done after lunch. Maya opens the menu, which says Active (indefinite), and clicks Stop. Her usual sleep settings are back.

Moon, sun, and what each click does

The icon tells you the state at a glance. It refreshes every few seconds, so allow a moment after you click.

MoonInactive
Your Mac follows its own sleep settings. Insomnia is just waiting in the menu bar.
SunKept awake
The Mac, its display and its disks stay awake: the same as running caffeinate -dimsu in Terminal. Hover over the sun for the time left.
StopStop, not Quit
The keeping-awake runs in a small helper, separate from the menu. Quitting Insomnia removes the icon but doesn't stop a keep-awake that is running, so choose Stop first.
LoginLaunch at Login
Starts Insomnia, and keeping the Mac awake, every time you sign in. Turning it on also starts it right away. Choose Stop when you don't need it that session.

Every state of the menu

Drawn from the app's own menu items and status lines, word for word.

01Insomnia

The menu, at rest

Keep awake, a timer, or nothing at all. Stop is greyed out until something runs.

02Insomnia

Awake, no end time

Keep Awake holds the Mac awake until you choose Stop.

03Insomnia

Awake for two hours

A timer from Sleep After counts down in the menu's first line.

04Insomnia

Hover for the time left

No need to open the menu: the sun's tooltip says how long is left.

05Insomnia

Starts at every login

Launch at Login brings Insomnia back, awake, each time you sign in.

06Insomnia

From Terminal

The same app takes commands, for scripts and long jobs.

Install in two minutes

The ready-made app runs on Macs with Apple silicon (M1 or newer) and macOS 26 or later. On an older macOS, from 12 up, build it yourself: it takes a minute.

  1. Download it

    Download the ZIP from GitHub, open it, and drag Insomnia.app from the folder into Applications.

  2. Open it the first time

    Insomnia isn't notarized by Apple, so macOS stops the first open. Double-click it once, then go to System Settings › Privacy & Security and click Open Anyway.

    On macOS 14 and earlier you can instead Control-click the app, choose Open and confirm. You do this once.

  3. Click the moon

    The moon appears in the menu bar at the top right of your screen. Choose Keep Awake (indefinite) or a time under Sleep After…, and Stop when you're done.

Use it from Terminal

The app is also a command-line tool, handy at the end of a script. With Insomnia in Applications:

/Applications/Insomnia.app/Contents/MacOS/Insomnia --timed 2

The other commands are --start, --stop, --status, --login-on and --login-off. Without a command, it opens the menu bar app.

It keeps your Mac awake, and that's all

  • Nothing leaves your MacInsomnia has no network code: no account, no analytics, no update check.
  • A few small files, all in your LibraryIts state in ~/Library/Application Support/Insomnia, logs in ~/Library/Logs/Insomnia, and a LaunchAgent for its helper in ~/Library/LaunchAgents.
  • No administrator passwordIt runs as you, and asks macOS to stay awake the same way caffeinate does. Nothing is installed system-wide.
  • Small enough to readAbout 450 lines of Swift, all on GitHub. Build it yourself and you know exactly what runs.