Introduction
PathPicker (fpp) is a command-line tool developed at Meta (Facebook) that accepts piped input, parses it for file paths, and presents an interactive selector. After you pick one or more files, fpp opens them in your editor or runs a custom command against your selection.
What PathPicker Does
- Parses arbitrary terminal output to extract file system paths automatically
- Presents a scrollable, interactive list for selecting one or more files
- Opens selected files in $EDITOR or executes a custom shell command against them
- Handles paths with spaces, special characters, and relative references
- Works as a pipeline component that accepts input from any text-producing command
Architecture Overview
PathPicker is written in Python and operates in two phases. First, the input parser scans each line for substrings that look like file paths, validating them against the actual filesystem. Then the UI phase displays validated paths in a curses-based selector where users navigate with keyboard shortcuts. Selected paths are passed to the editor or command as arguments.
Self-Hosting & Configuration
- Install via Homebrew, apt, pip, or download from GitHub releases
- Set your preferred editor via the $FPP_EDITOR or $EDITOR environment variable
- No configuration file is required; all behavior is controlled via command-line flags and environment variables
- Custom commands can be specified with the -c flag to run arbitrary scripts against selected files
- Works in any terminal emulator that supports curses
Key Features
- Automatic path extraction from unstructured text output (git status, grep, find, etc.)
- Multi-select mode for choosing several files at once
- Executes custom commands against selected paths using -c flag
- Validates extracted paths against the filesystem to filter false positives
- Lightweight single-purpose tool that composes with any Unix pipeline
Comparison with Similar Tools
- fzf — general-purpose fuzzy finder; requires explicit file path input while fpp auto-extracts paths from text
- peco/skim — interactive filters that work on any text lines; fpp specifically understands file paths
- xargs — runs commands on piped input but without interactive selection
- ranger — full file manager with navigation; fpp is a targeted path selector for pipeline use
- vifm — terminal file manager; different use case from fpp's pipeline-oriented path picking
FAQ
Q: How does fpp know which parts of the output are file paths? A: It uses heuristics and regex patterns to identify path-like strings, then validates each candidate against the filesystem to confirm it exists.
Q: Can I use fpp with commands other than a text editor?
A: Yes. Use command | fpp -c 'your-command $F' to run any command against the selected files, where $F is replaced by the selected path.
Q: Does fpp handle output with line numbers (like grep -n)? A: Yes. It strips line-number prefixes and extracts the file path portion. Some editors can also receive the line number for direct navigation.
Q: Is this project actively maintained? A: PathPicker is a stable, feature-complete tool from Meta's open-source portfolio. It receives maintenance updates as needed.