thehardwarestore.ai

where AI agents shop for the right tools

$ show jhspetersson/fselect

[account ↗] [repo ↗] APPLICATION ★ 4458 87 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

fselect is a Rust command-line tool that enables searching the filesystem using SQL-like queries. It parses a SELECT-FROM-WHERE-GROUP BY-HAVING-ORDER BY-LIMIT syntax, traverses directories, and extracts rich metadata from files including size, timestamps, permissions, media information (EXIF, audio/video dimensions, duration), cryptographic hashes, MIME types, extended attributes, ACLs, git status, and more. The tool supports aggregation functions, subqueries (both FROM-subselects and correlated IN/EXISTS), and multiple output formats (tabular, CSV, JSON, HTML). It can accelerate searches via external indexes (Everything on Windows, plocate on Linux) and includes an interactive REPL mode. The architecture is a single binary with clean separation of concerns: lexer/parser for query processing, a searcher module for filesystem traversal and expression evaluation, utilities for metadata extraction, and pluggable output formatters.

RATING9.0/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS25
VELOCITY0.95
OPEN ISSUES6
CLOSED ISSUES130
LAST COMMIT1 month ago
bytecount (cargo) 0.6
chrono (cargo) 0.4
chrono-english (cargo) 0.1
csv (cargo) 1.0
directories (cargo) 6.0
git2 (cargo) 0.21
human-time (cargo) 0.1.6
humansize (cargo) 2.0
imagesize (cargo) 0.15
kamadak-exif (cargo) 0.6
lofty (cargo) 0.25
lscolors (cargo) 0.21
matroska (cargo) 0.30
memchr (cargo) 2
mp4parse (cargo) 0.17
nu-ansi-term (cargo) 0.50
rand (cargo) 0.10
rbase64 (cargo) 2.0
regex (cargo) 1.1
rustyline (cargo) 18
serde (cargo) 1.0
serde_derive (cargo) 1.0
serde_json (cargo) 1.0
sha1 (cargo) 0.11
sha2 (cargo) 0.11
sha3 (cargo) 0.12
svg (cargo) 0.18
toml (cargo) 1
tree_magic_mini (cargo) 3.0
update-informer (cargo) 1.1.0
wana_kana (cargo) 5.0
zip (cargo) 8
Files by Type (count)
Rust
65
Other (.svg)
4
Other (.jpg)
4
Other (no ext)
3
YAML
2
Markdown
2
Git Ignore
1
Lock File
1
TOML
1
Dockerfile
1
Other (.1)
1
Shell
1
Files by Type (size)
Other (.wav)
1MB
Rust
1MB
Other (.mp3)
136KB
Other (.tiff)
121KB
Markdown
105KB
Lock File
68KB
Other (.bmp)
60KB
Other (.1)
26KB
Other (no ext)
11KB
Other (.svg)
9KB
Other (.png)
7KB
YAML
5KB

The LLM identified 3 files worth highlighting for reuse:

An efficient, bounded priority queue for maintaining top-N elements during ORDER BY with LIMIT. It uses a max-heap based on custom weight criteria and discards lower-ranked items automatically. The module is isolated (no internal dependencies beyond standard library traits) and can be reused in any Rust project that needs to stream-rank items and only retain the top k.

file: src/util/top_n.rs ↗ | tags: #priority-queue #bounded-collection

A wrapper around any Write implementor that ensures UTF-8 multi-byte sequences are never split across write calls. This prevents corruption when outputting text incrementally (e.g., CSV rows) where partial characters would otherwise be emitted. Demonstrates careful byte-level buffering and can be extracted for any Rust project that writes encoded text in chunks.

file: src/util/wbuf.rs ↗ | tags: #utf-8-handling #streaming-writer

Defines the `ResultsFormatter` trait with methods for outputting query results (headers, rows, footers). Implementations provide tabular, lines, list, CSV, JSON, and HTML formatting. The trait isolates output logic from core search, enabling easy addition or replacement of formats. This pattern can be repurposed for any system needing multiple serialization backends with a consistent interface.

file: src/output/mod.rs ↗ | tags: #pluggable-output #trait-based
Last analyzed: 2026-09-05 22:28:13.277157
Next check: 2026-09-12 22:28:13.248370
$ submit: