This is my implementation for pi-fff, for the official version make sure to checkout https://github.com/dmtrKovalenko/fff.nvim.
Screen.Recording.2026-04-09.at.12.20.45.PM.mov
pi-fff is a pi extension that brings fast fuzzy file finding and indexed content search into the editor, built-in tools, and agent workflows.
It is powered by @ff-labs/fff-node and gives pi a much better project-navigation experience.
When working in a real codebase, agents and humans rarely know the exact path they need.
Instead of requiring exact file paths or repeated shell exploration, pi-fff lets pi:
- autocomplete fuzzy
@...file references in the editor - resolve approximate paths before
read - search code content with FFF-backed
grep - expose dedicated search tools for agents
- surface better ranked results and read suggestions
In short: it makes “find the right file fast” a first-class part of pi.
pi-fff integrates at four levels.
Type things like:
@readme
@src/index
@"folder with spaces/file"
pi-fff will offer ranked file suggestions from the current project.
The extension can override pi’s built-in tools to make them FFF-aware. The read and grep upgrades are separate feature flags in /fff-features, so you can enable one without the other.
- accepts approximate file paths
- resolves fuzzy paths before reading
- supports
@path-style input - uses location hints from FFF when available
- uses FFF-backed indexed content search
- supports fuzzy path or folder scopes
- pushes scope and glob filters down into native FFF constraints when possible
- returns more agent-friendly results
- falls back to pi’s built-in grep for compatibility edge cases
The extension also registers explicit tools for exploration and search:
find_filesresolve_filerelated_filesfff_grepfff_multi_grep
These are useful when the agent wants to browse candidates first instead of immediately reading one guessed file.
Slash commands are included for feature flags, status, and manual recovery.
/fff-features/fff-status/reindex-fff
pi-fff creates an FFF runtime for the current pi session.
That runtime:
- indexes the current project on startup
- keeps a background file watcher running
- updates search results automatically as the project changes
So in normal use, indexing is automatic.
Usually, no.
/reindex-fff is mainly a fallback for cases like:
- very large branch switches
- mass file renames
- generated file churn
- stale results after watcher hiccups
Think of it as “force a fresh rescan if the index looks stale,” not something you should need after every edit.
When active, pi-fff helps the agent work more efficiently by making it easier to:
- discover files related to a topic
- turn vague file references into exact paths
- search code with better ranking and constraints
- move from search results to a likely file to read next
- continue paginated searches with cursors
This reduces blind bash exploration and makes tool use more deliberate.
A vague query like:
editor
can resolve to the best matching file, or return ranked candidates if the result is ambiguous.
FFF grep output can include:
- a suggested file to read next
- definition-like matches near the top
- expanded context for likely definitions
- cursors for pagination
Use fff_multi_grep when you want to search for multiple literal variants at once, for example renamed symbols or aliases.
Interactive feature toggle UI.
- Space toggles the selected row
- Enter saves
- Esc cancels
- Built-in
readandgrepenhancements can be toggled independently - State is stored globally in:
~/.pi/agent/extensions/pi-fff.json
Shows:
- runtime state
- indexed file count
- repository detection
- current feature flags
Forces a rescan of the current project if the automatic watcher missed something.
pi install npm:pi-fffpi install git+https://github.com/ShpetimA/pi-fff.gitRestart pi after installation.
npm install
npm run typecheck
npm test{
"pi": {
"extensions": ["./index.ts"]
}
}pi-fff makes pi better at file discovery, fuzzy path resolution, and indexed code search.
If pi is active inside a repo, pi-fff helps both the editor and the agent get to the right file faster.
See PLAN.md for implementation notes and next steps.