Capsomnia icon

Capsomnia

Capsomnia is a macOS utility that turns Caps Lock into a physical keep-awake switch for closed-lid MacBook work. It helps users keep local jobs, SSH sessions, and AI coding agents running without sleep.

Capsomnia

Overview

Capsomnia is a macOS utility that turns Caps Lock into a physical keep-awake switch. It is intended for MacBook background work that should continue even after the lid is closed.

The product’s core job is simple: toggle sleep prevention on and off from the keyboard, with the Caps Lock LED showing the current state. The site positions it for local workflows such as AI coding agents, SSH sessions, builds, downloads, and unattended scripts.

Capsomnia is presented as open source and free, with documentation links for the repository, README, and security policy. The site also states that it supports macOS 14+ and uses a small privileged helper for the sleep-setting change.

Because it disables sleep for closed-lid continuity, the site warns that heat and battery drain can increase and suggests paying attention to airflow, power, and runtime.

Features

Caps Lock as a sleep toggle

Turn Caps Lock on to disable sleep, and turn it off to return to normal sleep behavior. The site shows the underlying pmset commands used for each state.

Closed-lid continuity

Keep long-running work active after closing the lid, which is the main use case the product is built around.

Physical status indicator

The Caps Lock LED reflects the keep-awake state, so you can check whether sleep prevention is active without opening the app.

Custom shortcut support

The site describes a custom shortcut option for people who do not want to use Caps Lock itself as the trigger.

Open-source and inspectable

The app is open source under the MIT License, and the site links to source, README files, issues, releases, and a security policy.

Restricted security model

Capsomnia says the app runs as the current user, while a limited helper handles the privileged pmset calls through passwordless sudo.

Use cases

  • AI coding agents

    Keep Codex or Claude Code tasks running while the MacBook lid is closed, rather than relying on the machine to stay awake by itself.

  • SSH work

    Maintain remote access during an SSH session so the Mac does not fall asleep in the middle of an interactive or unattended connection.

  • Long local jobs

    Let large builds, compiles, and downloads continue to completion without having to keep the screen open.

  • Mobile-connected workflows

    Keep mobile remote sessions connected when you need an always-awake Mac for tools such as Codex Mobile or similar workflows.

  • Temporary keep-awake control

    Use the keyboard shortcut as a quick way to prevent sleep only when you need it, then switch back to normal sleep behavior afterward.

Pros and Cons

Pros

  • Simple physical control using a keyboard key instead of a separate menu setting.
  • Caps Lock LED provides immediate visible status.
  • Useful for long-running local workflows that should continue with the lid closed.
  • Open source under the MIT License, with source and documentation linked from the site.
  • No telemetry and no accounts are mentioned on the site.

Cons

  • Closed-lid, sleep-disabled use can increase heat and battery drain.
  • The site only explicitly states support for macOS 14+, so older versions are not confirmed.
  • The security model relies on a privileged helper and passwordless sudo, which may require extra review before installation.

FAQ

How does Capsomnia keep a Mac awake?

Capsomnia turns Caps Lock into a physical keep-awake switch. When it is on, the app runs pmset -a disablesleep 1 through a small privileged helper; turning it off restores normal sleep behavior.

What macOS versions does Capsomnia support?

The site says Capsomnia is for macOS 14+ and is focused on MacBook background work, especially when the lid is closed.

What kinds of tasks is Capsomnia meant for?

It is designed for local workflows that need continuity, such as Codex, Claude Code, SSH sessions, builds, downloads, and unattended scripts.

Is Capsomnia open source?

Capsomnia is open source under the MIT License. The site also states that the app itself runs as the current user and uses one fixed root-owned helper with passwordless sudo for the sleep-setting changes.

Are there any limitations or cautions?

The product notes that closed-lid, sleep-disabled use can increase heat and battery drain, so airflow, power, and runtime should be considered.

Quick Facts

Category
Developer Tool
Platform
macOS 14+
Primary workflow
Closed-lid keep-awake control for local MacBook work
License
MIT License
Source
capsomnia.com
Pricing
Not listed on the site; the homepage presents it as free/open source
Capsomnia - AI Tool, Features, Use Cases & Alternatives | UStack