@brianmichel/pi-awake

Pi extension package that keeps macOS awake while pi is actively working.

Packages

Package details

extension

Install @brianmichel/pi-awake from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@brianmichel/pi-awake
Package
@brianmichel/pi-awake
Version
0.1.0
Published
May 12, 2026
Downloads
26/mo · 5/wk
Author
brianmichel
License
unknown
Types
extension
Size
6.5 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/pi-awake/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-awake

pi-awake is a pi extension that keeps your machine awake while pi is actively working.

On macOS it runs caffeinate during active agent work and stops it again when pi goes idle.

Features

  • starts automatically when pi begins working
  • stops automatically when work finishes
  • shows a compact footer status while active
  • uses a built-in default configuration
  • structured so Linux and Windows support can be added later

Requirements

  • macOS for the current implementation
  • pi
  • Node.js via mise or your local toolchain

Repo layout

  • extensions/pi-awake/index.ts — extension entrypoint
  • extensions/pi-awake/platform.ts — platform-specific power inhibition
  • extensions/pi-awake/status.ts — pi status rendering
  • extensions/pi-awake/types.ts — shared types
  • package.json — pi package manifest
  • mise.toml — local tooling tasks

Install dependencies

With mise

mise install
mise run install

With npm

npm install

Validate

mise run check

or:

npm run check

Test

mise run test

or:

npm test

Run in pi

Load directly from this repo

pi -e .

Install into pi

pi install .

If pi is already running, use /reload.

Testing

  1. Start pi with the extension loaded.
  2. Give pi a task that takes a little time.
  3. Confirm the footer status appears while pi is active.
  4. Confirm the status disappears when pi becomes idle.
  5. Optionally verify caffeinate is running from another terminal:
pgrep -fl caffeinate

Notes

Pi loads TypeScript extensions directly, so there is no separate transpile step right now. build currently just runs the typecheck.