opencode-terminal-bell-notifierZero-dependency OpenCode plugin that sends desktop notifications via OSC 9 terminal escape sequences
5
1,741
344 in 7 days
38.3
Multi-signal model
4 months ago
2026-03-24
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": ["opencode-terminal-bell-notifier@0.2.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-terminal-bell-notifier@0.2.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-terminal-bell-notifieropencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Zero-dependency OpenCode plugin that sends desktop notifications using OSC 9 terminal escape sequences.
No osascript, no notify-send, no external binaries, no npm dependencies. Just a single escape sequence written to stdout that your terminal emulator interprets as a notification.
Install
Add to your opencode.json:
{
"plugin": ["opencode-terminal-bell-notifier@latest"]
}
Restart OpenCode.
What it does
Sends a terminal notification when:
- The agent finishes a task
- The agent asks a question
- Permission is requested
- An error occurs
How it works
The plugin writes an OSC 9 escape sequence directly to stdout:
\x1b]9;<message>\x07
Terminal emulators that support OSC 9 (Ghostty, iTerm2, kitty, foot, Windows Terminal, Warp) display this as a native desktop notification. Terminals without OSC 9 support still fire the trailing BEL byte (\x07) as an audible or visual bell.
How it differs from other notification plugins
Most notification plugins shell out to platform-specific tools (osascript on macOS, notify-send on Linux) or pull in npm packages like node-notifier. This plugin does none of that:
- No runtime dependencies
- No child processes
- No platform detection
- No permission prompts except native OS notifications permission
- Works on any OS as long as the terminal supports OSC 9 or BEL
The tradeoff is that notifications are handled entirely by the terminal emulator, so behavior (sound, badge, banner) depends on your terminal's settings.
If your terminal is in the foreground, it may or may not suppress the notification. Check your terminal's documentation for notification configuration options.
Terminal support
| Terminal | OSC 9 notifications | BEL fallback |
|---|---|---|
| Ghostty | ✅ | ✅ |
| iTerm2 | ✅ | ✅ |
| kitty | ✅ | ✅ |
| foot | ✅ | ✅ |
| Windows Terminal | ✅ | ✅ |
| WezTerm | ✅ | ✅ |
| Warp | ✅ | ✅ |
| Terminal.app | ❌ | ✅ |
| Alacritty | ❌ | ⚠️ visual only |
| GNOME Terminal / VTE | ❌ | ⚠️ audio only |
| Konsole | ❌ | ✅ |
| xfce4-terminal | ❌ | ✅ |
| urxvt | ❌ | ✅ |
| ConEmu | ❌ | ✅ |
| mintty | ❌ | ✅ |
| Tabby | ❌ | ⚠️ buggy |
License
MIT