OpenCode plugin that sends push notifications via ntfy.sh when the agent needs input, requests permission, or encounters errors.
Add the plugin to your opencode.json or opencode.jsonc:
{
"plugin": ["opencode-ntfy"]
}Create a configuration file at ~/.config/opencode/opencode-ntfy.json:
{
"topic": "my-opencode-alerts"
}| Option | Type | Default | Description |
|---|---|---|---|
topic |
string | required | The ntfy topic to publish to |
server |
string | https://ntfy.sh |
The ntfy server URL (for self-hosted instances) |
token |
string | null |
Access token for authentication |
priority |
number (1-5) | 3 |
Default notification priority |
events.idle |
boolean | true |
Notify when agent finishes and needs input |
events.permission |
boolean | true |
Notify when permission is requested |
events.error |
boolean | true |
Notify on session errors |
{
"topic": "my-opencode-alerts",
"server": "https://ntfy.sh",
"token": "tk_xxx",
"priority": 3,
"events": {
"idle": true,
"permission": true,
"error": true
}
}- Install the ntfy app on your phone (Android, iOS)
- Subscribe to your topic (e.g.,
my-opencode-alerts) - You'll receive push notifications when OpenCode events occur
You can also subscribe via the web at https://ntfy.sh/your-topic.
If you're running your own ntfy server, set the server option:
{
"topic": "opencode",
"server": "https://ntfy.example.com"
}For protected topics, add your access token:
{
"topic": "private-alerts",
"token": "tk_your_access_token"
}MIT