ff is a fairly fast highly ergonomic file name search CLI built specifically for Windows.
I was not happy with using Windows find and using Gnuwin32 and piping ls -A -R into grep sucks.
# Basic syntax
ff [queries...] [!exclusions...] [options]
# Search current directory for "Controller" and ".cs" files
ff .cs Controller
# Search a specific directory using -p
ff .json -p ../src- Ergonomic Defaults: Just type what you want to find.
ff .csautomatically matches C# files, andff !obj/prunes the object directory. - Pretty Fast: Doesn't win any speed competitions, but plenty usable for day to day.
- Piping & The UNIX Philosophy:
ffplays nicely with pipes. You can chain multipleffcommands together to progressively narrow down your results. - Streaming: Results are streamed by default. Use
-bor--blockto wait for the entire search to complete before printing. - Optional TUI: While the main focus is the CLI, you can use
--tuito boot a basic TUI. Try out your queries and see it update in real time.
Prepend ! to patterns you want to exclude from results. Append / to target directories specifically.
# Finds all .cs files, completely skipping the heavy obj and bin folders
ff .cs !obj/ !bin/ !*Test*You can easily pipe the output of one ff command into another to filter down massive lists of files step-by-step:
# Finds all json files, and then filters that list down to only ones with "appsettings" in the name
ff .json | ff appsettings| Flag | Full Name | Description |
|---|---|---|
-p |
--path <dir> |
Explicitly sets the directory to search. Defaults to ./. |
-l |
--local |
Local search only. Disables recursion so it only searches the top level directory. |
-r |
--regex |
Treats your search queries as Regular Expressions rather than wildcard strings. |
-c |
--case-sensitive |
Enables strict case-sensitive matching for the search query. |
-b |
--block |
Blocks streaming output and waits until the entire search finishes before printing it all as one joined chunk. |
-S |
--no-symlinks |
Prevents traversing or matching Windows Reparse Points (symlinks/junctions). |
-a |
--all |
Includes hidden and system files in the search (these are skipped by default to save time). |
-t |
--type <type> |
Filters by type. Use -t f for files only, or -t d for directories only. |
--logic <string> |
Use advanced boolean logic (&, |, !) with placeholders {0}, {1} mapping to positional queries. |
|
--tui |
Launches the interactive Terminal User Interface (TUI) for real-time searching and folder navigation. | |
-v |
--version |
Prints the version number. |
-h |
--help |
Displays the help menu with all available options and examples. |
-? |
--help |
Same as -h. |
Find all json files in your project:
ff *.jsonFind all .txt files but ignore the node_modules and .git folders:
ff .txt !node_modules/ !.git/Look for a file in your parent directory, but don't recurse down into its children:
ff README -p ../ -lRegex searching for specific configuration files (JSON or YAML) while skipping heavy directories:
ff !bin/ !obj/ -r ".*\.(json|yaml|yml)$"Advanced Boolean Logic Searches:
For highly specific queries, you can supply a custom logic string. When using --logic, all unflagged arguments become
numbered inputs {0}, {1}, etc.
(Note: && and & are supported, as well as || and |)
# Finds files that match ".cs" OR ".json", but NOT "Tests"
ff --logic "({0} | {1}) & !{2}" .cs .json TestsIf you make a mistake in your logic string, ff catches it before running the search and gives you a nice error:
> ff --logic "{0} | {1}" abc
Error parsing command:
ff --logic "{0} | {1}" abc
-------------------^
Logic expression references out-of-bounds index {1}. Only 1 queries were provided.Optional: Interactive Visual Searching
If you want to visualize a query before cementing it, you can launch the TUI. Use Alt+Up/Alt+Down to navigate
through directories, and press Enter to dump the results back to the CLI so they can be piped into other tools.
> ff --tui
# (Interactive UI opens. After selecting your results and hitting Enter, it dumps to stdout)
D:\Repos\ff\ff.Core\Core.cs
D:\Repos\ff\ff.Tui\Program.cs