Feature Request
Verification
Note: Similar requests exist (#8619 ui.statusLine hook, #18969 ui.footer hook). This issue consolidates and extends those ideas with a concrete proposed API for status bar widgets.
Summary
Allow plugins to register custom widgets in the TUI status bar area, enabling use cases like terminal pets, pomodoro timers, build status indicators, etc.
Motivation
OpenCode's plugin system is powerful for backend logic (event hooks, custom tools, env injection), but there is currently no way for plugins to render custom UI elements in the TUI.
A common use case is displaying persistent status information — for example:
- A terminal pet that reacts to coding activity
- Build/test status indicators
- Pomodoro/focus timers
- Custom metrics (lines written, commits today, etc.)
Proposed API
export const MyPlugin: Plugin = async (ctx) => {
return {
"tui.statusbar.widget": {
id: "my-widget",
position: "right",
render: () => "pet Lv.5 | streak: 7d",
interval: 5000,
},
}
}
Alternatives Considered
- Running a separate terminal program in a split pane (works but feels disconnected)
- Modifying OpenCode source directly (not maintainable)
Additional Context
The Bubble Tea framework (used by OpenCode's TUI) supports composable models, so this could potentially be implemented as a composable component in the status bar area.
Several users in the community have expressed interest in customizing the TUI appearance and adding persistent UI elements.
Feature Request
Verification
Summary
Allow plugins to register custom widgets in the TUI status bar area, enabling use cases like terminal pets, pomodoro timers, build status indicators, etc.
Motivation
OpenCode's plugin system is powerful for backend logic (event hooks, custom tools, env injection), but there is currently no way for plugins to render custom UI elements in the TUI.
A common use case is displaying persistent status information — for example:
Proposed API
Alternatives Considered
Additional Context
The Bubble Tea framework (used by OpenCode's TUI) supports composable models, so this could potentially be implemented as a composable component in the status bar area.
Several users in the community have expressed interest in customizing the TUI appearance and adding persistent UI elements.