Skip to content

Repository files navigation

Belay: keeps your Mac awake while your AI agent works

Latest release Downloads CI
macOS 14+ Universal
Homebrew Mac App Store Notarized

Download Belay for macOSLearn more on the Belay website

📚 What is it?

You start a long Claude Code, Codex, Cline, or Copilot CLI task and walk away. Ten minutes later your Mac sleeps, the run stops making progress, and you come back to unfinished work.

Belay is a macOS menu bar app that fixes exactly that. It watches your local coding agents, keeps the Mac awake while work is still happening, and lets it sleep normally again when the work is done.

No timer required. No sleep setting to remember to change back.

✨ Features

 Zero setupClaude Code, Codex, Cline and Copilot are detected automatically. Nothing to configure, no key to paste.
 More agentsGemini CLI, OpenCode, Cline (VS Code), Aider and Pi ship as presets. For anything else, watch a folder or process, or connect it yourself in the direct build.
 Custom foldersUsing a custom config folder or multiple profiles? Add each folder in the agent's settings and Belay watches them all.
 Precise detectionIn the direct build, every built-in agent can report the exact moment work starts, finishes or waits for you – Copilot does it out of the box, the rest with one click in Settings and a full preview before anything is written.
 Lets goNormal holds expire after 120 seconds unless Belay renews them. If Belay disappears, the Mac goes back to normal by itself.
 Timed keepAlways On can run for a set duration or until a specific time, with the countdown in the panel and on the dimmed screen. The timer survives a relaunch.
 Safety limitsSet a maximum awake time and a battery floor. Belay also lets go on sleep, quit and mode changes.
 Agent teams tooClaude Code subagents and Cline teammate agents appear under their session in the panel, and count as part of it, not as noise.
 Night dimmingWhile holding at night, Belay can dim the display to a chosen level on your schedule, show the timer's countdown on the dark screen, and restore brightness the moment you come back.
 Closed‑lid holdOpt-in for the direct build: keep working with the lid closed, ending at the awake limit or if the Mac runs hot.
 Time savedBelay counts the time it kept your Mac awake while you were away, when sleep could actually have interrupted the work.
 Stays localAgent detection stays on your Mac. No account, analytics or telemetry. Direct builds can check GitHub once a day for updates; you can turn that off.
 MultilingualEnglish, Русский, Deutsch, Español, Français, Italiano, 简体中文.

📦 Install

1. Download Nowlatest version macOS 14 or later, Apple silicon and Intel, under 10 MB.

2. Open the disk image and drag Belay into Applications.

The Belay disk image: drag the app into Applications

3. That is the install. Launch it and it lives in the menu bar.

The app and the disk image are both signed with a Developer ID and notarized by Apple, and both carry a stapled ticket, so the first launch works with no network and without the right-click-Open dance.

Other ways to install

🍺 Homebrew

brew install --cask perfectoweb/tap/belay

brew upgrade keeps it current afterwards. It installs the same signed, notarized disk image the button above gives you, and Homebrew checks its SHA-256 before it opens it.

The cask lives in our own tap rather than in homebrew-cask itself. Homebrew's main cask repository has a notability bar. A project needs a certain number of stars, forks or watchers before it is accepted, and Belay has not cleared it yet. Same command shape, one extra word.

🍎 Mac App Store

Belay - Awake for AI Agents, free, macOS 14 or later. The sandboxed build, so it updates through the store rather than through Sparkle and has no network access at all.

🔨 Build it yourself

No Apple Developer account needed:

git clone https://github.com/PerfectoWeb/Belay.git && cd Belay
scripts/build-local.sh
open build/Belay.app

Needs Xcode 16 or later, plus xcodegen, swiftlint and swift-format from Homebrew. The result is ad-hoc signed, which means it runs on your Mac and will not open on anyone else's without a right-click.

🔎 Verify what you downloaded

spctl -a -vvv -t install /Applications/Belay.app
codesign -dv --verbose=2 /Applications/Belay.app

You should see source=Notarized Developer ID and team VSY2EB4Y9E.

📚 What is different between versions?

Belay ships in two builds that share the same app and the same detection. The Mac App Store build runs sandboxed with no network access at all; the direct build adds the few things a sandbox cannot do.

Capability App Store Direct
Claude Code, Codex, Cline and Copilot CLI detection yes yes
Idle sleep protection with fail-safe holds yes yes
Presets and generic folder / process detection yes yes
Watched folders for custom config dirs (CLAUDE_CONFIG_DIR and friends) yes yes
Always On timer, by duration or end time yes yes
Night dimming, statistics, CSV export yes yes
Precise Detection (agent hooks) no yes
Local webhook for connecting any tool no yes
Closed-lid hold (privileged helper) no yes

☕️ Why not just caffeinate?

Caffeinate is great when you know exactly what process or command should keep the Mac awake.

Belay is for the opposite workflow: coding agents start, wait, resume and finish on their own. Belay follows that work state and releases the Mac automatically.

Features caffeinate Amphetamine Belay
Keeps the Mac awakeyesyesyes
Freeyesyesyes
Timed sessionsyesyesyes
Keeps awake while a given app or process runsyesyesyes
Lives in the menu barnoyesyes
Battery safety limitsnoyesyes
Knows when a coding agent is actually workingnonoyes
Lets go when the agent finishes or waits for younonoyes
Shows agent sessions and subagents livenonoyes
Exact start / finish signals from agent hooksnonoyes
Source availablenonoyes

🚀 How to Use

1. Launch it. One welcome screen explains what Belay reads. Then it lives in the menu bar. There is no Dock icon and no window.

2. Leave it in Auto. That is the whole product. Belay holds the Mac awake while an agent is working and lets it sleep when nothing is.

ModeWhat it does
 Auto (def)Keeps your Mac awake while an agent is working
 Always OnKeeps it awake until you turn it off or by timer
 OffBelay stays out of the way

3. Left-click the menu bar icon for the panel: what is running, for how long, and, when Belay is not holding, the reason in plain language. Right-click for a compact menu.

The Belay panel, showing four agents working and the Mac being held awake

4. Want to verify it? macOS can show the assertion Belay is holding:

pmset -g assertions | grep "pid $(pgrep -x Belay)("

You will see the assertion, a plain-English reason, and how long it has left.

Adding a tool Belay has never heard of takes one line. If it can run a shell command, it can talk to Belay. See docs/HOW-IT-WORKS.md.

🖼 Screenshots

Agents, Statistics, Behaviour and a multilingual interface

🧯 Troubleshooting

My Mac still went to sleep

Open the panel. It always says why in plain language. The usual answers are the battery guard, the maximum awake time, or that Belay did not think anything was running. If it is the last one and your agent was working, that is a bug worth reporting: include the tool and the macOS version.

Can Belay work with the lid closed?

Out of the box, no: an idle-sleep assertion does not keep a MacBook awake with the lid shut. macOS enters clamshell sleep unless the machine is on AC power with an external display attached.

Since 1.3, the direct build can keep working with the lid closed as an opt-in. Enable Closed-lid hold in Settings and approve the system helper when macOS asks.

Belay lets go automatically when the work ends, the awake limit is reached, or the Mac gets too warm.

The App Store build cannot install a privileged helper (that is Apple's rule, and a good one), so it does not offer the switch.

My screen still turns off

That is intentional and saves real power. Belay prevents system sleep; the machine underneath keeps working. There is a setting to keep the display awake too, off by default – and since 1.3, one to dim it to a glow at night while it is kept awake, so a screen held for an overnight run does not light an empty room. It brightens back the moment you return.

Belay does not see my agent

Claude Code, Codex, Cline and Copilot CLI need no setup, and if yours runs from a custom config folder or a second profile, add that folder from the agent's own settings. Everything else is configured in Settings ▸ Agents: switch on a preset – Gemini CLI, OpenCode, Aider, Cline (VS Code) and Pi ship ready-made – or point Belay at a folder or process your tool uses while it works.

In the direct build, tools that can run a shell command can also talk to Belay directly. See docs/HOW-IT-WORKS.md.

It says "needs setup"

Since 1.3.2 the badge says which case you are in: a folder that does not exist yet simply has not been created by the tool (it appears after the first run), and only a folder that exists but cannot be read is an access question. Presets are configuration, not code, so open Settings ▸ Agents and correct the path if yours lives elsewhere.

Something else

Open an issue. The macOS version and the agent you were running are the two things that make a report actionable. docs/QA-CHECKLIST.md lists what has and has not been exercised on a real machine; macOS 14, 15 and 26 have all been run for real.

💬 Support & Contributions

Belay is free and always will be. The most useful things, in order:

Star it. It costs nothing and helps other people find it.

🐛 Report a bug. The macOS version and the agent you were running are what make a report actionable.

🌍 Fix a translation. One CSV per language, and it is data rather than code. This is the most wanted contribution here.

🔌 Add a preset for an agent Belay does not know yet. Also data, also no need to learn the codebase.

💛 Donate. Last on the list on purpose.

Start at docs/CONTRIBUTING.md. Security reports go through docs/SECURITY.md, not the issue tracker.

📖 Documentation

How it worksDetection, the safety rails, privacy, and talking to Belay from anything
FAQWhy not caffeinate, why not CPU, why not an API key
ContributingBuilding, testing, translating, adding a preset
ArchitectureHow the app is put together
SecurityWhat Belay reads, what it cannot read, and how to verify it
ChangelogWhat changed, and why
RoadmapWhere Belay is going, and what has to be true first

📝 License

Belay Source-Available License 1.0. Use it anywhere, fork it, build on it. Two conditions:

 You may not sell it. Not the app, not a derivative, not access to it. Use is free and stays free for everyone, including at work and for commercial work. What is forbidden is charging other people for it.

 Credit the original. Anything built on Belay has to say so where its users can see it: Belay by PerfectoWeb, with a link back here.

The name and the mark are covered separately. docs/TRADEMARKS.md explains what that does and does not stop you doing.

Belay shows each tool's own logo in the sessions list so you can tell at a glance which agent is working. All product names, logos and trademarks are the property of their respective owners, used only to identify those products, and imply no affiliation or endorsement. See NOTICE.md.


Built for people who leave their agents running and go and do something else.

About

💻 Keeps your Mac awake while your AI agents work. Built-in detection for Claude Code, Codex, Cline, Copilot plus presets for Gemini CLI, OpenCode, Aider and Pi.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

28 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages