back to projects

opencode-tmux-alert

published npm plugin for OpenCode: raises a tmux status-bar alert when the agent finishes, needs permission, or asks a question, and clears it when you respond. built on the OpenCode plugin API, runs standalone.

opencode-tmux-alert

stack

TypeScriptTypeScriptBunBuntmuxtmux

about

opencode-tmux-alert is an OpenCode plugin i developed, published to npm. it hooks the agent’s lifecycle events (session idle, permission requests, pending tool approvals, and prompt questions) and raises a tmux alert: it sets a user option (@opencode-alert) for the status line and rings the bell, so a standard config notifies out of the box, submitting a message clears the alert. the two scripts (alert and clear) are overridable through environment variables, so it can run on its own bundled scripts or drive an existing setup, which is how i run it in my dotfiles. installs with one line and disables itself gracefully outside tmux.

features

  • written against the OpenCode TypeScript plugin API, hooking session.idle, permission.updated, message.part.updated, and tui.prompt.append
  • status-bar alerts on agent events: task complete, permission requested, tool pending approval, and questions
  • sets the @opencode-alert tmux user option and rings the bell, so a standard monitor-bell config notifies out of the box
  • auto-clears the alert when you respond
  • alert and clear scripts overridable via env vars, so it drives its own bundled scripts or an existing alert system
  • published to npm (TypeScript + Bun); one-line install, disables itself gracefully outside tmux