fzf — Blazing Fast Command-Line Fuzzy Finder
fzf is a general-purpose command-line fuzzy finder written in Go. Blazing fast, portable, and composable with any list-producing command. Interactive picker for files, commands, history, git branches, processes, and more.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install 85b6bab1-35bd-11f1-9bc6-00163e2b0d79 --target codexRun after dry-run confirms the install plan.
What it is
fzf is a general-purpose command-line fuzzy finder written in Go. It reads any list from stdin and presents an interactive fuzzy search interface. You type a partial match, and fzf instantly narrows the list. It works with files, command history, git branches, processes, environment variables, and any command that produces text output.
fzf targets anyone who works in the terminal. It integrates with bash, zsh, and fish shells to enhance Ctrl+R history search, file finding, and directory navigation. The tool is composable with any Unix command through pipes.
How it saves time or tokens
fzf replaces manual searching through long command histories, directory trees, and process lists. Instead of typing exact names, you type partial fragments and fzf finds matches instantly. Shell integration replaces the default Ctrl+R with a fuzzy-searchable history. The preview window shows file contents or command details without leaving the picker.
How to use
- Install fzf:
brew install fzfon macOS,sudo apt install fzfon Ubuntu, or clone from GitHub. - Run
fzfin any directory to fuzzy-find files, or pipe any command output to fzf. - Enable shell integration for enhanced Ctrl+R, Ctrl+T, and Alt+C keybindings.
Example
# Interactive file finder
fzf
# Search command history (with shell integration)
# Press Ctrl+R to activate
# Find and open a file in vim
vim $(fzf)
# Git branch checkout with preview
git branch | fzf --preview 'git log --oneline {}' | xargs git checkout
# Kill a process interactively
ps aux | fzf | awk '{print $2}' | xargs kill
# Find files with preview
fzf --preview 'cat {}' --preview-window=right:60%
# Combine with ripgrep for content search
rg --files | fzf --preview 'head -50 {}'
Related on TokRepo
- Automation Tools — CLI productivity tools
- Coding AI Tools — Developer productivity tools
Common pitfalls
- Shell integration must be explicitly enabled after installation. Run the install script or source the keybinding files in your shell config.
- fzf uses an external file finder (find or fd) for directory traversal. Install fd for faster file finding and better .gitignore support.
- The default fzf command searches the current directory recursively. In large directories, set FZF_DEFAULT_COMMAND to use fd or rg for faster results.
Frequently Asked Questions
After installing fzf, run the install script that enables keybindings: ~/.fzf/install or eval $(fzf --bash) in .bashrc. This adds Ctrl+R for history search, Ctrl+T for file finding, and Alt+C for directory jumping.
Yes. Pipe any command to fzf and it becomes an interactive picker. Examples: docker ps | fzf, kubectl get pods | fzf, env | fzf. Any text list works.
The --preview flag runs a command for the currently highlighted item and displays the output in a split pane. Use it to preview file contents, git diffs, or command help without leaving the picker.
fzf is a terminal-based fuzzy finder, while dmenu and rofi are graphical menu selectors. fzf integrates with shell workflows and pipes. dmenu/rofi are better for desktop launcher use cases.
Yes. Use the -m flag to enable multi-select mode. Press Tab to select items and Enter to confirm. The selected items are output one per line.
Citations (3)
- fzf GitHub— fzf is a general-purpose fuzzy finder written in Go
- fzf README— fzf shell integration and keybinding configuration
- fzf Wiki— Command-line productivity tools and fuzzy finding
Related on TokRepo
Discussion
Related Assets
Yazi — Blazing Fast Terminal File Manager in Rust
Yazi is a blazing fast terminal file manager written in Rust, based on async I/O. Preview images and videos in terminal, fuzzy search, batch operations, plugin system, and seamless integration with tools like fzf, zoxide, and rg.
xsv — Fast CSV Toolkit Written in Rust
xsv is a blazing-fast command-line toolkit for working with CSV data. It provides indexing, slicing, searching, joining, aggregation, and statistics — processing millions of rows per second for data analysis, ETL pipelines, and CSV manipulation.
Foundry — Blazing Fast Ethereum Development Toolkit in Rust
Foundry is a portable, modular toolkit for Ethereum smart contract development written in Rust. It includes Forge for testing, Cast for chain interaction, Anvil for local node simulation, and Chisel for an interactive Solidity REPL. Foundry compiles and runs tests significantly faster than JavaScript-based alternatives.
GitUI — Blazing-Fast Terminal UI for Git Written in Rust
GitUI brings a Rust-fast terminal interface to Git: browse commits, stage hunks, view diffs, manage branches, and resolve conflicts — all without leaving the keyboard. A great complement (or alternative) to lazygit.