Skip to content

pi-fff: Support enableHomeDirScanning / enableFsRootScanning to allow indexing home and root directories #588

Closed

Description

@avinashkanaujiya

Problem

The @ff-labs/fff-node FileFinder.create() API supports enableHomeDirScanning: true and enableFsRootScanning: true options to opt into indexing home directories (~) and the filesystem root (/). Without these flags, fff refuses to initialize:

"Can not run certain FFF features in a file system root or home directories. Consider smaller per-project directories."

However, the pi-fff extension (packages/pi-fff/src/index.ts) does not expose these options. The ensureFinder function always creates the finder with aiMode: true and no overrides, making it impossible to use fffind/ffgrep when pi is launched from ~ or /.

Proposed Solution

Expose enableHomeDirScanning and enableFsRootScanning to pi-fff users. Options:

  1. Environment variables (e.g. FFF_ENABLE_HOME_SCAN=1, FFF_ENABLE_ROOT_SCAN=1) — simplest, matches the existing pattern (PI_FFF_MODE, FFF_FRECENCY_DB, etc.)
  2. CLI flags (--fff-enable-home-scan, --fff-enable-root-scan) — consistent with existing flags
  3. Both env vars and flags, following the existing precedence model

Environment

  • pi-fff via pi install npm:@ff-labs/pi-fff
  • macOS (Apple Silicon)
  • Launching pi from ~ or /

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions