fileview 1.25.1

A minimal file tree UI for terminal emulators
Documentation

FileView (fv)

Crates.io Downloads CI License: MIT MSRV

Zero-config terminal file browser with automatic image preview

English | 日本語

Why fv?

Lightweight ◄───────────────────────► Feature-rich

   nnn    lf    fv    ranger    yazi
  3.4MB  12MB  8MB    28MB     38MB
  • Zero config - Install and run. No setup required.
  • Auto image preview - Detects Kitty/iTerm2/Sixel/Halfblocks automatically
  • Fast - 2.3ms startup, 8MB memory (vs ranger 400ms/28MB)
  • Batteries included - Git status, syntax highlighting, PDF preview
  • Vim keybindings - Navigate with j/k/h/l

Quick Start

cargo install fileview
fv

Features

Feature Description
Tree navigation Expand/collapse with vim keys
Multi-select Batch operations on files
Preview panel Text, images, archives, hex dump
File operations Create, rename, delete, copy/paste
Fuzzy finder Ctrl+P for quick search
Mouse support Click, scroll, drag
Nerd Fonts Icons enabled by default

Image Preview

FileView auto-detects your terminal:

Terminal Protocol
Kitty / Ghostty / Konsole Kitty Graphics
iTerm2 / WezTerm / Warp iTerm2 Inline
Foot / Windows Terminal Sixel
VS Code / Alacritty Halfblocks

Keybindings (Quick Reference)

Key Action
j/k Navigate up/down
h/l Collapse/expand
g/G Top/bottom
Space Toggle mark
/ Search
Ctrl+P Fuzzy finder
P Preview panel
q Quit

Full keybinding list

Claude Code Integration

FileView is optimized for AI pair programming with Claude Code:

# Output directory tree for context
fv --tree --depth 2 ./src

# Quick file selection
selected=$(fv --select-mode --multi)

# Copy file content in Claude-friendly format
# Press Ctrl+Y in fileview to copy with syntax hints

MCP Server

Use FileView as a Claude Code MCP server:

{
  "mcpServers": {
    "fileview": {
      "command": "fv",
      "args": ["--mcp-server"]
    }
  }
}

CLI Options

fv [OPTIONS] [PATH]

Options:
  -p, --pick          Pick mode: output selected path(s)
  -f, --format FMT    Output format: lines, null, json
  --stdin             Read paths from stdin
  --on-select CMD     Run command on selection
  --choosedir         Output directory on exit
  --no-icons          Disable Nerd Fonts icons

Claude Code:
  -t, --tree          Output directory tree to stdout
  --depth N           Limit tree depth
  --with-content      Include file contents in output
  --select-mode       Simple selection mode
  --multi             Allow multiple selection
  --mcp-server        Run as MCP server

Exit Codes

Code Meaning
0 Success
1 Cancelled (pick mode)
2 Runtime error
3 Invalid arguments

Shell Integration

# Add to .bashrc or .zshrc
fvcd() {
  local dir=$(fv --choosedir "$@")
  [ -n "$dir" ] && [ -d "$dir" ] && cd "$dir"
}

Installation Options

# Standard install
cargo install fileview

# With Chafa support (better image quality on basic terminals)
brew install chafa  # or apt install libchafa-dev
cargo install fileview --features chafa

Lua Plugin System

Extend FileView with Lua scripts:

-- ~/.config/fileview/plugins/init.lua

-- Startup notification
fv.notify("Plugin loaded!")

-- React to events
fv.on("file_selected", function(path)
    if path and path:match("%.secret$") then
        fv.notify("Warning: Secret file!")
    end
end)

-- Custom command
fv.register_command("copy-path", function()
    local file = fv.current_file()
    if file then
        fv.set_clipboard(file)
        fv.notify("Copied: " .. file)
    end
end)

Plugin API Reference

Documentation

License

MIT