opencode-pushover
v1.0.3
Published
Pushover notifications for OpenCode
Readme
OpenCode Pushover Plugin
A plugin for OpenCode that sends Pushover notifications when your coding sessions become idle.
Features
- Send notifications via Pushover when OpenCode sessions go idle
- Customizable message, title, and priority
- Support for attachments (images and files)
- Configurable notification sounds and devices
- HTML message support
- URL attachments with custom titles
Installation
Install the plugin via npm:
npm install opencode-pushoverAdd the plugin to your OpenCode configuration.
Configuration
You can configure the plugin in several ways, in order of precedence (later sources override earlier ones):
- Default configuration in
opencode-pushover.jsonin the plugin directory - User configuration in
~/.config/opencode/opencode-pushover.json - Environment variables in
~/.config/opencode/.env
Environment Variables
Set your Pushover credentials in one of the following ways:
Option 1: Global .env file
Create or add to ~/.config/opencode/.env:
PUSHOVER_USER=your_user_key
PUSHOVER_TOKEN=your_app_tokenOption 2: User config file
Add to ~/.config/opencode/opencode-pushover.json:
{
"PUSHOVER_USER": "your_user_key",
"PUSHOVER_TOKEN": "your_app_token",
"message": "OpenCode has finished!",
"title": "OpenCode Session Complete",
"priority": 0
}Optional Configuration
Configure notifications by editing ~/.config/opencode/opencode-pushover.json:
{
"PUSHOVER_USER": "your_user_key",
"PUSHOVER_TOKEN": "your_app_token",
"message": "OpenCode has finished!",
"title": "OpenCode Session Complete",
"priority": 0,
"sound": "spacealarm",
"html": 0,
"device": null,
"attachment": null,
"attachment_base64": null,
"attachment_type": null,
"timestamp": null,
"ttl": null,
"url": null,
"url_title": null
}Configuration Options
message: Notification message (default: "OpenCode has finished!")title: Notification titlepriority: Message priority (-2 to 2, default: 0)sound: Notification sound (see Pushover docs for options)html: Enable HTML formatting (1 for enabled, 0 for disabled)device: Target specific deviceattachment: Path to attachment fileattachment_base64: Base64-encoded attachment dataattachment_type: MIME type for base64 attachmenttimestamp: Unix timestamp for messagettl: Message time-to-live in secondsurl: URL to include with messageurl_title: Title for the URL
Supported Attachment Types
The plugin automatically detects MIME types for common image formats:
.jpg,.jpeg→image/jpeg.png→image/png.gif→image/gif.webp→image/webp.bmp→image/bmp
For other file types, specify attachment_type in the configuration.
Usage
Once configured, the plugin will automatically send Pushover notifications whenever an OpenCode session becomes idle.
License
ISC
