Skip to content

[FEATURE]: Plugin API for custom status bar widgets #23539

Description

@excess122

Feature Request

Verification

  • I have searched existing issues and confirmed this feature hasn't been suggested before

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions