{
  "schema": "tesign-radar/item/1",
  "generated_at": "2026-09-17T01:56:13.055Z",
  "lang": "en",
  "slug": "adrafinil",
  "url": "https://tesign.com/en/item/adrafinil/",
  "alternates": {
    "ko": {
      "html": "https://tesign.com/item/adrafinil/",
      "json": "https://tesign.com/item/adrafinil/index.json",
      "markdown": "https://tesign.com/item/adrafinil/index.md"
    },
    "en": {
      "html": "https://tesign.com/en/item/adrafinil/",
      "json": "https://tesign.com/en/item/adrafinil/index.json",
      "markdown": "https://tesign.com/en/item/adrafinil/index.md"
    }
  },
  "name": "Adrafinil",
  "use_label": "Mac wake-lock for agent users",
  "one_liner": "Keeps a Mac awake only while a coding agent works, lid closed or not; normal sleep after.",
  "text": {
    "why": "Leave caffeinate or Amphetamine on for an overnight agent and the Mac stays awake long after the work ends; Adrafinil has agent hooks call acquire when a turn starts and release when it stops, blocking sleep (including lid-closed clamshell sleep) only while work is actually running, and returning to normal sleep the moment the last session lets go. One click installs hooks for nine agents (Claude Code, Codex, Cursor, Gemini CLI, Aider, Hermes, OpenCode, Cline, Pi), the CLI round-trips in under 50 ms so it never stalls an agent, and a thermal cutout releases every hold if temperature crosses a threshold with the lid closed.",
    "take": "A small utility that reframes the problem from 'always awake' to 'awake only while there is work', notable for isolating the root-level sleep control in a separate helper that exposes a single setSleepBlocked call. It needs macOS 26.4 or later.",
    "build": [
      "Wrap any tool that has hooks with `adrafinil acquire` / `release`, bracket hookless commands in the shell, or place a timed hold with `adrafinil hold --for 2h`. Through the bundled MCP tool (`adrafinil mcp`) an agent can ask to stay awake for a long build or deploy that outlives its reply."
    ],
    "who": [
      {
        "role": "Mac users who leave agents working overnight",
        "situation": "awake only while the agent works, even with the lid closed, then normal sleep"
      },
      {
        "role": "People who carry a laptop in a bag",
        "situation": "a thermal cutout, a lid-close chime and a summary when you reopen"
      },
      {
        "role": "Developers running long builds or deploys",
        "situation": "the agent requests a timed hold over MCP or the CLI"
      }
    ],
    "start": [
      {
        "command": false,
        "text": "brew install --cask adrafinil"
      },
      {
        "command": false,
        "text": "Or open the signed, notarized DMG from https://github.com/kageroumado/adrafinil/releases/latest and drag Adrafinil to Applications (the first launch asks for admin rights once)"
      },
      {
        "command": false,
        "text": "Wire agent hooks from the in-app installer with one click, or via the CLI: adrafinil install-hooks"
      }
    ],
    "caveat": [
      "MIT licence.",
      "Requires macOS Tahoe 26.4 or later (the author tests only on 26.4; a backport fork for macOS 15 Sequoia is maintained by someone else). The standard install needs admin rights — lid-closed sleep is overridden by a root helper using `pmset disablesleep`.",
      "Custom agents without hooks are not auto-detected, so pair every acquire with a release; the idle-release timeout and per-hold time limits are the safety net."
    ]
  },
  "cta": {
    "type": "install",
    "label": "INSTALL",
    "url": "https://kagerou.glass/adrafinil"
  },
  "ready": "install",
  "categories": [
    "ai",
    "productivity"
  ],
  "categories_confirmed": true,
  "tags": [
    "macos",
    "menu-bar",
    "keep-awake",
    "claude-code",
    "agent-hooks",
    "swift"
  ],
  "platform": [
    "macos"
  ],
  "license": {
    "spdx": "MIT",
    "scope": "permissive",
    "scope_text": "Use, change and redistribute, commercially too. Keep the notice.",
    "url": "https://spdx.org/licenses/MIT.html",
    "note": null,
    "open_source": true
  },
  "language": "Swift",
  "source_urls": {
    "canonical": "https://kagerou.glass/adrafinil",
    "github": "https://github.com/kageroumado/adrafinil",
    "huggingface": null,
    "app_store": null,
    "sightings": [
      {
        "source": "showhn",
        "url": "https://github.com/kageroumado/adrafinil",
        "posted_at": "2026-06-27T20:34:53.000Z",
        "hn_url": "https://news.ycombinator.com/item?id=48701512"
      },
      {
        "source": "github",
        "url": "https://github.com/kageroumado/adrafinil",
        "posted_at": "2026-06-27T23:00:00.000Z",
        "hn_url": null
      }
    ]
  },
  "numbers": {
    "as_of": "2026-09-16T21:00:00.000Z",
    "stars": 475,
    "stars_unit": "GitHub stars",
    "stars_checked_at": "2026-09-15T19:34:39.028Z",
    "stars_observed_since_check": 0,
    "star_delta_24h": null,
    "star_delta_7d": null,
    "star_delta_30d": null,
    "star_delta_unit": "GitHub stars gained in the window, GH Archive events summed to as_of",
    "spark_14d": [
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null
    ],
    "hf_likes": null,
    "hf_likes_observed_at": null,
    "hn_points": 124,
    "hn_points_observed_at": "2026-09-13T15:42:42.918Z",
    "store": null,
    "method": "Star total = the value last checked on GitHub (stars_checked_at) + increases observed via GH Archive since. The 24h · 7d · 30d gains are GH Archive hourly events summed to the reference time (as_of). No score of ours."
  },
  "ranks": null,
  "activity": {
    "pushed_at": "2026-08-24T01:08:30.000Z",
    "owner_type": "User",
    "open_issues": 2,
    "contributors": 4,
    "releases_count": 14,
    "latest_release": {
      "tag": "v1.7.0",
      "published_at": "2026-08-24T01:08:30.000Z",
      "prerelease": false
    },
    "checked_at": "2026-09-15T19:34:39.028Z",
    "core_checked_at": "2026-09-15T19:34:39.028Z"
  },
  "signals": [
    {
      "kind": "cross",
      "label": "CROSS-SIGNAL",
      "value": "Show HN + GitHub"
    },
    {
      "kind": "back",
      "label": "BACK CATALOG",
      "value": null
    }
  ],
  "images": {
    "og": "https://tesign.com/img/adrafinil-adfd4c6c66.png",
    "cover": "https://tesign.com/img/adrafinil-adfd4c6c66.png",
    "cover_width": 640,
    "cover_height": 558,
    "gallery": [
      "https://tesign.com/img/adrafinil-adfd4c6c66.png",
      "https://tesign.com/img/adrafinil-1f3a02c364.png",
      "https://tesign.com/img/adrafinil-fd7db1a4dc.png",
      "https://tesign.com/img/adrafinil-b98f8f0860.png"
    ],
    "alt": "Three states of the Adrafinil menu bar popover: awake while an agent works (Keep awake / Let it sleep controls), idle with normal sleep, and a hold duration picker from 15 minutes to indefinite",
    "tier": 2
  },
  "dates": {
    "first_seen_at": "2026-09-13T08:31:26.639Z",
    "source_created_at": "2026-06-27T20:34:53.000Z",
    "discovery_hours": 1859.9426775,
    "launch_signal_at": "2026-06-27T20:34:53.000Z",
    "kept_at": "2026-09-14T19:27:43.539Z",
    "first_published_at": "2026-09-14T19:27:43.735Z",
    "updated_at": "2026-09-15T07:17:01.025Z",
    "ingestion_mode": "backfill"
  },
  "notes": [
    "This file was produced by the same build, from the same data, as the tesign.com item page. The text is editorial; the numbers are stored observations.",
    "null in the JSON means not observed — never zero. The Markdown writes [unconfirmed] for it.",
    "Star total = the value last checked on GitHub (stars_checked_at) + increases observed via GH Archive since. The 24h · 7d · 30d gains are GH Archive hourly events summed to the reference time (as_of). No score of ours.",
    "Reconstructed from archive data, not a live discovery.",
    "A summary, not legal advice."
  ]
}
