Skip to content

Hammerspoon vs KeepingYouAwake

Price, platforms and features side by side. The table says where each price was read and when.

Hammerspoon

Free, open-source macOS automation scripted in Lua

Free

KeepingYouAwake

Menu bar utility that stops a Mac from going to sleep

Free

Where they differ

  • Hammerspoon is free. KeepingYouAwake is free.
  • Hammerspoon also covers workflow automation and window management.
  • KeepingYouAwake also covers menu bar app.
In commonFree planmacOSOpen source

At a glance

HammerspoonKeepingYouAwake
PricingFreeFree
Starts atFreeFree
Free planThe whole app is free and open source under the MIT license. The developers do not take donations and suggest giving to a charity instead.The whole app is open source under the MIT license, downloaded from the website or GitHub or installed with Homebrew. Its pages show no price, purchase step or paid edition.
Free trialNone listedNone listed
macOS
Made byHammerspoon contributorsMarcel Dierkes
Price read fromgithub.comgithub.com
CheckedOct 6, 2026Oct 9, 2026

Who each one suits

Hammerspoon

  • Mac users comfortable writing Lua who want to script their own automation
  • Custom window management driven by keyboard shortcuts
  • Triggering actions from system events such as joining a Wi-Fi network

KeepingYouAwake

  • Mac users who need the computer to stay awake for a set time
  • People who used Caffeine and want a maintained replacement
  • Anyone who wants a small single-purpose utility at no cost

Worth knowing

Hammerspoon

  • macOS only. Release 1.1.1 lists a minimum of macOS 13.0; older Macs need an earlier release.
  • Out of the box it does nothing: every behavior has to be written in Lua in ~/.hammerspoon/init.lua or added as a Spoon.
  • It depends on the macOS Accessibility permission, which the user has to grant by hand in the system's privacy settings.
  • Crash information is collected by default; the FAQ says this can be turned off in the preferences.

KeepingYouAwake

  • macOS only. Version 1.6.8 supports macOS 10.13 and newer, and the changelog says the next release, 1.6.9, raises the minimum to macOS 12.
  • It does not keep a MacBook awake with the lid closed: it works on desktop Macs and on portable Macs with an open lid.
  • It only prevents sleep, by wrapping Apple's caffeinate tool; the developer says it is provided with no guarantee and used at your own risk.

Key features

Hammerspoon

Lua bridge to macOS
Extensions expose macOS APIs for applications, windows, screens, audio devices, batteries, clipboards, Wi-Fi, location and low-level keyboard and mouse events to Lua code.
Hotkeys
A keyboard shortcut can be bound to any Lua function, from showing a notification to running a series of window operations or an AppleScript.
Window movement and layouts
Scripts can move and resize the focused window, arrange several apps' windows into a saved layout across screens, and use window filters to act on groups of windows.
Event watchers
A configuration can react to application events, Wi-Fi network changes and USB devices, for example muting the volume when the Mac leaves the home network.
Spoons
Spoons are pre-made plugins, installed by double-clicking a .spoon file and loaded from the config. The official list includes an app launcher and a window switcher.
Menu bar items and URL triggers
Scripts can create menu bar items, draw on the screen and send iMessage or SMS messages, and other apps can trigger them through hammerspoon:// URLs.

KeepingYouAwake

One-click activation
One click on the menu bar icon stops the Mac from going to sleep, and it stays that way until the app is deactivated or a chosen duration ends.
Activation durations
Sleep can be blocked for a pre-defined length of time instead of indefinitely, and the list of durations can be customized in the settings.
Battery safeguards
The app can deactivate itself when the battery level is low, and its Battery settings support Low Power Mode on compatible Macs.
Automatic activation rules
Advanced settings activate it when an external display is connected, deactivate it while another user account is active, or quit the app when a duration ends.
URL scheme
Links such as keepingyouawake:///activate and keepingyouawake:///toggle switch it on or off from scripts and other apps.
Display sleep and notifications
An option lets the display sleep while the Mac itself stays awake, and on macOS 11 or newer the app can post notifications.

Plans

Hammerspoon

  • Hammerspoon$0

    The complete app with every extension, as a direct download or a Homebrew cask. Open source under the MIT license.

KeepingYouAwake

  • KeepingYouAwake$0

    The complete utility with every setting, as a direct download with no account or license key. MIT licensed.

More comparisons