opencode-readseek
v0.13.16
Published
OpenCode plugin for anchored file operations and structural code navigation
Maintainers
Readme
opencode-readseek
OpenCode plugin for anchored edits, structural search, symbol navigation, and document inspection.
Install
OpenCode V2
Install globally with opencode plugin add opencode-readseek, or add the
package to plugins in your project's opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-readseek"]
}For a locally installed copy, use the package directory, such as
./node_modules/opencode-readseek, not a file inside dist.
To disable image attachments in V2, use the object form:
{
"$schema": "https://opencode.ai/config.json",
"plugins": [
{ "package": "opencode-readseek", "options": { "imageMode": "off" } }
]
}OpenCode V1
OpenCode V1 requires version 1.18.29 or later. Use the singular plugin key:
{
"plugin": ["opencode-readseek"]
}To disable image attachments in V1, use
[["opencode-readseek", { "imageMode": "off" }]] as the plugin value.
The other modes are auto (default) and on.
Usage
In V2, discover the native tools with search("readseek") in
Code Mode. Start with tools.readseek.show({ path: "file.ts" })
for anchored source or document content, or tools.readseek.search for
structural matches. When Code Mode is disabled, look for the direct tool
names readseek_show, readseek_search, and so on. V1 always uses the
direct names. Relative paths resolve in the active project.
In V2, edit and rename preview by default. To apply, pass apply: true and
set planHash to the preview's plan_hash. OpenCode checks edit permission
before writing. In V1, readseek_edit and readseek_rename apply by default
with edit permission; set apply: false to preview. Read fresh LINE:HASH
anchors before editing in either version.
The native tools use the binary supplied by @jarkkojs/readseek. To override
it, set READSEEK_BINARY on the OpenCode server to an absolute executable
path. If the binary is unavailable, the V2 tools are not registered. For the
V2 skill's optional fallback, install the ReadSeek CLI on the
server's PATH and allow shell access. Do not use the CLI to bypass a
permission denial.
The V2 plugin retains native results in metadata.readseek. In V1,
readseek_show and readseek_grep retain that metadata. Ordinary reads
never run inference; caption, objects, and ocr are explicit operations
and require installed models. See readseek(1) for command semantics
and selectors.
Development
npm test
npm run build
npm run typecheckSet READSEEK_BINARY to a built native executable for real-binary checks.
From the repository root, make ci also installs the packed plugin in clean
OpenCode V1 and V2 hosts. It checks V1 tool registration and V2 skill
registration, Code Mode calls, and denied reads and edits. The smoke tests
use a local model fixture and do not need API credentials.
License
Licensed under Apache-2.0.
