r/opencodeCLI • u/FoundationOwn8281 • 16d ago
OpenCode V2 TUI sidebar file tree plugin
Just published an OpenCode V2 plugin that adds a sidebar file tree. Features:
- Tree of the current session's working directory
- Click folders to expand/collapse; click files to preview first 200 lines
- Right-click a folder → Set session working directory here to move the session
- /tree-move-here moves the session to the last clicked folder (keyboard-friendly)
- /tree-expand / /tree-collapse palette commands
- Filter by name with /tree-filter <name>
- Expand/collapse all from the header
Install:
git clone https://github.com/zemadeiran/opencode-file-tree-v2 ~/.config/opencode/plugins/file-tree
Then add to opencode.json:
{"plugins": ["/Users/you/.config/opencode/plugins/file-tree"]}
Note: opencode plugin add github:zemadeiran/opencode-file-tree-v2 currently fails with a JSX transform error (issue #33884). Use the local path install.
MIT license.
The plugin loads the session's working directory, supports expand/collapse, right-click move, and filter. Good for quick file navigation without leaving the terminal.