Docview
Markdown doc viewer side panel for the OpenCode TUI, with line numbers and GitHub-style range copying
0
603
603 in 7 days
37.1
Multi-signal model
3 days ago
2026-10-17
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-docview@0.1.1"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-docview@0.1.1"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-docviewOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Markdown doc viewer side panel for the OpenCode TUI, with line numbers and GitHub-style range copying.
Requires OpenCode 2.x.
Install
Add it to ~/.config/opencode/cli.json and restart the TUI:
{ "plugins": ["opencode-docview"] }
Use
/doc path/to/file.mdor/doc @fileopens a doc;/docalone opens a picker.- Click or drag the line numbers to copy a range like
#L3-L8. Shift-click extends it. - Frontmatter is dimmed and unnumbered, so L1 is the first line after it.
- The panel reloads when the file changes.
| Key | Action |
|---|---|
j / k, g / G |
Scroll, top / bottom |
s |
Rendered / source view |
y / esc |
Copy / clear selection |
o / r |
Open another doc / reload |
f / q |
Fullscreen / close |
<leader> left and <leader> right move focus between the prompt and the panel.
Develop
npm install
npm run typecheck
npm test # unit tests (vitest)
npm run test:render # gutter layout against OpenTUI (bun)
npm run build
bun test/e2e/smoke.ts # real OpenCode TUI, needs opencode on PATH and a build
License
Apache-2.0
Similar plugins
Review
@opencode-cockpit/review
A pull request in the terminal: read the diff, hold your notes, send one review
Trail
@opencode-cockpit/trail
What a conversation made: the PRs, tickets and pages the agent created or changed, kept, ordered and one click away
Dir Tree Tui
opencode-dir-tree-tui
OpenCode V2 TUI plugin: VS Code-style file tree in the sidebar with git status coloring and click-to-open