A macOS menu bar app that keeps your Mac awake only while AI coding agents like Claude Code or Codex are actively working.
noahelhadedy/double-shot
A macOS menu bar app that keeps your Mac awake, including with the lid closed, while AI coding agents such as Claude Code and Codex are working.
Open-source alternative to:Amphetamine
- Stars
- 101
- Forks
- 13
- Open issues
- 0
- Last commit
- 6 days ago
What is it?
Double Shot is a menu bar app for macOS that prevents the Mac from sleeping. Its main difference from tools like caffeinate is that it watches AI agent sessions: it detects when Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, OpenCode, Amp or Aider are actually working, including one-shot background runs, and keeps the Mac awake until they go quiet. Custom agents built with LangChain or plain scripts can be added by name in Settings.
With lid closed mode enabled, the Mac keeps running with the lid shut, on battery too. Enabling it requires a one-time admin password to add a narrow sudoers rule that only allows four pmset commands. While active, the app turns the display off, switches on Low Power Mode on battery, and stops when the Mac gets hot or the battery drops to a set level. A watchdog restores normal sleep if the app crashes.
Double Shot can also simply keep the Mac awake for a set duration or until turned off, and it supports automation through doubleshot:// URL scheme links.
Key features
- 01Detects active AI agent sessions such as Claude Code, Codex and Gemini CLI and stays awake while they work.
- 02Keeps the Mac running with the lid closed, including on battery, after a one-time password setup.
- 03Turns the display off, enables Low Power Mode on battery and stops at a heat or battery threshold while the lid is closed.
- 04Supports custom agents by process name, including Python, Node and binary scripts.
- 05Offers timed and open-ended keep-awake sessions from the menu bar, plus doubleshot:// URL scheme automation.
Use cases
- Letting a long Claude Code or Codex run finish after closing the laptop lid and putting it in a bag.
- Keeping a Mac awake during a long-running local script or custom LangChain agent.
- Holding the Mac awake for a fixed period, such as during a download or a presentation.
Quick start
- 1
Install with Homebrew
brew install --cask noahelhadedy/tap/double-shot - 2
Or download the zip from the Releases page, unzip it and move Double Shot.app to Applications
- 3
Or clone the repository to build from source
git clone https://github.com/noahelhadedy/double-shot.git
Things to know
- macOS only, and building from source needs macOS 14 or later with Xcode 16 or later.
- The app isn't notarized by Apple yet, so macOS requires a manual approval step on first open.
- Lid closed mode needs a one-time admin password and adds a sudoers rule.
In collections
Topics
FAQ
- What is double-shot?
- A macOS menu bar app that keeps your Mac awake, including with the lid closed, while AI coding agents such as Claude Code and Codex are working. Double Shot is a menu bar app for macOS that prevents the Mac from sleeping. Its main difference from tools like caffeinate is that it watches AI agent sessions: it detects when Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, OpenCode, Amp or Aider are actually working, including one-shot background runs, and keeps the Mac awake until they go quiet. Custom agents built with LangChain or plain scripts can be added by name in Settings.
- Is double-shot free to use? What license does it have?
- double-shot is open source under the MIT license. Check the license terms before using it in commercial products.
- Is double-shot still maintained?
- Actively maintained. The last commit to double-shot was on Nov 1, 2026.
- What can I use double-shot for?
- Letting a long Claude Code or Codex run finish after closing the laptop lid and putting it in a bag. Keeping a Mac awake during a long-running local script or custom LangChain agent. Holding the Mac awake for a fixed period, such as during a download or a presentation.
- How do I install double-shot?
- Install with Homebrew: brew install --cask noahelhadedy/tap/double-shot Or download the zip from the Releases page, unzip it and move Double Shot.app to Applications Or clone the repository to build from source: git clone https://github.com/noahelhadedy/double-shot.git
- Where can I get double-shot?
- The source code and installation instructions are on GitHub: https://github.com/noahelhadedy/double-shot
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A macOS menu bar app that turns your AI coding token usage into a Pokémon companion, while tracking daily spend and official Claude, Codex and Antigravity limits.
An all-in-one macOS menu bar app that puts everyday system switches, shortcuts, system monitoring and widgets in one customizable place.
A macOS notch companion (plus Windows, Linux and phone apps) that shows live sessions from AI coding agents like Claude Code and Codex and lets you approve their requests.
A macOS menu bar manager that hides and shows menu bar items, with an always-hidden section, search, and appearance customization.
An open source macOS menu bar manager that hides unused icons and lets you find any menu bar item from the keyboard.