Capsomnia

Capsomnia turns Caps Lock into a physical switch, letting your MacBook continue running AI agents, SSH sessions, and build tasks with the lid closed

In-depth Report

  • Capsomnia is a lightweight macOS menu bar application that turns the most neglected Caps Lock key on the keyboard into a physical "stay awake" switch. Close the lid of the MacBook and press Caps Lock. The AI ​​agent continues to run, the SSH session continues, and compilation and downloading continue as usual. This gadget written by a Japanese developer in Swift ranked fifth on Product Hunt that day, and it has received 2.3 million+ views and 6,000+ downloads in Japan. Free, open source, no telemetry, and as clean as any software of this era.

  • Capsomnia was independently developed by Japanese developer Taketo Fujimaki and is open sourced on GitHub under the MIT license (github.com/fuji-mak/Capsomnia). The project has been actively developed since June 2026, and v2.0.3 has been released as of July 27, with a total of 188 submissions. Fujimaki himself is a programmer active in the field of AI and developer tools. The birth of Capsomnia stemmed from his own pain points: when running AI coding agents such as Claude Code, he was forced to interrupt when closing the MacBook lid, and the Mac's built-in "close the lid without sleeping" setting was not convenient enough. Upon release, the product exploded with attention in the Japanese developer community - 2.3 million impressions, over 6,000 downloads, and subsequently appeared on the homepage of Product Hunt where it ranked 5th that day. No financing, no team, no marketing budget, purely relying on word of mouth to spread on Reddit, Hacker News and the Japanese technology community.

  • The core logic of Capsomnia is extremely simple: press Caps Lock and the system disables sleep; press it again to resume sleep. The LED indicator light on the Caps Lock key simultaneously displays the status of the hibernation protection - the light is on to indicate that the task is running, and the light is off to indicate normal hibernation. But there are many subtle designs hidden behind this simple mechanism. The first is the permission separation architecture: the menu bar application itself does not run with root privileges, but uses a minimal privileged auxiliary tool (capsomnia-pmset) to call the system pmset command to modify sleep settings. This auxiliary tool only accepts three parameters: on, off and display-sleep, and the attack surface is compressed to the extreme. The application itself does not make any network requests, does not collect telemetry data, and does not require account registration—the code is completely open and auditable. For users who have mapped the Caps Lock key to other functions, Capsomnia supports custom shortcut keys, and even if a custom shortcut key is used, the Caps Lock light will still display the status synchronously, which is a very thoughtful design. There is also an optional feature that “prevents all-caps input” – after turning on Capsomnia, Caps Lock will no longer input uppercase letters (but the Shift key can still input uppercase letters), avoiding the embarrassment of accidentally touching a screen full of capital letters. System requirements are macOS 14+ and Apple Silicon chip, the installation package is signed and notarized by Apple. Supports four interface languages: English, Japanese, Simplified Chinese and Korean. In actual use, the screen turns off when the lid is closed, but the system continues to run. The app will verify the system SleepDisabled status every 10 seconds and display a red dot in the menu bar if the status drifts or changes cannot be applied. Log files are stored in ~/Library/Logs/Capsomnia/ for easy troubleshooting. Compared with similar tools (such as Amphetamine, Caffeine, InsomniaX), Capsomnia's biggest differentiated advantage lies in the physical switch-style interaction - there is no need to open the menu bar to click, no need to remember the shortcut key combination, and the status feedback of the button + indicator light is more direct than any software interface. The disadvantage is that the function is relatively simple and there is no fine control based on trigger conditions like Amphetamine (such as disabling sleep when a specific application is running, switching when the Wi-Fi network changes, etc.).

  • Capsomnia is completely free, no Pro version, no in-app purchases, no ads. Developers accept donations through GitHub Sponsors, but donations are not the main way to monetize the product. From the perspective of project positioning, this is more like a tool that is open sourced after solving its own pain points, rather than a commercial product. This is good news for users - you can get a signed and notarized, high-quality system tool without paying. But there are also hidden worries: the lack of a sustainable business model means that long-term maintenance and updates may rely entirely on the personal enthusiasm and time of developers.

  • Capsomnia has received overwhelmingly positive reviews on Product Hunt and in the Chinese tech community. Users generally praise its design philosophy of "using a physical button to solve a system-level pain point." The positive reviews focus on several aspects: First, it solves the actual problem of interrupting the AI ​​encoding agent when the MacBook lid is closed and sleeps, especially for Claude Code and Codex users; second, the clean style of free open source, no advertising, and no telemetry has won the trust of the developer community; third, the design of the Caps Lock indicator light for status indication is considered "elegant and practical"; fourth, the popularity in the Japanese market proves that its demand is real. Negative feedback mainly focuses on the two dimensions of heat dissipation and battery. Many users pointed out that running with the lid closed puts a lot of heat dissipation pressure on fanless models such as MacBook Air, and running compilation or AI tasks for a long time may cause overheating and frequency reduction. Another unresolved issue is the battery safety mechanism - if the battery is drained to an extremely low level when Capsomnia is activated, will the system force hibernation to protect the battery? At present, it seems to rely entirely on macOS's own power management, without any safety precautions at the application level.

  • Capsomnia has been covered by multiple technology media outlets. The minority (sspai) recommended it as a useful gadget that "won't sleep when the Caps Lock key is pressed", emphasizing its value for SSH sessions, compilation tasks, and large file download scenarios. The editor of the Chinese Product Hunt site commented that it is "small, free, open source, and ad-free - this is what a developer tool should be." Discussions in the Japanese technology community were particularly lively, with multiple technology bloggers producing video reviews. From an industry perspective, Capsomnia’s popularity is less a victory for a single tool than a by-product of the explosive growth of AI coding agents. As AI coding tools such as Claude Code, Codex, and Cursor become daily equipment for developers, "close the cover and continue running the AI ​​agent" has become a real and high-frequency demand. Capsomnia happened to be in the right market at the right time.

  • The main risks come from the two dimensions of heat dissipation and security. In terms of heat dissipation, heat accumulation is a problem that cannot be ignored when running high-load tasks with the lid closed on the fanless MacBook Air. Although developers have marked the "heat dissipation sensing" function in the roadmap, it has not yet been implemented. In terms of security, although Capsomnia adopts a reasonable permission separation design, the installation process requires administrator rights to create a privileged auxiliary tool and a sudoers rule. This is always a risk point that requires the user's own judgment. Fortunately, MIT open source and signature notarization reduce concerns in this regard. There is also a more fundamental question: Forcibly disabling system hibernation is a behavior that "confronts the macOS design philosophy." Whether long-term use will affect system stability or battery life, there is currently a lack of sufficient long-term test data. This is not a big problem for plug-in use scenarios, but if it is frequently used on battery power, the health of the battery may decline at an accelerated rate.

  • Capsomnia’s most relevant user group is those who use MacBooks for AI development—intensive users of AI coding tools such as Claude Code, Codex, and Cursor. Followed by operations engineers (who need to keep SSH sessions ongoing), front-end developers (who often run long compilations), and any user who needs remote access to their Mac. It is not suitable for users who are sensitive to the operating temperature when the lid is closed, especially MacBook Air users. It is recommended to use it when it is plugged in and has good cooling conditions. If you need a more complex sleep management strategy (such as triggering by time period, by network, by specific applications), Amphetamine may be a better choice. Best practice advice: Use Capsomnia when plugged in whenever possible and avoid running high-load tasks with the lid closed for long periods of time on battery power. Remember to close Capsomnia after running to allow the system to return to normal sleep behavior. If you encounter state drift, you can manually run `sudo pmset -a disablesleep 0` to force recovery.

  • Capsomnia is an extremely focused developer tool - it does one thing, but does it well. The design of using Caps Lock physical keys to control the sleep state may seem simple, but behind it is a deep understanding of the macOS security model, keyboard hardware characteristics, and the actual workflow of developers. Free and open source allows it to gain the trust of the community, and the popularity of the Japanese market verifies the authenticity of the demand. For Mac developers who work with AI agents every day, this 5MB gadget might be the thing that “someone should have made a long time ago.” If developers can solve the two shortcomings of thermal sensing and battery safety, Capsomnia has every opportunity to evolve from a "niche tool" to a "standard equipment for Mac developers."

User Reviews

  • avatar
    GloriaCollins168
    Never fear the lid closing while running Claude Code again. It's absolutely magical.

  • avatar
    SRuizX
    Free, open source, no ads. A labor of love from the developer. Already starred.

  • avatar
    whitefrog681
    Caps Lock light on means it's still running. One glance tells you the status, so much more convenient than checking the menu bar.

  • avatar
    NoahPatel
    Already a huge hit in Japan with 2.3 million views. It's really good, highly recommended.

  • avatar
    JGray_2020
    SSH sessions finally don't disconnect anymore! Thank the author! Before, I had to reconnect every time I closed the lid.

  • avatar
    zAmye
    My biggest concern is still the heat issue. Will the fanless MacBook Air have problems running high-load tasks with the lid closed? The author said thermal awareness is on the way, looking forward to it.

  • avatar
    KylePerryIII
    Used it for a week. Running Claude Code long refactoring tasks on MacBook Pro with the lid closed. Came back and found the code was all written. So worry-free.

  • avatar
    BrianYoung
    The installation process requires authorizing root privileges. Although the author has strictly limited it to only run three commands, I was still a bit hesitant the first time I saw it.

  • avatar
    BilovidPolovec
    Using the Caps Lock light as status indicator is such a clever design. No extra menu bar icon taking up space.

  • avatar
    Susan.Hill_X
    Will it force sleep when the battery runs out? The official docs don't make this clear. I'm honestly not confident using it on battery power.

  • avatar
    Nicholas_CampbellK
    Been using Amphetamine before, feature-rich but always felt heavy. Capsomnia is just one switch, somehow more convenient.

  • avatar
    qor0q4o
    Giving the most useless key on Mac the most useful job — that line on the website is so true.

  • avatar
    StephanieRobinson
    Installed on M4 MacBook Pro, works perfectly with Codex Mobile. Close the lid, throw it in the bag, and tasks keep running on the go.

  • avatar
    GSimmonsQ881
    It's a shame it doesn't support Intel Macs. I still have a 2019 Intel MBP that can't use it.

  • avatar
    冬雪659
    Free, signed and notarized, open source and auditable. You don't see tools like this very often anymore.

  • avatar
    DolphinDefiMartin
    How well does it work with clamshell mode? Does the Caps Lock light still sync when I have an external monitor connected?

  • avatar
    ChristineWright
    Finally don't have to wait around for large file downloads. Close the lid and leave, come back and it's already done.

  • avatar
    WBennett_2024773
    Found a problem: if you forget to turn off Capsomnia and put the laptop in your bag, it gets scorching hot by the next day. Already formed the habit of checking the light before leaving my desk.

  • avatar
    Lauren.Flores
    The custom shortcut key feature is so thoughtful. I already mapped Caps Lock to Esc way back, so changing it to Cmd+Shift+S works just as well.

  • avatar
    贾静燕
    Tried it for two days. Verdict: this 5MB little tool solved a problem that troubled me for a long time. So much more convenient than messing with system config.

  • avatar
    Jordan_SimmonsZ
    The Chinese UI is well done. For a Japanese developer to translate the interface text to this level deserves praise.

  • avatar
    Alexander_Stewart520
    For developers who deal with AI agents every day, this is truly a necessity. Before leaving, press Caps Lock, and by the time you're back, Claude Code has already finished running.

  • avatar
    FrankWhite_2021
    What's new in v2.0.3? Can someone tell me? I'm still on 1.0.0 and haven't upgraded yet.

  • avatar
    蝴蝶455
    Looked at GitHub, commits are very active, the author updates almost every day. It's not easy to maintain a personal project like this.

  • avatar
    Nicholas.TorresJr
    Still not confident running high loads with the lid closed, passive cooling worries me. It's OK when plugged in, temperature seems normal.

  • avatar
    Karen.Martin_72
    Just deployed to production for testing. Several AI engineers at my company are using it, feedback is good. A colleague specifically tested running Codex to write test cases with the lid closed all afternoon. Everything passed, no disconnects or overheating. But we all use M3 Pro with fans, Air users should be cautious.

  • avatar
    MsAnthonyHarcourt_dev
    Compared NoSleep and Amphetamine, Capsomnia's biggest advantage is direct interaction - physical button is much faster than clicking the menu bar, and the light feedback is very clear. Disadvantage is limited features, no conditional triggers. But an open source tool doing its core function this well is impressive. So many bloated apps fail at everything.

  • avatar
    Julie_RiveraIII
    Carefully read the source code on GitHub for the security design. The approach of having the privileged helper tool only accept three parameters is great, much more secure than most tools that run the whole app as root. The author clearly understands the macOS security model deeply. Already added a watch to the project, looking forward to thermal awareness in future versions.

  • avatar
    万彤娜
    Question for those who have used it: what's the difference between this and the system "stay awake when lid closed" setting? Would running pmset -a disablesleep 1 in the terminal have the same effect? Or does Capsomnia have a more elegant mechanism?

  • avatar
    Jonathan.Gutierrez369
    Tried running Flutter compilation with lid closed on M2 MacBook Air for half an hour. The bottom was noticeably hotter than usual. I recommend Air users only use this when plugged in and well-ventilated. On battery, keep the lid open. The tool itself is fine, just manage thermal expectations.