Sidebar Context
OpenCode plugin that shows context usage, cache hit rate and cost in the sidebar
0
0
20.0
Multi-signal model
6 days ago
2026-10-14
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tomdewildt/opencode-sidebar-context@0.1.1"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tomdewildt/opencode-sidebar-context@0.1.1"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @tomdewildt/opencode-sidebar-contextOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Plugin for OpenCode that shows the context usage, cache hit rate and cost of the current session in the sidebar.
How To Run
Prerequisites:
- mise version
2025.1.0or later - bun version
1.4.0or later - opencode version
2.0.0or later
Development
- Run
mise run initto initialize the environment. - Run
mise run testto run the tests. - Run
mise run buildto bundle the plugin intodist/.
How To Use
Add the plugin to ~/.config/opencode/cli.json and disable the built-in context section:
{
"$schema": "https://opencode.ai/v2/cli.json",
"plugins": ["@tomdewildt/opencode-sidebar-context", "-opencode.sidebar.context"]
}
References
Similar plugins
Sidebar Usage
@tomdewildt/opencode-sidebar-usage
OpenCode plugin that shows Anthropic, GitHub Copilot and OpenAI usage limits in the sidebar
Permission Reviewer
opencode-permission-reviewer
Policy-aware permission reviewer for OpenCode V1 and V2
Docker Panel
opencode-docker-panel
Docker container panel for the OpenCode 2 TUI sidebar