@johiny/opencode-ntfy-summaryOpenCode plugin that sends push notifications via ntfy.sh with a summary of what the agent just said when the session goes idle.
0
75
15 in 7 days
29.4
Multi-signal model
1 month ago
2026-07-05
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@johiny/opencode-ntfy-summary@0.1.6"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@johiny/opencode-ntfy-summary@0.1.6"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @johiny/opencode-ntfy-summaryopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Fork of Stephanvs/opencode-ntfy that adds an agent message summary to the ntfy notification when the OpenCode session goes idle.
Instead of getting a generic "Agent finished" notification, you get the first ~250 chars of what the agent actually said — so you can decide from your phone whether to come back to the PC or skip it.
What changed vs upstream
- New config block:
summary.enabled,summary.maxLength,summary.messageLimit - On
session.idle, the plugin callsclient.session.messages({ sessionID, limit })to fetch the last few messages, walks back to the most recent assistant message, strips code blocks / markdown noise, and prepends it to the ntfy body - Graceful fallback: if the summary fetch fails (network, auth, missing session), the notification falls back to the original "Agent finished" text
Installation
Add the plugin to your opencode.json (use a GitHub raw URL or local path until published):
{
"plugin": ["@johiny/opencode-ntfy-summary"]
}
For local development, point at the cloned path:
{
"plugin": ["/home/johiny/Code_Library/opencode-ntfy"]
}
Configuration
Create ~/.config/opencode/opencode-ntfy.json:
{
"topic": "my-opencode-alerts",
"server": "https://ntfy.sh",
"token": "tk_xxx",
"priority": 3,
"events": {
"idle": true,
"permission": true,
"error": true
},
"summary": {
"enabled": true,
"maxLength": 250,
"messageLimit": 5
}
}
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
topic |
string | required | The ntfy topic to publish to |
server |
string | https://ntfy.sh |
The ntfy server URL |
token |
string | null |
Bearer token for protected topics |
priority |
number (1-5) | 3 |
Default notification priority |
events.idle |
boolean | true |
Notify when agent finishes |
events.permission |
boolean | true |
Notify on permission requests |
events.error |
boolean | true |
Notify on session errors |
summary.enabled |
boolean | true |
Include agent-message summary on idle |
summary.maxLength |
number | 250 |
Max chars of the summary body |
summary.messageLimit |
number | 5 |
How many recent messages to scan backwards |
Example notification
Before (upstream):
Agent finished and needs input
/home/johiny/projects/myapp
After (this fork):
myapp: Refactored the auth middleware to use the new token format. I also
caught a bug in the rate limiter where requests were being double-counted
when the upstream returned 503. Tests pass for both cases. Ready for
review when you are — let me know if you want me to also update the
do...
/home/johiny/projects/myapp
Building from source
bun install
bun run build
Output goes to dist/.
Subscribing
Install the ntfy app (Android, iOS) and subscribe to your topic. Or open https://ntfy.sh/your-topic in a browser.
License
MIT (inherited from upstream).