npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@decade-qzj/opencode-message-notify

v0.1.2

Published

OpenCode plugin that sends detailed Agent messages and usage statistics to iOS via Bark app

Readme

opencode-message-notify

OpenCode plugin that sends detailed Agent messages and usage statistics to your iOS device via the Bark app.

Features

  • Real-time iOS notifications via Bark app - get notified anywhere
  • Detailed Agent message content - see exactly what your Agent is telling you, not just "task completed"
  • Usage statistics tracking - monitor cost, tokens, and cache usage
  • Permission request notifications - never miss a permission prompt
  • Zero dependencies - lightweight and fast

Installation

Add the plugin to your opencode.json or opencode.jsonc:

{
  "plugin": ["@decade-qzj/opencode-message-notify@latest"]
}

Using @latest ensures you always get the newest version when the cache is refreshed.

To pin a specific version:

{
  "plugin": ["@decade-qzj/[email protected]"]
}

Restart OpenCode. The plugin will be automatically installed and loaded.

Updating

OpenCode caches plugins in ~/.cache/opencode. Plugins are not auto-updated; you need to clear the cache to get new versions.

If you use @latest

Clear the cache and restart OpenCode:

Linux/macOS:

rm -rf ~/.cache/opencode/node_modules/@decade-qzj/opencode-message-notify

Windows (PowerShell):

Remove-Item -Recurse -Force "$env:USERPROFILE\.cache\opencode\node_modules\@decade-qzj\opencode-message-notify"

Then restart OpenCode - it will download the latest version automatically.

If you use a pinned version (e.g., @0.1.0)

  1. Update the version in your opencode.json:

    {
      "plugin": ["@decade-qzj/[email protected]"]
    }
  2. Clear the cache (see commands above)

  3. Restart OpenCode

Check installed version

Linux/macOS:

cat ~/.cache/opencode/node_modules/@decade-qzj/opencode-message-notify/package.json | grep version

Windows (PowerShell):

Get-Content "$env:USERPROFILE\.cache\opencode\node_modules\@decade-qzj\opencode-message-notify\package.json" | Select-String "version"

Setup Bark App

  1. Download Bark from the App Store
  2. Register for a free account
  3. Copy your device token from the app
  4. Configure the plugin (see below)

Configuration

Environment Variable (Recommended)

Set the DAY_APP_TOKEN environment variable in your shell profile:

# Add to your ~/.zshrc or ~/.bashrc
export DAY_APP_TOKEN="your_bark_device_token"

Config File

Create ~/.config/opencode/opencode-notify.json:

{
  "token": "your_bark_device_token",
  "title": "OpenCode",
  "notifyOnComplete": true,
  "notifyOnPermission": true,
  "includeUsageStats": true,
  "includeMessageContent": true
}

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | token | string | (env) | Bark device token | | title | string | "OpenCode" | Notification title prefix | | notifyOnComplete | boolean | true | Send notification on session completion | | notifyOnPermission | boolean | true | Send notification for permission requests | | includeUsageStats | boolean | true | Include cost and token statistics | | includeMessageContent | boolean | true | Include Agent's actual message content |

How It Works

Message Content

Unlike other plugins that just notify "task completed", this plugin captures and sends the actual Agent message content. You'll see:

  • What the Agent was working on
  • The final result or summary
  • Any important notes or next steps

Usage Statistics

The plugin tracks and reports:

  • Cost - API cost in USD
  • Tokens - Input, Output, Reasoning breakdown
  • Cache - Cache Read/Write statistics

Example notification:

I've analyzed the codebase and found 3 potential areas for optimization:

💰 Cost: 0.0235
🧮 Tokens
  - Input: 15,420
  - Output: 3,280
  - Reasoning: 8,150
💾 Cache
  - Read: 2,100
  - Write: 450

Platform Notes

This plugin works on all platforms that OpenCode supports:

  • macOS - No additional setup required
  • Linux - No additional setup required
  • Windows - No additional setup required

The only requirement is having the Bark app configured on your iOS device.

Troubleshooting

Notifications not appearing on iOS

  1. Verify your Bark token - Make sure it's correct in your config
  2. Check Bark app - Test with a manual notification in the Bark app
  3. Clear the cache - Remove the plugin from cache and restart OpenCode

Testing the plugin

Send a test notification manually using curl:

curl "https://api.day.app/YOUR_TOKEN/Test/Hello%20World"

Plugin not loading

  1. Check your opencode.json syntax
  2. Verify the plugin name is correct
  3. Clear the cache and restart OpenCode

Development

Building

npm run build

Type checking

npm run typecheck

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Support

If you have any questions or issues, please open a GitHub issue.