Skip to main content

CLI overview

The fsindex command queries and controls the running daemon. It does not scan the filesystem itself.

fsindex [--socket <PATH>] <COMMAND>

Global option​

OptionEnvironmentMeaning
--socket <PATH>FSINDEX_SOCKETConnect to a non-default daemon socket.

The command-line value takes precedence over the environment variable. With neither set, the CLI uses the platform's default per-user socket.

Commands​

CommandPurpose
searchReturn matching indexed entries.
countCount matches without returning entries.
statusShow index totals, volumes, and freshness.
reconcileForce a full rescan.
reloadReload configuration from disk.
pathsPrint default socket and config paths.
configPrint the effective default configuration.

Human and JSON output​

search, count, and status accept --json. Human-readable search output writes entries to standard output and the match summary to standard error, which makes piping paths and monitoring the summary independently possible.

Use JSON for scripts:

fsindex status --json
fsindex search invoice --ext pdf --json
fsindex count --ext rs --json

Exit failures​

Connection failures include the hint is fsindexd running?. Errors are also returned when arguments cannot be parsed, such as an unsupported size suffix, time unit, or sort key.