opencode-history-search plugin

An OpenCode plugin that searches conversation history across all projects by keyword, regex, with typos, and by touched files.

  • 132 ★ on the repository
  • Last commit
  • MIT
Plugin

Minimal access

Why this level

  • Reads local conversation history and project paths.
All reasons and checks

joeyism/opencode-history-search

Install

Works in

Manual install

npx opencode-history-search

The README quick install copies the tool into `~/.opencode/tool/`. The recommended way is the package name in the `plugin` array of the config.

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • Reads local conversation history and project paths.

This is third-party code. Review the repository files before installing.

What it does

The plugin adds a search tool over saved sessions to OpenCode. Queries can target titles, message text, names of invoked tools and file paths. Modes are exact keyword, regular expression, fuzzy search tolerant of typos and finding sessions that contain several terms at once. Results filter by date (`today`, `last 7 days`, ranges) and by role, user or assistant. `searchAllProjects: true` extends search to every project on the machine, and `filePath` shows which sessions modified a file. It works with OpenCode 1.2 and newer on SQLite and with 1.1.x on JSON files.

Who it is for. OpenCode users who cannot recall which session or project a decision was discussed in.

Good fit when

  • You need the session where the agent wrote a database migration but forgot the project.
  • You want to know which sessions modified a specific file.
  • You recall a topic but misspell the word.
  • You need to match two or three themes discussed in one session.

Not a fit when

  • You use Claude Code or Codex; the plugin targets OpenCode only.
  • You want semantic search rather than word matching; there is no semantic index.
  • You need multi-term search on JSON storage; it works on SQLite only.

Example request

Search all projects for sessions from the last 7 days where we discussed rate limiting and show the project path for each.

Limitations

The plugin reads local OpenCode data, so results carry project paths and snippets of past conversations, including any secrets that were typed there. Multi-term search is available only on SQLite, meaning OpenCode 1.2 and newer. The README quotes speed on a database of over 100 thousand parts: one term about 0.5 seconds, several about a second. There is no semantic search.

How to disable. Remove `opencode-history-search` from the `plugin` list in `~/.config/opencode/opencode.json` and restart OpenCode. If you used the installer script, delete the files from `~/.opencode/tool/`.

FAQ

How do I enable the plugin?

Add `opencode-history-search` to the `plugin` array in `~/.config/opencode/opencode.json` and restart OpenCode. A quick install via `npx opencode-history-search` also exists.

How do I search all projects?

Pass `searchAllProjects: true`. By default the search covers only the current repository.

How do I find sessions that modified a file?

The `filePath` parameter traces the touch history of a path. Patterns such as `.test.ts` are supported too.

Does it tolerate typos?

Yes, in `fuzzy` mode. `fuzzyThreshold` sets strictness, 0.4 by default.

Which OpenCode versions are supported?

1.2 and newer with SQLite and 1.1.x with JSON files. Multi-term search works on SQLite only.

Discussion

No questions or reviews yet.

Plugins

An OpenCode plugin where hooks on tool and subagent calls are declared in config and command output flows into context.

PluginBroad access64Repository stars

A local semantic code index: the agent searches by meaning, then follows hits into definitions, callers and dependency paths

MCP serverExtended access229Repository stars

Local search plugin for files, notes and logs: the agent gets numbered passages with paths and pages through results with a cursor

PluginExtended access103Repository stars

An OpenCode plugin that uses the Morph cloud service to merge partial edits into a file with no exact string search.

PluginExtended access170Repository stars

An OpenCode TUI sidebar plugin that shows live token cache hit rate, session cost and the money the cache saved.

PluginMinimal access318Repository stars

A Windows plugin for OpenCode Desktop that sets edit boundaries, screens commands and ties test results to the current code.

PluginExtended access113Repository stars

README in short

Output shows session ID, project, date, match type and an excerpt. Multi-term search groups output by session.

README badge

Report a problem