@ratteeth1/opencode-session-managerOpenCode plugin for querying and managing session history
0
47
近 7 天 6
25.4
生态多维模型
3 个月前
2026-05-16
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@ratteeth1/opencode-session-manager@0.1.5"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@ratteeth1/opencode-session-manager@0.1.5"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @ratteeth1/opencode-session-manageropencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode plugin for querying, reading, summarizing, and opening local OpenCode session history.
Features
- List sessions as a table or JSON.
- Summarize a session with message counts and the latest prompt/response.
- Read session messages with optional tool/message parts.
- Ask a running OpenCode TUI to open a specific session.
Installation
Install as a remote OpenCode plugin after the package is published to npm:
opencode plugin @ratteeth1/opencode-session-manager@latest
For global installation:
opencode plugin @ratteeth1/opencode-session-manager@latest --global
OpenCode resolves the plugin through the package ./server export.
Tools
session_list
Lists sessions from the current OpenCode instance.
Arguments:
format:"table"or"json"limit: maximum number of sessionssearch: optional title/id search string
session_summary
Summarizes one session.
Arguments:
sessionID: OpenCode session id such asses_...maxMessages: maximum number of messages to inspect
session_read
Reads one session.
Arguments:
sessionID: OpenCode session id such asses_...limit: maximum number of messages to renderincludeParts: include message/tool parts when available
session_open
Requests the current OpenCode TUI to select a session.
Arguments:
sessionID: OpenCode session id such asses_...
License
MIT