Stop me if this sounds familiar: you know the file you need is somewhere under three nested folders, but the exact path has left you. You ls, guess, cd, and ls again while your shell history hides the last time you ran this exact command.
fzf is built to end that ritual. It is a general-purpose command-line fuzzy finder by Junegunn Choi that takes any list — files, command history, git commits, running processes — and lets you filter it interactively with a few keystrokes.
Why developers love it
fzf started life in 2013 as a Ruby script and was rewritten in Go for speed. That rewrite is a big part of why it feels instant even on large directories. It also explains its popularity: the project has more than 80,000 GitHub stars, which puts it among the most widely used developer tools around.
The magic is in the matching. fzf does not demand exact substrings. Characters can match approximately and in any order, so typing a few letters in the right sequence finds results even when you had the order slightly wrong. Type what you remember, and fzf does the rest.
Getting started
The fastest route is the official installer:
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
It is also a one-liner on most systems — brew install fzf on macOS and apt install fzf on Debian and Ubuntu.
Running fzf with no arguments walks the current directory and shows you the files beneath it. Pipe any list in and the same experience applies to that list; git branch | fzf gives you a fuzzy picker over your branches.
Shell integration
The installer also wires up key bindings so fzf lives right in your prompt:
- Ctrl-T — insert a file path onto the command line
- Ctrl-R — fuzzy-search your shell history
- Alt-C — pick a subdirectory and
cdinto it
Ctrl-R alone usually sells people on the whole tool, because it turns history hunting into a two-second memory jog.
Preview and your toolkit
The --preview flag opens, well, a preview window. The {} placeholder is replaced with the current line, so you can view a candidate before committing:
fzf --preview 'bat {}'
Here bat supplies syntax-highlighted previews. fzf pairs brilliantly with ripgrep for fast file and content search and with bat for pretty output, giving you a modern search-and-preview pipeline out of the box.
Going further in Vim and Neovim
If you edit in Vim or Neovim, the companion fzf.vim plugin turns fzf into a full in-editor finder. Commands like :Files, :Rg, :Buffers, and :Commits put files, ripgrep results, open buffers, and commit history behind the same fuzzy matcher — with a live preview window on the right as a default.
The takeaway
fzf is one of those tools that quietly changes how you work. It is small, fast, and extremely composable: filter anything, preview before you act, and hook it into your shell and editor. Give the git branch | fzf one a try today — you will probably never navigate your terminal the same way.
