Capsomnia is a utility designed to keep your MacBook awake and prevent it from sleeping, even when the lid is closed. It allows users to continue running essential background tasks without interruption, making it ideal for developers, students, and anyone who needs their Mac to stay active for extended periods.
The core problem Capsomnia addresses is the frustration of a MacBook going to sleep mid-task. Whether it's a long-running code compilation, a large file download, an AI agent processing data, or an active SSH session, unexpected sleep can lead to lost progress, wasted time, and the need to restart complex operations. This utility provides a simple, hardware-based solution to this common annoyance.
One of the key features of Capsomnia is its repurposing of the Caps Lock key. By default, the Caps Lock key on MacBooks is often underutilized. Capsomnia turns this key into a dedicated physical switch for its keep-awake functionality. When activated, it disables the system's sleep function, ensuring that the MacBook remains active. The Caps Lock indicator light serves a dual purpose, not only showing the status of the Caps Lock function but also indicating whether Capsomnia's keep-awake mode is active, providing a clear visual cue to the user.
For users who already utilize the Caps Lock key for other functions, Capsomnia offers flexibility. It allows users to assign a different keyboard shortcut to activate or deactivate the keep-awake mode. This ensures that the application can be integrated into existing workflows without conflict. Regardless of the chosen shortcut, the Caps Lock light continues to serve as the primary visual indicator for the keep-awake status.
Capsomnia is built with user privacy and security in mind. It is described as free, open-source, signed, and notarized, ensuring a level of trust and transparency. Crucially, the application requires no accounts, makes no network requests, and collects no telemetry data. This commitment to privacy means users can be confident that their activity and system usage remain private.
The application works by intercepting keyboard input to toggle a system setting that prevents sleep. When the designated shortcut is pressed, Capsomnia signals the macOS operating system to disable automatic sleep. This allows tasks to continue running even when the laptop lid is closed. To restore normal sleep behavior, the user simply toggles the switch off using the same or a different assigned shortcut.
The primary benefit for users is the uninterrupted execution of background tasks. This means no more lost progress on builds, downloads, or AI processes. It provides peace of mind, knowing that critical operations will complete without being halted by the system's sleep timer. The use of the Caps Lock key as a physical switch also offers a more tactile and intuitive control compared to software-only solutions that might rely on menu bar icons or complex settings.
Capsomnia is particularly useful for scenarios such as running AI coding agents like Claude Code or Codex overnight, maintaining long SSH sessions without fear of disconnection, completing large software builds, or downloading substantial files. It's also beneficial for any long-running script or process that needs continuous execution, especially when the user needs to close the lid to save space or for portability.
Capsomnia is designed for macOS users, specifically noted to be signed and notarized for Apple silicon Macs running macOS 14+. It is free and open-source. While the primary function is to prevent sleep, users are advised to consider thermal management and battery levels, especially for sustained, CPU-intensive tasks with the lid closed. The developers have indicated that future updates may include thermal-aware controls and battery safety cutoffs.
In summary, Capsomnia offers a simple yet powerful solution for Mac users who need to keep their devices awake during critical background tasks, leveraging the Caps Lock key for intuitive control and prioritizing user privacy.