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.
| Claude Code, Codex, Cline and Copilot are detected automatically. Nothing to configure, no key to paste. | |
| Gemini 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. | |
| Using a custom config folder or multiple profiles? Add each folder in the agent's settings and Belay watches them all. | |
| In 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. | |
| Normal holds expire after 120 seconds unless Belay renews them. If Belay disappears, the Mac goes back to normal by itself. | |
| Always 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. | |
| Set a maximum awake time and a battery floor. Belay also lets go on sleep, quit and mode changes. | |
| Claude Code subagents and Cline teammate agents appear under their session in the panel, and count as part of it, not as noise. | |
| While 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. | |
| Opt-in for the direct build: keep working with the lid closed, ending at the awake limit or if the Mac runs hot. | |
| Belay counts the time it kept your Mac awake while you were away, when sleep could actually have interrupted the work. | |
| Agent 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. | |
| English, Русский, Deutsch, Español, Français, Italiano, 简体中文. |
1. Download Now macOS 14 or later, Apple silicon and Intel, under 10 MB.
2. Open the disk image and drag Belay 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
brew install --cask perfectoweb/tap/belaybrew 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.
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.
No Apple Developer account needed:
git clone https://github.com/PerfectoWeb/Belay.git && cd Belay
scripts/build-local.sh
open build/Belay.appNeeds 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.
spctl -a -vvv -t install /Applications/Belay.app
codesign -dv --verbose=2 /Applications/Belay.appYou should see source=Notarized Developer ID and team VSY2EB4Y9E.
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 | ||
| Idle sleep protection with fail-safe holds | ||
| Presets and generic folder / process detection | ||
Watched folders for custom config dirs (CLAUDE_CONFIG_DIR and friends) |
||
| Always On timer, by duration or end time | ||
| Night dimming, statistics, CSV export | ||
| Precise Detection (agent hooks) | ||
| Local webhook for connecting any tool | ||
| Closed-lid hold (privileged helper) |
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.
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.
| Mode | What it does |
|---|---|
| Keeps your Mac awake while an agent is working | |
| Keeps it awake until you turn it off or by timer | |
| Belay 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.
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.

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.
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.
| How it works | Detection, the safety rails, privacy, and talking to Belay from anything |
| FAQ | Why not caffeinate, why not CPU, why not an API key |
| Contributing | Building, testing, translating, adding a preset |
| Architecture | How the app is put together |
| Security | What Belay reads, what it cannot read, and how to verify it |
| Changelog | What changed, and why |
| Roadmap | Where Belay is going, and what has to be true first |
Belay Source-Available License 1.0. Use it anywhere, fork it, build on it. Two conditions:
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.




