Skip to content

thisisryanswift/opencode-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

OpenCode Notifier Plugin

A cross-platform notification plugin for OpenCode that alerts you when an agent finishes a task.

Features

  • Cross-Platform: Works on macOS, Linux (including WSL), and Windows.
  • Smart Summaries: Extracts the first 5 words of the agent's completion message so you know what finished.
  • Zero Config: Just install and it works.

Installation

  1. Create the plugin directory if it doesn't exist:

    mkdir -p ~/.config/opencode/plugin
  2. Copy the index.ts file to your plugin folder:

    cp index.ts ~/.config/opencode/plugin/notify.ts
  3. Restart OpenCode.

How it Works

The plugin listens for the session.idle event, which triggers whenever the AI agent finishes generating a response and is waiting for user input. It then:

  1. Fetches the last message from the session history.
  2. Cleans up the text (removes code blocks, markdown).
  3. Truncates it to a short summary.
  4. Sends a native system notification.

Requirements

  • Linux: notify-send (usually installed by default on Ubuntu/Debian via libnotify-bin).
  • Windows: PowerShell (optional: BurntToast module for better notifications).
  • macOS: No extra requirements.

License

MIT License. Feel free to modify and distribute as you see fit.

About

Simple plugin for OpenCode notifications across platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published