Fast, beautiful TUI file finder with semantic search, 35 themes, and first-class shell integration.
Built on Bun, Effect-TS,
@ff-labs/fff-bun, and
@opentui/solid.
bun install -g findfileOr run without installing:
bunx findfileRequires Bun ≥ 1.0.
# Interactive TUI (default)
findfile
# Search file contents
findfile --mode content useState
# Search directories only
findfile --mode dirs src/
# Semantic search in markdown (requires qmd)
findfile --mode semantic "auth flow"
# Pipe-friendly output (auto-detected)
findfile app | head -5
findfile --mode content TODO | xargs -o nvim┌─────────────────────────────────────────┐
│[files] search… │
├──────────────┬──────────────────────────┤
│▶ src/app.tsx │ src/app.tsx │
│ src/lib.ts │ 1 import { createSignal }│
│ package.json│ 2 from "solid-js" │
│ │ 3 │
│ │ 4 export const App = () =>│
│ │ │
├──────────────┴──────────────────────────┤
│[files] 3 results · C-t:mode · Enter:open │
└─────────────────────────────────────────┘
| Key | Action |
|---|---|
↑ / ↓ |
Navigate results |
Ctrl+P / Ctrl+N |
Navigate results |
PgUp / PgDn |
Page up/down |
Tab / Shift+Tab |
Cycle search mode |
Space |
Mark/unmark row (multi-select) |
Enter |
Open selected (or all marked) |
Ctrl+T |
Theme picker |
? |
Help overlay |
Esc / Ctrl+C |
Quit |
Ctrl+↑ / Ctrl+↓ |
Query history |
- files — Fuzzy find by filename
- dirs — Fuzzy find directories
- content — Grep file contents
- semantic — Natural language search in markdown (via qmd)
35 built-in presets including Tokyo Night, Dracula, Catppuccin, Gruvbox, Nord, Monokai, Solarized, and more.
# In the TUI, press Ctrl+T to browse themes liveOr set in config:
[theme]
preset = "tokyonight"Swap the search engine per mode:
[backendSelection]
content = "rg" # ripgrep for content search
files = "fd" # fd for file search- fff (default) — Bundled Rust backend, zero external deps
- rg — ripgrep with PCRE2 regex, multiline search
- fd — Fast directory/file finder
See docs/backends.md for full details.
Add to ~/.bashrc or ~/.zshrc:
# Pick files, open in $EDITOR
ff() {
local out
out=$(findfile "$@")
[ -z "$out" ] && return 1
while IFS= read -r line; do
${EDITOR:-vim} "$line"
done <<< "$out"
}
# Grep then edit
ffg() {
local out
out=$(findfile --mode content "$@")
[ -z "$out" ] && return 1
while IFS= read -r line; do
${EDITOR:-vim} "$line"
done <<< "$out"
}See docs/shell-integration.md for
fish, Neovim, VS Code, and Emacs variants.
[theme]
preset = "dracula"
[modeDefaults.content]
caseInsensitive = true
beforeContext = 3
afterContext = 3
[keymap]
"ctrl+o" = "submit"
[queries.todos]
text = "TODO|FIXME"
mode = "content"
grepMode = "regex"Type-safe with autocomplete:
import { defineConfig } from "findfile/config"
export default defineConfig({
theme: { preset: "tokyonight" },
keymap: {
"ctrl+o": "submit",
"ctrl+j": { command: "moveCursor", args: { direction: "down" } },
},
modeDefaults: {
content: {
caseInsensitive: true,
beforeContext: 3,
afterContext: 3,
},
},
})Config precedence (low → high):
- Built-in defaults
~/.config/findfile/config.toml(or.ts)./findfile.config.toml(or.ts)--config <path>- CLI flags
findfile [query] [options]
Options:
--mode <files|dirs|content|semantic> Search mode
--cwd <path> Search directory (default: .)
--no-tui Plain output, no TUI
--format <path|line|json|null> Output format
--color <always|auto|never> ANSI colors
--glob <pattern> Filter by glob (repeatable)
--type <ext> Filter by type (repeatable)
--hidden Include dotfiles
--no-gitignore Disable .gitignore
--depth <N> Max directory depth
--modified-since <2d|2026-04-01> Time filter
-i, --ignore-case Case-insensitive
-w, --word Word boundary
-C, --context <N> Context lines
--paths-from <file> Read paths from file (- for stdin)
--preview-cmd <cmd> Custom preview command
--limit <N> Max results
--config <path> Config file
--grep-mode <plain|regex|fuzzy> Grep mode
Subcommands:
doctor Health check
config print Show effective config
config path List config file paths| Code | Meaning |
|---|---|
| 0 | At least one result found |
| 1 | No results |
| 2 | Error |
ff --preview-cmd 'bat --color=always {} -r :{line}'# Search only git-tracked files
git ls-files | findfile --paths-from - --mode content "TODO"
# Search recently modified markdown
findfile --type md --modified-since 7d "API"
# JSON output for scripting
findfile --format json --no-tui "schema" | jq '.match.preview'Invoke with : prefix:
findfile :todos# Install dependencies
bun install
# Run in dev mode
bun run dev
# Run tests
bun test
# Type check
bun run typecheck
# Build binaries for all platforms
bun run buildsrc/core/— Library layer (search, config, backends, filters)src/tui/— Solid JSX UI componentssrc/bin/— CLI entry point
No file in src/core/ imports from src/tui/ or @opentui/*.
MIT