Keep your Mac awake.

Insomnia is a menu bar utility and CLI that prevents your Mac from sleeping. Timed sessions, app-watching, recurring schedules. No fuss.

What it does

Menu bar control

Toggle caffeination from the menu bar. Pick a duration, set a time, or leave it running indefinitely.

Timed sessions

Caffeinate for 15 minutes, 2 hours, or any custom duration. Set an end time and forget about it.

App watching

Keep your Mac awake while a specific app is running. Close the app, caffeination stops.

Recurring schedules

Caffeinate every weekday from 9 to 5. Set rules once and they run automatically.

Full CLI

Everything the GUI does, from the terminal. Pipe into scripts, run from SSH, automate your workflow.

Display sleep prevention

Optionally keep the display on too. Useful for presentations and long-running demos.

Built for the terminal

The CLI works standalone or talks to the GUI over a Unix socket when both are running.

Terminal
$ insomnia caffeinate
$ insomnia for 30m
$ insomnia until 17:00
$ insomnia while Safari
$ insomnia status --json

Under the hood

Get started

Homebrew

brew install --cask gordonbeeming/tap/insomnia

Use the fully qualified tap name to avoid conflicts with the Insomnia API client.

Direct download

Grab the DMG and CLI binary from the latest GitHub release.

Download from GitHub

Requires macOS 14 or later. Apple Silicon.