opencode-history-fulltext-searchopencode TUI plugin for full-text search over session history
0
29
近 7 天 6
27.1
生态多维模型
1 个月前
2026-07-09
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-history-fulltext-search@0.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-history-fulltext-search@0.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-history-fulltext-searchopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

A opencode TUI plugin that adds full-text search over your session history to the command palette. Search across session titles and message content, with two scopes: the current directory, or everywhere.
⚠️ Experimental. This plugin is in the testing phase and reads a large local SQLite database on every search, which may slow down opencode.
Features
- Full-text search across
session.title+ message content. - Two scopes:
Search history — This dir(current directory) orSearch history — Anywhere(all sessions). - Live filtering with the match highlighted and centered in a single-line snippet.
- Noise filtering — indexes only
text/reasoningparts, ignoring tool I/O, step markers, patches and other operational noise. - Cross-dir resume — selecting a session from another directory copies the exact resume command (
cd '<dir>' && opencode --session <id>) to the clipboard instead of switching context.
Install
Add one line to ~/.config/opencode/tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-history-fulltext-search"]
}
Or via the CLI (patches the config for you):
opencode plugin opencode-history-fulltext-search
Then restart opencode — the package and its dependencies are installed automatically.
Not published to npm yet? Install directly from GitHub:
{ "plugin": ["opencode-history-fulltext-search@github:forstjiri/opencode-history-fulltext-search"] }
Usage
- Open the command palette (
Ctrl+P). - Run Search history — This dir or Search history — Anywhere.
- Type to filter;
Enterto open the session (This dir) or copy the resume command (Anywhere);Escto close.
How it works
- Reads
~/.local/share/opencode/opencode.dbread-only (WAL-safe). - Content filter: only
part.data.typeoftextorreasoning, excludingsyntheticrows — drops ~70% of rows that are pure operational noise. - Clipboard tool is auto-detected (
wl-copy→xclip→xsel).
License
MIT — see LICENSE.