fselect
$ fselect Community Low Riskfselect searches filesystems using SQL-like SELECT ... FROM ... WHERE ... ORDER BY ... LIMIT ... INTO json queries. It exposes file sizes, timestamps, permissions, hashes, EXIF/media attributes, and .gitignore filtering in a strictly read-only Rust CLI.
brew install fselect fselect ... into json performs local metadata/hash/EXIF queries in one command without an MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports into json, SQL column selection (field_filtering), limit, and non-interactive execution.
- Native
into jsonoutput formatter and SQLselect/where/limitprojection
Strictly read-only SQL query engine with no -delete or -exec mutation actions.
- Read-only filesystem metadata and content inspection
Static Rust binary distributed via brew install fselect, cargo install fselect, and GitHub Releases.
- Cross-platform binary for macOS, Linux, and Windows
Combines find, stat, sha256, archive inspection, and media/EXIF fields into one declarative query.
- Rich built-in functions (
sha256,line_count,width,duration)
Actively maintained community Rust project (jhspetersson/fselect) dual-licensed MIT/Apache-2.0.
- Consistent updates on GitHub
Comprehensive docs/usage.md reference covering fields, functions, and into json.
- Detailed SQL syntax and field docs in repository
Security, Auth & Guardrails
None required; read-only local filesystem query tool.
100% free, offline, and open-source (MIT OR Apache-2.0).
# fselect Agent Rules - Always append `limit <N> into json` to queries so results stay bounded and machine-parseable. - Add `depth <= <N>` or `gitignore` when scanning large trees to avoid traversing `node_modules` or `target`.
Agent-Ready Command Recipes
Safe Read-Only Queries
fselect "path, size, modified from . where ext = 'rs' order by size desc limit 20 into json"
Queries .rs files sorted by size descending and emits a structured JSON array via into json.
fselect "path, hsize from . gitignore where is_file = true and modified >= '2026-01-01' limit 50 into json"
Filters files using the gitignore keyword and human-readable sizes (hsize) in JSON output.
Strengths for Agents
- + Declarative SQL projection +
into jsonreturns exact requested file attributes cleanly. - + Strictly read-only (unlike
find, it has no-deleteor-execrisks).
Caveats & Pitfalls
- ! Does not skip
.gitignorepaths unless thegitignorekeyword is included after the root path. - ! Expensive functions like
sha256or unbounded searches can be slow ifdepthorlimitis omitted.