fpv — Fast Previewer TUI
A minimal, keyboard-first TUI file previewer for browsing directories and viewing code with syntax highlighting in the terminal.
Current release: v0.1.7
Features
- Split TUI — Directory tree on the left, file preview on the right
- Syntax highlighting — Tree-sitter–powered highlighting for many languages (see Supported file types)
- Git-aware — Tree indicators for repository status
- Inline diff preview — toggle git diff mode to see added and deleted lines inline in the highlighted preview, with change markers in the scrollbar
- ASCII image preview — render common image formats such as PNG, JPEG, and GIF as colorized shaded-block previews, scaled to the pane with a short delayed load while navigating
- Configurable — Keybindings and theme via a TOML config file
- Safe defaults — Plain-text or fallback preview for binary or unreadable files
Installation
Homebrew
From source
See Build from source below.
Usage
# Open current directory
# Open a specific path
# Use a custom config file
**Quick tips: Press ? in the app for shortcut help.
Build from source
Prerequisites
- Rust (Rust 1.70+)
Build and run
The binary will be at target/release/fpv. Run it with:
# or, if installed: fpv
To run without installing (e.g. for development):
Configuration
On first run, fpv creates a default config at:
- Linux / macOS:
~/.config/fpv/config
You can override keybindings and theme there. Example config:
[]
= "ctrl+q"
= "ctrl+tab"
[]
= "yellow"
= true
= "bar" # or "title"
Config keys under [mappings] include: move_up, move_down, expand_node, collapse_node, open_node, exit_fullscreen_preview, switch_focus, page_up, page_down, preview_scroll_up, preview_scroll_down, toggle_preview_line_numbers, toggle_preview_wrap, toggle_help, toggle_hidden, resize_preview_narrower, resize_preview_wider, quit. Use key names like up, down, enter, tab, ctrl+q, etc.
Supported file types
Syntax highlighting is supported for:
| Category | Extensions / names |
|---|---|
| Shell | bash, sh, zsh, ksh |
| C / C++ | c, h, cpp, cxx, hpp, hxx |
| Web | html, htm, css, xml |
| Go | go |
| Java | java |
| JavaScript / TypeScript | js, jsx, mjs, cjs, ts, tsx |
| Data | json, toml, yaml, yml |
| Markdown | md, markdown |
| Python | py |
| Rust | rs |
Other files are shown as plain text or with a safe fallback.
License
This project is licensed under the MIT License. See LICENSE for details.