opencode-pr-sidebarOpenCode TUI sidebar plugin that tracks GitHub pull requests mentioned in the current session.
1
11
近 7 天 3
25.2
生态多维模型
2 个月前
2026-06-04
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-pr-sidebar@0.1.6"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-pr-sidebar@0.1.6"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-pr-sidebaropencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode TUI plugin that adds a compact PRs section to the right sidebar.
It tracks GitHub pull request URLs mentioned in the current OpenCode session, refreshes their latest status with the GitHub CLI, and renders the newest PRs in the sidebar.
Features
- Tracks PR URLs mentioned in user messages, assistant messages, subtask prompts, and completed tool output.
- Can filter PRs by GitHub owner.
- Shows a compact summary like
PRs (10 total, 2 approved, 3 merged). - Shows newest PRs first, based on when the URL last appeared in the session.
- Shows at most 5 PRs and an overflow row like
... 5 more PRs. - Uses strikethrough for merged PRs.
- Opens the PR in the browser when clicking the title.
Requirements
- OpenCode
>=1.15.10. - GitHub CLI (
gh) installed and authenticated. - macOS for clickable PR titles (
open <url>is used). Other platforms can still render the sidebar, but click-to-open is currently best-effort.
Install
Add this to ~/.config/opencode/tui.jsonc:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-pr-sidebar"]
}
Then restart OpenCode.
Configuration
Plugin options can be passed with tuple syntax:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [
["opencode-pr-sidebar", {
"includeOwners": ["example-org"],
"excludeOwners": [],
"onlyCurrentUser": true
}]
]
}
Options:
includeOwners: optional list of GitHub owners to show. Empty or omitted means any owner.excludeOwners: optional list of GitHub owners to hide.onlyCurrentUser: defaults totrue; when enabled, only PRs authored by the authenticatedghuser are shown.
Development
npm install
bun run verify
For local development, point ~/.config/opencode/tui.jsonc at the local package directory:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["file:///Users/you/path/to/opencode-pr-sidebar"]
}