Sidebar plugins for the OpenCode TUI: a live system monitor, OpenCode Go usage limits, tab/sidebar frames, and panels for subagents and shells.
No dependencies, no build step. OpenCode compiles the TSX plugins itself.
The │ separators between tabs and the frames around sidebar titles come from the chrome plugin.
The second GPU row is an integrated GPU. It appears only while the APU is not in runtime suspend, so a dGPU-only machine shows a single row. In PWR the third number is the iGPU package power.
| Directory | Plugin id | What it draws |
|---|---|---|
plugins/panel |
user.panel |
System (CPU, RAM/swap, GPU, iGPU, power, network), Cache (off by default), Agents (child sessions, click to open), Shells (click to toggle the terminal) |
plugins/chrome |
user.chrome |
Tab separators, a frame around the sidebar title, and colored frames for sections that register an accent |
plugins/limits |
user.limits |
OpenCode Go allowance (5h / week / month) in the sidebar, plus a Limits · wk 42% badge in the footer when the terminal is narrow |
Section order in the sidebar follows the directory name: chrome → limits → panel.
- Linux. The panel reads
/proc/stat,/proc/meminfo,/sys/class/hwmon,/sys/class/drm,/sys/class/netand/sys/class/powercap. - A TUI OpenCode release with sidebar slots. Tested with 2.3.2.
- AMD GPU telemetry (busy %, VRAM, temperature, power) comes from the
amdgpudriver. Other vendors are not handled yet. limitsneeds OpenCode Go credentials in the credential store. Without them the block showsnot signed in.
git clone https://github.com/YaBulochka/opencode-sidebar.git
cp -r opencode-sidebar/plugins/* ~/.config/opencode/plugins/Restart OpenCode. Plugins are loaded when the TUI client starts.
For development, symlink instead of copying (remove an existing copy first):
ln -s "$(pwd)/opencode-sidebar/plugins/panel" ~/.config/opencode/plugins/panelPanel sections are toggled at the top of plugins/panel/tui.tsx:
const SECTIONS = {
system: true,
cache: false,
agents: true,
shells: true,
}The Cache block is disabled by default: it reports hit rate, cache reads/writes, cost and tokens per second for the current session.
- CPU —
cpuline in/proc/statbetween samples, temperature fromk10temp. - RAM / swap —
MemTotal,MemAvailable,SwapTotal,SwapFree. - GPU / iGPU — one DRM card per GPU from
/sys/class/drm, matched to its ownhwmonby PCI device so twoamdgpusensors never get mixed up. The integrated GPU is detected by the missingmem_info_vram_vendor: APUs borrow system RAM, so their memory is reported through GTT instead of VRAM. - PWR — package energy from RAPL (
/sys/class/powercap) for the CPU,power1_average(orpower1_input) for the GPUs. - NET — summed
rx_bytes/tx_bytesover physical interfaces, excluding loopback, container and VPN devices.
The TUI plugin surface is not stable. These plugins use the host alias @opencode/plugin/tui, context.renderer.postProcessFns (chrome) and @opentui/* primitives, so a future OpenCode release may break them. Pin or vendor the versions you rely on.
chrome reaches into the rendered tree to find the tab strip and the sidebar frame. It is a post-process pass over the frame buffer, not an official layout API; a host layout change can make it draw nothing or draw in the wrong place.
MIT
