Skip to content

About

OpenCode plugin + skill for AnyTXT Searcher full-text search (PDF, DOCX, EPUB...)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AnyTXT for OpenCode

version npm license Ko-fi

Plugin + skill for OpenCode: full-text search over files indexed by AnyTXT Searcher — PDF, DOCX, PPTX, XLSX, EPUB, RTF and other formats grep/ripgrep cannot read.

Uses the local JSON-RPC 2.0 API inside the ATGUI process (http://127.0.0.1:9920)

What it provides

Plugin (src/main.ts, TypeScript — loaded via the .opencode/plugins/anytxt.ts shim) — three agent-callable tools:

Tool RPC method Purpose
anytxt_search Searcher.V1.GetResult Files matching a pattern, verified against raw text, with per-file occurrence counts
anytxt_fragment Searcher.V1.GetFragmentAll Snippets around matches in one file, by FID
anytxt_sync Searcher.V1.SyncIndex Add/refresh a folder in the index, with post-sync feedback

Skill (skills/anytxt/SKILL.md) — tells the agent when to prefer anytxt over ripgrep (binary documents), the query syntax, and the golden rule.

Command (/anytxt-param) — change settings at runtime, no restart.

Install

bunx [email protected] install

One command: copies the sources, generates the shim, installs skill and command into ~/.config/opencode/. Idempotent, never clobbers your .env. Then restart OpenCode.

Project-local install (scoped to one project, global config untouched):

cd your-project
bunx [email protected] install .opencode

Alternative: "plugin": ["anytxt-opencode"] in opencode.json (auto-install at startup). Full details, manual install and prerequisites: docs/user.md.

Uninstall: bunx [email protected] remove (project: bunx [email protected] remove .opencode) — deletes what install created, keeps .env. Update: bunx [email protected] update — idempotent re-copy after a new release.

Quick usage

Search my notes for "hello world"               → anytxt_search
Give me the context around that match           → anytxt_fragment
Index a new folder first                        → anytxt_sync

Query syntax: & AND, | OR, ! NOT, ( ) grouping, "..." exact phrase. verify (default on) drops index false positives and reports occurrences per file. Golden rule: anytxt for binaries, grep for text — versions, punctuation phrases and source code → grep.

Docs

  • User guide — install, configuration, security, limitations, troubleshooting
  • Developer guide — structure, testing, RPC reference, release process
  • Changelog — Keep a Changelog format

License

MIT

About

OpenCode plugin + skill for AnyTXT Searcher full-text search (PDF, DOCX, EPUB...)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages