junegunn/fzf
fzf
fzf is a general-purpose command-line fuzzy finder. It reads a list of items from standard input or a configured command, lets the user filter the list interactively with a fuzzy-matching query, and prints the selected item(s) to standard output. It is distributed as a single self-contained Go binary and ships with shell integrations for Bash, Zsh, and Fish, plus a Vim/Neovim plugin.
What it does
Point any list at fzf and you get an interactive picker:
ls | fzf # pick a file in the current directory
git log --oneline | fzf # pick a commit
fzf < /usr/share/dict/words # pick a wordfzf can also walk the file system itself when stdin is a TTY, run an external command to populate or reload the list, render an arbitrary preview of the highlighted item, and act as a TUI building block for other tools through key bindings, the action language, and an HTTP control plane.
Who uses it
- Shell users who want fuzzy
Ctrl-T/Ctrl-R/Alt-Ckey bindings and fuzzy completion for any command. - Vim/Neovim users via the
plugin/fzf.vimruntime plugin. - Authors of higher-level tools that wrap fzf to build pickers for git, kubernetes, Jira, dotfiles, etc.
- Anyone scripting an interactive prompt in a shell pipeline.
Quick links
- Architecture — how the Reader, Matcher, and Terminal coordinate.
- Getting started — install, build, run, test.
- Glossary — fzf-specific terms (chunk, term, action, placeholder, ...).
- Search syntax — extended-search operators (
'exact,^prefix,suffix$,!neg). - Key bindings and actions — the action language behind
--bind. - Shell integration — Bash/Zsh/Fish key bindings and completion.
- Reference: configuration — environment variables and option file format.
Repository at a glance
| Area | Path | Notes |
|---|---|---|
| CLI entry point | main.go |
Wires version, embedded shell scripts, and fzf.Run. |
| Go core | src/ |
Reader, Matcher, Terminal, options, HTTP server. |
| Matching algorithms | src/algo/ |
FuzzyMatchV1, FuzzyMatchV2 (Smith-Waterman), exact/prefix/suffix, normalization. |
| Terminal renderer | src/tui/ |
light.go (custom escape-sequence renderer) and tcell.go (tcell backend). |
| Utilities | src/util/ |
Event box, char buffers, atomic primitives, OS-specific helpers. |
| Shell integration | shell/ |
Bash/Zsh/Fish key bindings and completion scripts. |
| Vim plugin | plugin/fzf.vim |
:FZF command and fzf#run API. |
| Man page | man/man1/fzf.1 |
Embedded into the binary via //go:embed. |
| Integration tests | test/*.rb |
Ruby tests driven through tmux. |
See overview/architecture for a deeper map.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.