Guide · October 2026

An Amphetamine alternative for AI agents

Amphetamine is a great free keep-awake app. Here's what long, open-ended runs like Claude Code or Codex need on top of that.

Lidnight stops runaway spend, silent approval stalls, and unexpected limit hits while you step away. Track Claude Code, Codex, Antigravity, Gemini and Kiro sessions, limits and cost, approve from your phone, and keep going with the lid closed.

Download freePro trial included · no card · Apple Silicon, macOS 13+Pro pricing ($9.99 / 3 Macs $14.99) ›

Homebrew: brew install whereisdw/tap/lidnight

When Amphetamine is enough

If a timer, or “while this app is open”, is good enough — especially at a desk with power and an external display — Amphetamine (free) or caffeinate does the job.

What changes with AI agent runs

It has to know when the work is done. The terminal stays open after the task ends, so “while the app is running” keeps the Mac up all night. Lidnight uses Claude Code and Codex hooks to know exactly when work starts and ends, and sleeps 10 minutes after everything goes quiet.

Lid closed, on battery. Without an external display, closing the lid sleeps the Mac. Lidnight keeps the run going, warns if the battery stays above 42°C for over a minute, and sleeps at 45°C or at a battery floor you set.

Don't stall on a permission prompt. Keeping the Mac awake doesn't help if the agent is stuck on “Can I run this?”. Lidnight lets you allow or deny it from a Mac notification, a bunny by the notch, or your phone (Pro).

Side by side

AmphetamineLidnight
PriceFreeFree + one-time Pro
Timers & app triggers✓Timer & Until modes
Sleeps when AI work ends—✓
Lid closed on batteryWith conditions✓
Battery & heat protectionSome✓
Claude Code approvals & limits—✓

Amphetamine's options vary by version and settings — check its own documentation for details.

In short

Fixed amounts of time: Amphetamine. Hand an agent a task, close the lid and let it sleep when it's done: Lidnight. Compare more options

Try Lidnight free

Apple Silicon Macs · macOS 13 or later. Every download includes a free trial of everything in Pro (14 days or 5 lid-closed runs of 10+ minutes, whichever comes first), no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99 USD, plus regional tax) with a 14-day full refund, no questions asked.

Homebrew: brew install whereisdw/tap/lidnight