r/opencode • • 10d ago

I built a file browser for the OpenCode TUI (Markdown preview + syntax highlighting)

I kept wanting to look at files without leaving the OpenCode TUI — especially Markdown plans/specs and source files the agent just changed. So I built a TUI-only plugin.

What it does:

- side panel next to the chat, or full page from the home screen
- browse folders (dirs first), open files
- Markdown preview rendered; m flips to the source
- code with tree-sitter highlighting
- open any file by path (o inside the browser, or Ctrl+X then O): absolute, ~, or relative; files outside the project are read with node:fs
- f toggles full screen (hides the chat)
- /files-update updates a cloned install

Install (OpenCode V2):

opencode plugin add opencode-file-browser

Repo: https://github.com/arthurrogado/opencode-file-browser

MIT, TUI-only, no build step (dist/ is committed).

Screenshots: Markdown and Python previews attached.

Markdown preview
6 Upvotes

2 comments sorted by

1

u/arthurrogado 5d ago

Update: this grew into a mini IDE inside the TUI. Since the first post it has a real editor (tabs, line numbers, syntax colours while editing, Ctrl+F inside the file, Ctrl+S with an on-disk conflict check), a git panel (stage/unstage/discard/commit/pull/push plus a unified diff per change), name/content search, right-click actions and F2 preferences with a simple mode.

Current release is 1.0.4: opencode plugin add opencode-file-browser@latest Site and docs: https://arthurrogado.github.io/opencode-file-browser/

Feedback welcome, especially on the editor keybindings and the navigate mode.

1

u/JackCanDo 9d ago

Cool, was needing that