@goodnesshq/opencode-notification
v0.5.1
Published
Per-repo notification plugin for OpenCode with macOS, ntfy, and Telegram delivery.
Maintainers
Readme
OpenCode Notifications
This repo implements a per-repo notification plugin for OpenCode. It stores per-repo settings and channel credentials in a global config file (~/.config/opencode/oc-notify.json) and sends notifications to macOS Notification Center, ntfy, and Telegram.
Quick Start
- One-command setup (recommended):
npx @goodnesshq/opencode-notification setupThis will:
- Copy the plugin to
~/.config/opencode/plugins/opencode-notifications.mjs - Update
~/.config/opencode/opencode.json - Run the repo installer in the current repo
- Configure a repo entry (other repos)
npx @goodnesshq/opencode-notification configure --repo /path/to/repoThis runs the installer in that repo context without copying any files into it.
- Optional: legacy repo-only install (advanced)
npx @goodnesshq/opencode-notification installThis only installs repo assets and prints next steps for manual setup.
Before running the installer, create a unique ntfy topic and set up mobile notifications. See docs/ntfy-topic.md.
If you plan to use Telegram, see docs/telegram-chat-id.md for how to find your chat ID.
The installer uses an interactive, arrow-key prompt flow (with a non-interactive fallback in non-TTY environments).
Config
The per-repo config entry supports:
enabled: master switchtitle: override or template (supports{repo}and{branch})tier:focus|full|customdetailLevel:full|title-onlyresponseComplete:{ enabled, trigger }for completion notifications (defaults: enabled for focus/full/custom, triggersession.idle)mutedSubagents: subagent names to suppress (matches(@name subagent)in subtitle/body)channels:mac,telegram, andntfysettings (Telegram and ntfy reference global profiles)dedupe: in-memory TTL settings
Tier Defaults
- focus:
action_requiredplus response-complete (default:session.idle) - full:
action_required,failures,change_summary,session_lifecycle
Example Configs
Global Config Structure
{
"repos": {
"/path/to/repo": {
"enabled": true,
"tier": "focus",
"detailLevel": "title-only",
"responseComplete": { "enabled": true, "trigger": "session.idle" },
"mutedSubagents": ["explore"],
"channels": {
"mac": { "enabled": true, "method": "auto" },
"telegram": { "enabled": true, "profile": "work" },
"ntfy": { "enabled": true, "profile": "work" }
}
}
},
"telegram": {
"defaultProfile": "work",
"profiles": {
"work": { "token": "...", "chatId": "..." }
}
},
"ntfy": {
"defaultProfile": "work",
"profiles": {
"work": { "server": "https://ntfy.sh", "topic": "<your-topic>" }
}
}
}Focus (per-repo entry)
{
"enabled": true,
"tier": "focus",
"detailLevel": "title-only",
"responseComplete": {
"enabled": true,
"trigger": "session.idle"
},
"mutedSubagents": ["explore"],
"channels": {
"mac": { "enabled": true, "method": "auto" },
"telegram": { "enabled": true, "profile": "work" },
"ntfy": { "enabled": true, "profile": "work" }
}
}Full (per-repo entry)
{
"enabled": true,
"tier": "full",
"detailLevel": "title-only",
"responseComplete": {
"enabled": true,
"trigger": "session.idle"
}
}Custom (per-repo entry)
{
"enabled": true,
"tier": "custom",
"responseComplete": {
"enabled": true,
"trigger": "message.part.updated"
}
}Migration from legacy tiers
Legacy tiers minimal, standard, and verbose are no longer supported. Update existing configs before notifications resume:
minimal->customstandard->fullverbose->custom
