@rbright/pi-notify-koko

Koko voice notifications for Pi agent turn completion.

Package details

extension

Install @rbright/pi-notify-koko from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@rbright/pi-notify-koko
Package
@rbright/pi-notify-koko
Version
0.1.2
Published
Feb 19, 2026
Downloads
16/mo · 7/wk
Author
rbright
License
MIT
Types
extension
Size
14.7 KB
Dependencies
1 dependency · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

pi-notify-koko

CI

pi-notify-koko triggers Koko voice playback when the Pi agent completes a turn.

Install into Pi (npm, recommended)

Global install:

pi install npm:@rbright/pi-notify-koko

Project-local install:

pi install -l npm:@rbright/pi-notify-koko

Git install fallback:

pi install git:github.com/rbright/pi-notify-koko
pi install -l git:github.com/rbright/pi-notify-koko

If Pi is already running, reload extensions:

/reload

How it works

The extension is zero-config by default.

  • completion trigger: final assistant message_end (non-tool) with agent_end fallback
  • per-agent dedupe: one Koko invocation per completed agent run
  • speaks the last assistant response text (sanitized, no truncation)
  • strips markdown/link formatting, wrapper symbols, and emojis before speaking
  • if no assistant response text is available, it says nothing
  • skips non-TTY sessions by default

Configuration (optional)

Variable Default Description
PI_NOTIFY_KOKO_ENABLED true Enable/disable notifications
PI_NOTIFY_KOKO_COMMAND koko Koko executable name/path
PI_NOTIFY_KOKO_TIMEOUT_MS 15000 Subprocess timeout in ms
PI_NOTIFY_KOKO_ALLOW_NON_TTY false Allow triggering in non-TTY contexts
PI_NOTIFY_KOKO_VOICE unset Passed as --voice <value>
PI_NOTIFY_KOKO_MODEL_DIR unset Passed as --model-dir <value>
PI_NOTIFY_KOKO_NO_PLAY false Adds --no-play
PI_NOTIFY_KOKO_ARGS_JSON unset JSON array of extra args (e.g. ["--device","cpu"])

Example:

export PI_NOTIFY_KOKO_VOICE=af_heart
pi

Troubleshooting

  1. Confirm extension install: pi list
  2. If Pi was open during install/update, run /reload
  3. Confirm Koko is on PATH: command -v koko
  4. Run a short prompt and wait for completion
  5. If no sound but command works, test Koko directly (for example: koko "test")

Development

just deps
just lint
just typecheck
just test
just check
just precommit-install
just precommit-run

Run extension directly during local development:

bun install
pi --no-extensions -e ./src/index.ts

Publishing

Manual publish (@rbright/pi-notify-koko):

bun run check
npm publish --access public

Automated publish via GitHub Actions (.github/workflows/publish.yml) runs on:

  • workflow_dispatch
  • tag pushes matching v*

Required repository secret:

  • NPM_TOKEN (npm token with publish permission)