Push ntfy.sh notifications for OpenCode events.
Sends push notifications to your phone when OpenCode completes a session, errors, asks questions, or needs permission. Supports bidirectional remote messaging via per-session reply topics.
// opencode.json
{
"plugin": ["file:///path/to/opencode-ntfy/.opencode/plugins/ntfy.ts"]
}Or copy ntfy.ts to ~/.config/opencode/plugins/.
// ~/.config/opencode/ntfy-config.json
{
"serverUrl": "https://ntfy.sh",
"topic": "your-unique-topic",
"notifyOnIdle": true,
"notifyOnError": true,
"notifyOnQuestion": true
}- Install the ntfy app on your phone
- Subscribe to your topic
- Restart OpenCode
| Event | Title | Description |
|---|---|---|
| Session complete | Session done | Session became idle |
| Session error | Session error | Session encountered an error |
| Question asked | Question for you | AI is waiting for input |
| Permission asked | Permission needed | AI needs approval |
Each session gets a unique reply topic. When a session completes, the notification includes a reply URL. Post a message there to inject it back into the session:
curl -d "your message" https://ntfy.sh/<reply-topic>The plugin polls reply topics every 10 seconds and forwards messages via client.session.prompt().
| Key | Default | Description |
|---|---|---|
| serverUrl | https://ntfy.sh | ntfy server |
| topic | (required) | Notification topic |
| auth | "" | Basic auth for ntfy |
| notifyOnIdle | true | Notify on session complete |
| notifyOnError | true | Notify on session error |
| notifyOnQuestion | true | Notify on questions |
| subscribe.enabled | false | Enable reply polling |
~/.config/opencode/
plugins/ntfy.ts # plugin
ntfy-config.json # config (not in repo)