You kicked off a four-hour agent run and went to get a $9 matcha. Your Mac went to sleep. Your agent died at 61% context. The demo is at 3. We are not Tibo, so we can't keep your weekly credits going, but we'll keep your Mac running at least. Marathon keeps your Mac awake while your agents cook, then lets it sleep when they're done.
# awake while the agent runs marathon -- claude "fix tests" # or just: stay up two hours marathon on 2h
AI-aware mode spots Claude Code, Codex, Cursor, Gemini CLI, opencode, pi and friends, plus Ollama, LM Studio, llama.cpp and MLX, and stays up only while they're actually working. Sample menu.
Measured on an M4 Pro MacBook Pro, command-line helper. The menu bar app uses about 13 MB.
AI-aware mode spots your agents and busy local models and stays up while they work, not just while they're open. Zero config, zero prompts. One run? marathon -- claude.
No telemetry, no "AI insights dashboard cloud subscription". No, we are not raising.
A crash releases the hold. More reliable than Gary's gbrain.
Put marathon -- in front of any command. Your Mac stays awake while it runs and goes back to normal when it ends. Your scripts won't even notice it was there.
Agents, model pulls, evals, builds, backups. Your agent can run it too. It's one line, so it fits in any system prompt.
$ marathon -s -- codex exec "migrate the tests" …agent works, screen may sleep, Mac may not… $ echo $? 0 $ marathon ai check Claude Code pid 48213 6.2% CPU ollama pid 1187 41.0% CPU GPU 87% busy AI-aware mode would keep the Mac awake: Claude Code is working. $ marathon on until 6pm On (Mac and screen stay awake, 3h 12m left, until 18:00). Held by the Marathon menu bar app. $ marathon status --json { "active": true, "remaining_secs": 11520, … } $ marathon off Off: your Mac sleeps normally.
Some keep-awake apps let go every few seconds and grab back on. That's a lot of check-ins. Marathon commits: one hold, no polling, no standups.
Click the menu bar icon to turn it on or off. Right-click for timers, triggers, "let the screen sleep", and start at login. The app and the command share one session, so either can turn it off. Triggers can start it for you: while certain apps run, while plugged in, with an external display, or during set hours. On battery it stands down below the charge you pick.
The curl line installs the menu bar app and the marathon command, after checking the download's checksum. Homebrew does both too. npm, uv and cargo give you just the command, which is all your agent needs.
Apple Silicon, macOS 14 or later. Prefer to read it first? It's all on GitHub, Apache 2.0.
$ curl -fsSL https://marathon.abediaz.ai/install.sh | sh Installed. Look for the shoe in your menu bar. # or $ brew install abe238/tap/marathon $ npx marathon-mac on 2h $ uvx marathon-mac ai $ cargo install marathon-cli
caffeinate does?Same idea. Marathon adds a menu bar switch, times like "until 6pm", triggers, and one switch shared by the app and the terminal.
Look at the menu bar: a runner means on. Nerds can run pmset -g assertions and see Marathon listed.
Marathon itself uses next to nothing. Keeping a Mac awake does use power; that's the point. Use -s to let the screen sleep, or set a battery cut-off so a forgotten run can't drain you.
Small, fast, no runtime, and a compiler that catches the 3 a.m. bugs before your agent writes them.