Skip to content
    ↑↓ select↵ openesc close
    English中文
    forstjiri

    History Fulltext Search

    v0.1.0UI & Themes
    opencode-history-fulltext-search

    opencode TUI plugin for full-text search over session history

    GitHub stars

    0

    Monthly installs

    29

    6 in 7 days

    Composite scoreSCORE

    27.1

    Multi-signal model

    Last commit

    1 month ago

    2026-07-09

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-history-fulltext-search@0.1.0"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    Search history dialog

    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) or Search history — Anywhere (all sessions).
    • Live filtering with the match highlighted and centered in a single-line snippet.
    • Noise filtering — indexes only text/reasoning parts, 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

    1. Open the command palette (Ctrl+P).
    2. Run Search history — This dir or Search history — Anywhere.
    3. Type to filter; Enter to open the session (This dir) or copy the resume command (Anywhere); Esc to close.

    How it works

    • Reads ~/.local/share/opencode/opencode.db read-only (WAL-safe).
    • Content filter: only part.data.type of text or reasoning, excluding synthetic rows — drops ~70% of rows that are pure operational noise.
    • Clipboard tool is auto-detected (wl-copyxclipxsel).

    License

    MIT — see LICENSE.