A collection of plugins for opencode, providing composable utilities for plugin composition, debugging, and notifications.
This monorepo contains three opencode plugins:
Compose multiple opencode plugins into a single plugin that runs all hooks in sequence.
import { compose } from "opencode-plugin-compose";
const composedPlugin = compose([pluginA, pluginB, pluginC]);
Features:
- Sequentially executes all plugin hooks (event, chat.message, chat.params, permission.ask, tool.execute.before/after)
- Maintains hook execution order
Real-time web interface for debugging and monitoring plugin hook events.
import { inspector } from "opencode-plugin-inspector";
const inspectorPlugin = inspector({ port: 6969 }); // port optional, defaults to 6969
Features:
- Web UI accessible at
http://localhost:6969
- Built with React and Tailwind CSS
Desktop notifications for session idle events with customizable commands and timing.
import { notification } from "opencode-plugin-notification";
const notificationPlugin = notification({
idleTime: 60000, // 1 minute (default)
notificationCommand: ["notify-send", "--app-name", "opencode"], // default
additionalCommands: [["canberra-gtk-play", "-i", "complete"]], // default
getMessage: async ({ sessionID, client }) => {
// Custom message logic
return "Custom notification message";
},
});
Features:
- Configurable idle time threshold
- Custom notification commands (defaults to
notify-send
) - Optional sound commands
Install individual packages:
npm install opencode-plugin-compose
npm install opencode-plugin-inspector
npm install opencode-plugin-notification
I would recommend installing as optional dependency
This project uses Turborepo for monorepo management and pnpm for package management.
- Node.js 18+
- pnpm 8+
- Bun (for inspector package)
# Install dependencies
pnpm install
# Build all packages
pnpm run build
# Start development mode (watches for changes)
pnpm run dev
# Work on a specific package
cd packages/compose
pnpm run dev
pnpm run build
- Build all packagespnpm run dev
- Start development mode for all packagespnpm run lint
- Lint the codebasepnpm run typecheck
- Run TypeScript type checking
If you find this project useful, consider supporting via Ko-fi.