Built for the long run, the long-horizon agent run.

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.

0%CPU while on
0idle wakeups
2.8 MBof memory
0accounts, trackers or servers

Measured on an M4 Pro MacBook Pro, command-line helper. The menu bar app uses about 13 MB.

Three reasons to ship it.

1It keeps running while your AI does.

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.

2It's tiny and private.

No telemetry, no "AI insights dashboard cloud subscription". No, we are not raising.

3It can't get stuck awake.

A crash releases the hold. More reliable than Gary's gbrain.

Wrap the long-horizon thing.

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.

It never blinks.

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.

A shoe, a runner, a stopwatch.

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.

What it will never do.

Install in one line. Faster than npm install.

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

Questions.

Isn't this what 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.

How do I know it's working?

Look at the menu bar: a runner means on. Nerds can run pmset -g assertions and see Marathon listed.

Does it use battery?

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.

Why Rust?

Small, fast, no runtime, and a compiler that catches the 3 a.m. bugs before your agent writes them.

Go touch grass, before the Human to AI handoff.