Skip to content
fdncredPublic

About

A finder GUI application that uses fff/fff-search to locate files quickly on MacOS, Linux, and Windows and integrates with Nushell.

Topics

Resources

Stars

54 stars

Watchers

1 watching

Forks

Repository files navigation

fffinder icon

fffinder

A Finder-style file browser for macOS, Linux, and Windows, written in Rust. It keeps an index of your home folder, or the folders you choose, and fuzzy-searches it. Search uses fff-search, the UI uses GPUI Kit, and Nushell is built in. Your shell can query the same index, and the app runs Nushell on the files you select.

This README is an overview. The manual documents every view, menu, shortcut, setting, and command.

Icon view in dark mode

What it does

  • Indexes your home folder in the background and keeps the index up to date as files change. On the development Mac that's about 310,000 files in 3 seconds, and a search over all of them takes 25 to 35 ms. On macOS it finds apps by reading the app folders instead of indexing them.
  • Searches by name with typo tolerance, or by file contents. You can narrow a search to the current folder, a kind, an extension, a glob, or a git status.
  • Browses folders as icons, a list, columns, or a gallery, with tabs, back and forward history, a clickable path bar, and a split view where F5 copies and F6 moves between panes. The sidebar lists your places, or shows them as a folder tree the way Explorer does. The list and icon views can group items by kind, date, size, or name, and you can collapse each group. The list opens folders in place. Its columns resize and move, and a column chooser adds dates created and last opened, permissions, and git status. Keep Folders on Top and folder sizes from the index work there too. You can drag a box to select, rename in place, cut and paste, and open a preview pane beside the list or icon view. Each folder remembers its view and sort, and windows reopen where they were.
  • Previews files in the gallery, the column view, and Quick Look (Space): syntax-highlighted code, rendered Markdown, fonts, archive contents, media durations, PDFs you can scroll through and zoom, and the system's thumbnails of PDFs, videos, and documents (QuickLook, Explorer's, or the desktop's thumbnailers), which also show in the icon view. CSV, JSON, TOML, YAML, and other structured text files show as colored text. Cmd+Space explores their data level by level, the way Nushell's explore does. SQLite databases and spreadsheets open through Nushell's open and show as tables.
  • Handles everyday file work: open, open with another app or change the default, open in your editor, show in Finder, copy, paste, and move files (with a dialog for name clashes and progress you can stop), drag files between folders and to other apps, undo and redo, Get Info with folder sizes and permissions, duplicate, aliases and symbolic links, zip and tar archives, copy paths, rename one item or many, new file and folder, a Trash view with Put Back and Empty, eject, free space in the status bar, and Connect to Server for SMB, SFTP, and WebDAV. Nothing it does deletes your files behind your back. Replace moves the old item to the Trash, and a copy never writes over a file that took its name while it ran.
  • Has light and dark themes that follow the system, and a text size setting for the whole window.
  • Runs inside a terminal with fffinder --term. On macOS and Linux it's drawn with the kitty graphics protocol, so it looks the same as the window, in a terminal like kitty, Ghostty, or WezTerm. On Windows it's drawn with kitty graphics in terminals that have them, such as WezTerm, and as sixel images in Windows Terminal 1.22 or later. It needs a build with --features term.

fffinder --term running in a Ghostty tab

Search results

The sidebar as a folder tree, opened down to the folder the window shows

Nushell integration

The fff module

nu/fff.nu lets your shell search the running app's index, so nothing is scanned in the shell. Load it from your config:

use /path/to/fffinder/nu/fff.nu *
fff keybindings      # Ctrl+T inserts picked paths, Alt+C picks a folder to cd into
fff find budget --kind document        # name search, ranked like the window
fff search TODO FIXME --context 1      # content search
fff selection | get path               # what's selected in the front window
ls **/*.log | where size > 10mb | fff show --title 'Big logs'
fff pick *.csv | open $in              # choose a file in the window, use it here

The manual lists every fff command.

Inside the app

  • The Nushell panel. Ctrl+runs a pipeline with the selected files as$in. Each row has name, path, type, kind, size, and modified, so where size > 1mb | sort-by modified` works on them.
  • Filters. Cmd+Alt+F narrows a folder or search results with a where condition such as size > 10mb and modified > 2024-01-01. Save a search and its filter in the sidebar as a Smart Folder.
  • Batch rename. F2 with several items selected renames them with a closure, such as {|f| $f.name | str downcase }, and shows every new name before anything changes.
  • Your own actions. Commands you export from actions.nu in the settings folder appear in the context menu and get the selection on $in. The first run writes a few starters, such as Count Lines and Find Duplicates.
  • Your Nushell environment. With "Use Nushell's file colors and editor" on in Settings, file names use your LS_COLORS and "Open in Editor" uses your buffer_editor.
  • Open Nushell Here. Cmd+Alt+T opens nu in the folder, in the terminal you pick in Settings.
  • fffinder --pick. The window becomes a file chooser for scripts and prints the chosen paths as JSON.

Nushell pipeline panel

The local socket (experimental)

The fff module talks to the app over a local socket, and your own tools can too. The endpoints are plain HTTP with JSON. They're experimental and may change between versions. On macOS and Linux the socket is run/fffinder.sock in the data folder, and only your user can open it. Windows uses 127.0.0.1 with a random token.

let sock = ($nu.data-dir | path dirname | path join fffinder run fffinder.sock)
http get --unix-socket $sock 'http://localhost/v1/find?query=readme&limit=5'

docs/protocol.md describes every endpoint.

Install

Each release has binaries for macOS, Linux, and Windows on x86_64 and ARM64. cargo-binstall downloads the one for your system into ~/.cargo/bin:

cargo binstall --git https://github.com/fdncred/fffinder fffinder

That installs only the binary. For the fff Nushell commands, take nu/fff.nu from this repository or the release archive and load it the way The fff module shows. Linux also needs a Vulkan driver.

To build from source, you need Rust 1.92 or newer and Nushell 0.116, plus:

  • macOS: Xcode Command Line Tools (xcode-select --install).
  • Linux: gcc g++ clang pkg-config libfontconfig-dev libwayland-dev libxkbcommon-x11-dev libx11-xcb-dev libssl-dev libzstd-dev, plus a Vulkan driver.
  • Windows: Visual Studio 2022 Build Tools with the C++ workload.

Building in the manual has the Fedora and Arch packages, and covers WSL2 and virtual machines without a GPU.

nu scripts/install.nu            # release build into ~/.cargo/bin, or --dest ~/bin; on Linux also the desktop entry
nu scripts/install.nu --term     # also `fffinder --term`, the window inside a terminal
nu scripts/bundle.nu             # or package it: dist/fffinder.app on macOS, a .desktop folder on Linux
nu scripts/bundle.nu --install   # Linux: also install the desktop entry

install.nu prints the use line that loads the fff module.

On macOS, give fffinder Full Disk Access in System Settings > Privacy & Security, then reopen it. With access, it indexes Desktop, Documents, Downloads, and the other protected folders without macOS asking about each one. Without it, fffinder holds off indexing and asks you first, instead of setting off a stack of permission prompts.

On Linux, a big home folder can use up the inotify watch limit. Raise it with sudo sysctl fs.inotify.max_user_watches=1048576.

Using it

Search syntax

Type Meaning
budget report Fuzzy words, typo tolerant. Every word must match.
*.pdf *.md Extensions. Several are ORed.
src/**/*.rs A glob against the path inside the search location.
/notes/ todo Only paths inside a folder named notes.
git:modified Git status: modified, untracked, staged, clean.
!*.log !test Exclude an extension, glob, folder, or text.

Cmd+/ shows the full syntax in the app.

Keyboard

Cmd on macOS, Ctrl elsewhere. The manual lists every shortcut.

Keys Action
Cmd+F Search
Cmd+Alt+F Filter with Nushell
Cmd+1 to Cmd+4 Icons, list, columns, gallery
Space Quick Look
Cmd+Space Quick Look, exploring data
Cmd+Shift+G Go to folder
F2 Rename
Ctrl+` Nushell panel
Cmd+Alt+T Open Nushell here
Cmd+, Settings

Settings

In Settings you choose the search locations (or the entire disk), fff-search's options, the appearance, text sizes, and the terminal for Open Nushell Here. Everything saves to settings.json in ~/Library/Application Support/fffinder on macOS, ~/.config/fffinder on Linux, or %APPDATA%\fffinder on Windows. The manual covers each setting and every field.

How it's built

crates/fffinder-core   search engine wrapper, file model, listing, copy and move, places, settings, terminals
src/                     the GPUI Kit app (src/finder/ holds the window and its views)
src/server/              the local socket server and its client
src/macos.rs             macOS integration through AppKit
nu/fff.nu                the `fff` Nushell module
assets/actions.nu        the starter Nushell actions
docs/                    the manual, the socket protocol, and screenshots
scripts/*.nu             build, install, bundle, screenshots, Windows icon
examples/                headless screenshots, a window driver, and diagnostics
tests/                   UI, socket, and `fff` module tests

Development

nu scripts/build.nu --test --lint    # build, test, clippy
nu scripts/screenshots.nu            # regenerate docs/images (macOS)
cargo run -- ~/src --query readme    # run from source

The UI tests open the real window headlessly, click every control, and press its keyboard shortcuts. The manual's Development section covers the tests, the example tools, and the hang watchdog.

Limits

  • fff-search skips hidden files unless the search location is itself a git repository. It also skips files a repository's .gitignore excludes, and outside git repositories it skips build and cache folders such as node_modules and ~/Library/Caches. See What the index skips.
  • Searches can't filter by size or date. A Nushell filter can, on the results a search returns.
  • The first scan has to finish before searches return results. The search runs again on its own when the scan is done.
  • Only the macOS build gets daily hands-on use so far. CI builds and tests Linux and Windows too, but expect rough edges there.

About

A finder GUI application that uses fff/fff-search to locate files quickly on MacOS, Linux, and Windows and integrates with Nushell.

Topics

Resources

Stars

54 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages