amphetamine-control

Control Amphetamine wake-lock sessions on macOS via AppleScript or URL scheme.

12|2|Updated Feb 2, 2020
One-click install
npx skills add https://github.com/servitola/dotfiles --skill amphetamine-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: amphetamine-control
Source: https://github.com/servitola/dotfiles/tree/main/claude-code/skills/amphetamine-control
Command: npx skills add https://github.com/servitola/dotfiles --skill amphetamine-control

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates keeping your Mac awake by controlling Amphetamine.app via AppleScript or its URL scheme, with a safe fallback to caffeinate when Amphetamine isn't installed.

Core Features & Use Cases

  • Start a wake-lock session indefinitely or for a set duration.
  • Check whether a wake-lock session is currently active.
  • End an active wake-lock session.
  • Fallback to caffeinate when Amphetamine is not present; use amphetamine:// URL scheme or AppleScript as the automation surface.

Quick Start

Tell Amphetamine to start or end a wake-lock session using AppleScript or the amphetamine:// URL scheme.

Frequently Asked Questions about amphetamine-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate starting a wake-lock session on macOS using Amphetamine?

You can automate a timed or indefinite wake-lock session on macOS by triggering Amphetamine via AppleScript or the amphetamine:// URL scheme. This Skill handles starting sessions directly without manual app interaction.

Can I check if an Amphetamine session is active and end it programmatically?

Yes, you can check active status and end a wake-lock session programmatically. This Skill uses AppleScript to query Amphetamine's current state and safely terminate any running session on demand.

Do I need the Amphetamine app installed to keep my Mac awake with this automation?

You need Amphetamine installed in /Applications for primary automation, but this Skill provides a safe fallback. When Amphetamine is unavailable, it automatically uses the built-in caffeinate command to maintain the wake-lock.

What is the best way to trigger Amphetamine via URL scheme instead of AppleScript?

The best way to trigger Amphetamine without AppleScript is using the amphetamine:// URL scheme. This Skill applies the URL scheme to start and end wake-lock sessions, providing an alternative automation surface for macOS.

Why does my macOS session management script fall back to caffeinate?

Your script falls back to caffeinate when Amphetamine is unavailable or not installed in /Applications. This safe fallback ensures your macOS wake-lock automation continues functioning even if the primary app dependency is missing.