A powerful interactive file search and navigation tool using fzf. Seamlessly switch between file finding (by name) and content searching (by text) modes for fast and intuitive file exploration and editing.
| Find Mode | Grep Mode |
![]() |
![]() |
| Change directory | Open file |
![]() |
![]() |
- π Dual Mode Operation: Instantly switch between Find mode and Grep mode with a single
TABkeypress - π Live Preview: Real-time file content preview with syntax highlighting
- π¨ Syntax Highlighting: Beautiful code display using
bat/batcat - π³ Directory Trees: Visual directory structure using
ezaortree - β‘ Lightning Fast: High-speed searching with
fdandripgrep - π Editor Integration: Direct file opening in VSCode or your preferred editor
- π― Jump to Line: Navigate directly to matched lines in Grep mode
- π§ Smart Fallbacks: Works with standard Unix tools when optional dependencies aren't available
- π¨ Beautiful UI: Polished interface with icons, colors, and intuitive controls
fzf- Interactive fuzzy finder (core dependency)
Install these for the best experience:
| Tool | Purpose | Fallback |
|---|---|---|
fd |
Fast file finder | find |
ripgrep (rg) |
Lightning-fast content search | grep |
bat or batcat |
Syntax-highlighted previews | cat |
eza |
Modern directory trees | tree or basic display |
tree |
Directory structure visualization | Basic display |
Note: To see icons in directory trees when using
eza, you need to install a Nerd Font. Popular choices include:After installation, configure your terminal to use the Nerd Font.
brew install fzf fd ripgrep bat eza treesudo apt update
sudo apt install fzf fd-find ripgrep bat eza treecurl -fsSL https://raw.githubusercontent.com/the0807/ff/main/install.sh | bashThen reload your shell:
source ~/.zshrc # or ~/.bashrc for bash users- Download the script:
curl -fsSL https://raw.githubusercontent.com/the0807/ff/main/ff.sh -o ~/.ff.sh- Add to your shell configuration:
For Zsh (~/.zshrc):
echo 'source ~/.ff.sh' >> ~/.zshrc
source ~/.zshrcFor Bash (~/.bashrc or ~/.bash_profile on macOS):
echo 'source ~/.ff.sh' >> ~/.bashrc
source ~/.bashrcff # Start in Find mode (default)
ff find # Start in Find mode (explicit)
ff grep # Start in Grep mode| Key | Action |
|---|---|
Enter |
Navigate to file/directory |
Ctrl-O |
Open file in editor (at matched line in Grep mode) |
TAB |
Toggle between Find and Grep mode |
Ctrl-U |
Scroll preview up |
Ctrl-D |
Scroll preview down |
Esc |
Exit |
Ctrl-C |
Cancel/Exit |
- Type to fuzzy search by filename
- Press
Enterto navigate to the selected file's directory - Press
Ctrl-Oto open the file in your editor
- Type to search by file content
- See matching files with line numbers and context
- Press
Enterto navigate to the file's directory - Press
Ctrl-Oto open the file at the matched line
$ ff
# Type "config" to fuzzy find files matching "config"
# Use arrow keys to select
# Press Enter to cd to the file's directory
# Or press Ctrl-O to open the file$ ff grep
# Type "function handleClick"
# See all files containing this text
# Files show with line numbers highlighted
# Press Ctrl-O to open in editor at that exact line$ ff
# Start browsing files in Find mode
# Type "README" to find README files
# Press TAB to switch to Grep mode
# Type "installation" to search content
# Press TAB again to return to Find mode$ ff find
# Search for "utils.js"
# Press Enter to cd to the directory
$ pwd # You're now in the file's directoryBy default, ff uses VSCode (code) if available, otherwise falls back to $EDITOR. To customize:
# Add to ~/.zshrc or ~/.bashrc
export EDITOR=nvim # Neovim
# or
export EDITOR=vim # Vim
# or
export EDITOR=nano # NanoEdit the ff.sh file to customize:
- FZF options (layout, theme, colors)
- Preview window size and position
- Key bindings
- Search commands
- Uses
fd(orfind) to list all files and directories - Pipes results to
fzffor interactive filtering - Shows file previews using
bat(with syntax highlighting) - Shows directory trees using
ezaortree
- Uses
ripgrep(orgrep) to search file contents as you type - Results show filename, line number, and matched content
- Preview highlights the matched line in context
- Opening with
Ctrl-Ojumps directly to the matched line
# Check if fzf is installed
which fzf
# If not installed, install it:
# macOS
brew install fzf
# Ubuntu/Debian
sudo apt install fzfInstall the optional tools for better previews:
# macOS
brew install bat eza tree
# Ubuntu/Debian
sudo apt install bat eza treeCheck your EDITOR environment variable:
echo $EDITOR
# If empty or not your preferred editor, set it:
export EDITOR=vim # or your preferred editorEnsure VSCode command-line tools are installed:
- Open VSCode
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Linux/Windows) - Type "Shell Command: Install 'code' command in PATH"
- Select it and restart your terminal
Contributions are welcome! Feel free to:
- π Report bugs by opening an issue
- π‘ Suggest new features
- π§ Submit pull requests
- π Improve documentation
MIT License - Feel free to use, modify, and distribute.
This project is built on top of these excellent tools:
- fzf - Command-line fuzzy finder
- fd - Fast and user-friendly alternative to find
- ripgrep - Recursively search directories for regex patterns
- bat - Cat clone with syntax highlighting
- eza - Modern replacement for ls
# From anywhere in your project
ff
# Type the filename you want to work on
# Press Enter to navigate there
# Your shell is now in that directory!ff grep
# Type "TODO"
# See all TODO comments across your codebase
# Press Ctrl-O to open and fix themff
# Type "config"
# Quickly find all configuration filesff grep
# Type "function myFunction"
# Find where functions are defined
# Jump directly to the definitionff is designed to be fast even in large codebases:
- With
fdandripgrep: Handles repositories with 100,000+ files efficiently - Real-time search results as you type
- Minimal memory footprint
- Works great on both small and large projects
Happy file browsing! π



