@brianmichel/pi-awake
v0.1.0
Published
Pi extension package that keeps macOS awake while pi is actively working.
Maintainers
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
miseor your local toolchain
Repo layout
extensions/pi-awake/index.ts— extension entrypointextensions/pi-awake/platform.ts— platform-specific power inhibitionextensions/pi-awake/status.ts— pi status renderingextensions/pi-awake/types.ts— shared typespackage.json— pi package manifestmise.toml— local tooling tasks
Install dependencies
With mise
mise install
mise run installWith npm
npm installValidate
mise run checkor:
npm run checkTest
mise run testor:
npm testRun in pi
Load directly from this repo
pi -e .Install into pi
pi install .If pi is already running, use /reload.
Testing
- Start pi with the extension loaded.
- Give pi a task that takes a little time.
- Confirm the footer status appears while pi is active.
- Confirm the status disappears when pi becomes idle.
- Optionally verify
caffeinateis running from another terminal:
pgrep -fl caffeinateNotes
Pi loads TypeScript extensions directly, so there is no separate transpile step right now. build currently just runs the typecheck.
