Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

󰀂 Porthole

A fancy TUI file chooser for your terminal, built with Ratatui.

Porthole provides an interactive, keyboard-driven file browsing experience with Nerd Font icons, a preview panel, bookmarks sidebar, and multi-select support. It outputs selected file paths to stdout — making it easy to integrate into scripts, editors, and custom workflows.

Features

  • Vim-like navigationj/k to move, h to go back, l/Enter to enter
  • Bookmarks sidebar — quick access to Home, Downloads, Documents, Pictures, Desktop, Root
  • File preview panel — shows file type, size, modification time
  • Search/filter — press / to filter files by name
  • Multi-selectTab to toggle selection, -m flag to enable multi-select mode
  • Open files — press o to open with system default app, or use --open flag
  • Hidden files toggle — press . to show/hide dotfiles
  • Nerd Font icons — contextual icons for 20+ file types
  • Catppuccin-inspired theme — easy on the eyes

Installation

From source

git clone https://github.com/ai-pivot/porthole.git
cd porthole
cargo build --release

The binary will be at target/release/porthole.

Usage

Basic

# Browse current directory
porthole

# Start from a specific directory
porthole -d ~/Downloads

# Select multiple files
porthole -m

# Show hidden files
porthole -a

With custom title

porthole -t "Choose a config file"

Open file with system default app

# Select a file and open it automatically after exit
porthole --open

Or press o inside the TUI to open the current file without exiting.

Save selection to file

porthole -o selected.txt

Integration example

# Open selected file in vim
vim "$(porthole)"

# Copy selected files
cp $(porthole -m) /destination/

Keybindings

Key Action
j / Move down
k / Move up
J / PageDown Half page down
K / PageUp Half page up
h / / Backspace Go to parent directory
l / / Enter Enter directory / Select file
/ Start search
Esc Cancel search / Exit
Tab Toggle selection
y Confirm selection (multi-select mode)
o Open file with system default app
. Toggle hidden files
p Toggle preview panel
F5 Refresh file list
17 Jump to bookmark
q Exit

CLI Options

Usage: porthole [OPTIONS]

Options:
  -d, --directory <DIR>      Starting directory
  -t, --title <TITLE>        Dialog title
  -m, --multi                Allow multiple file selection
  -o, --output <FILE>        Save selection to file instead of stdout
  -f, --filter <PATTERN>     File filter pattern (e.g. "*.rs,*.toml")
  -a, --all                  Show hidden files
  -O, --open                 Open selected file with system default app after exit
  -h, --help                 Show help
  -V, --version              Show version

Dependencies

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages