8 min read

How fzf Grew to 70K Stars (And Why It's Still the Best CLI Tool Nobody Explains Properly)

fzf has 70,000 GitHub stars. It's been around since 2013. Practically every developer power user has it installed. And yet most people who install it use maybe 10% of what it can do. This is the article I wish existed when I first installed it.

What fzf actually is

fzf is a fuzzy finder. You pipe a list of things into it, it gives you an interactive search interface, you pick something, it outputs your selection.

That's it. That's the whole tool.

The reason it has 70k stars is that "a list of things" can be literally anything: files, git branches, running processes, command history, environment variables, kubernetes pods, docker containers, npm scripts, SSH hosts, whatever you want.

The basic usage everyone knows

# Find a file
find . -type f | fzf

# Even simpler
fzf

You see a list of files, you type to filter, you press Enter to select. The selected path gets printed to stdout.

This is useful but not impressive. Here's where it gets interesting.

The shell integration nobody sets up

fzf ships with shell keybindings that most people never enable. Add this to your .zshrc or .bashrc:

# If you installed via brew
source $(brew --prefix)/opt/fzf/shell/key-bindings.zsh
source $(brew --prefix)/opt/fzf/shell/completion.zsh

Now you have:

The real power: custom sources

This is where fzf goes from "nice tool" to "changes how I use the terminal":

# Switch git branches with fzf
alias gb='git checkout $(git branch | fzf)'

# Kill a process by name
alias fkill='kill $(ps aux | fzf | awk "{print \$2}")'

# Open a recently modified file in vim
alias vr='vim $(find . -type f -newer ~/.zshrc | fzf)'

# SSH into a host from your config
alias fssh='ssh $(grep "^Host " ~/.ssh/config | awk "{print \$2}" | fzf)'

Each of these is a one-liner. Each replaces a workflow that used to involve multiple commands, tab completion, and hoping you remembered the exact name.

Combining with other tools

fzf pairs particularly well with two other tools we have on CLIHunt:

fzf + bat — Preview files while searching

fzf --preview 'bat --color=always {}'

fzf + ripgrep — Search file contents, not just names

rg --files-with-matches "TODO" | fzf --preview 'bat --color=always {}'

Why it has 70k stars

Junegunn Choi wrote fzf in Go in 2013. The original version was in Ruby, rewritten for speed. He's maintained it solo for over a decade, adding features carefully, keeping it focused.

The design philosophy is visible in every aspect of the tool: do one thing, do it fast, compose well with everything else. There are no unnecessary dependencies. The binary is a few megabytes. It starts instantly.

In a world of tools that try to do everything, fzf does one thing and does it better than anything else.


View fzf on CLIHunt →

Discussion
CH
CLI Hunt Team
Curating the best CLI tools and AI agents every week.

Get the best CLI tools in your inbox

Weekly newsletter. No spam. Unsubscribe anytime.

Highlight