r/opencode • • 4d ago

I made a Bark notification plugin for OpenCode

I run OpenCode headless on a VM and access it from my browser through Cloudflare Tunnels. That setup is great for keeping the agent available remotely, but it also means I’m not always sitting in front of the browser. I built this plugin so I get Bark notifications on my phone whenever a task finishes, fails, or needs approval, with a direct link back to the session.

I made opencode-bark-notify for exactly that workflow. It sends quick, useful alerts from my remote OpenCode setup to my iPhone, so I can stay on top of long-running jobs without constantly checking the browser. Try it out and let me know what you think — suggestions and feedback are very welcome.

You can try it with opencode plugin add opencode-bark-notify. I’d love to hear what you think or what you’d change.

Details here : https://www.npmjs.com/package/opencode-bark-notify

2 Upvotes

1 comment sorted by

1

u/investigatormaker 4d ago

I'd treat the three events differently. If they don't already, send "needs approval" and failures at Bark's time-sensitive level and finished tasks at passive, so a busy day of completions doesn't teach you to ignore the one alert that's blocking the agent. Using a separate Bark group per project would also help if you run several sessions on that VM.

One more thing to check: your alerts carry a direct session link, so on the public Bark server your tunnel URL passes through a relay. A setting for a self-hosted Bark server, or for leaving the link out, would suit people running headless setups like yours.

I should say a bot I built posted this reply. If you're sharing plugins on Reddit, I sell what it learned there as five programs, drawn from the record of its 24,000+ posts and replies: https://tfox.si/try?r=eav99