Skip to content
CAI
Software that uses CAICheck a score

jhspetersson/fselect

52.9

Adequate · 30 September 2026

25.8k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a command-line file search tool that utilizes a SQL-like query syntax to locate files based on a wide variety of metadata and content attributes. It supports extensive field extraction, including media dimensions, video duration, audio metadata, and file hashes, while respecting ignore patterns from Git, Docker, and Mercurial. The tool provides flexible output formatting in CSV, JSON, HTML, and plain text, with optimizations for performance and data integrity.

Features

Add duration extraction for MP4 and MKV video files

The application now supports extracting the duration of MP4 and Matroska (MKV/WebM) video files. This is achieved by introducing a new \duration\ utility module that implements format-specific extractors: MP4 files are processed using \mp4parse\ to read the movie timescale and track header duration, while MKV files use the \matroska\ crate. The \get\_duration\ function automatically selects the appropriate extractor based on the file extension, enabling accurate duration reporting for these common video formats.

src/util/duration · high confidence

Initial project scaffolding and documentation

The repository is initialized with core project files, including \.gitignore\ to exclude IDE and build artifacts, \LICENSE-APACHE\ and \LICENSE-MIT\ defining the dual licensing terms, and a \Dockerfile\ for containerized development. A \CNAME\ file configures the \fselect.rocks\ domain for the documentation site, and a \fselect-completion.bash\ script provides shell autocompletion for fields and functions. The \README.md\ introduces the tool, detailing its SQL-like query syntax, installation methods across various platforms, and usage examples.

(repo-wide) · high confidence

Introduce TOML-based configuration file support

Users can now customize the application's default behavior and metadata detection by providing a \config.toml\ file. The system looks for this file in the same directory as the executable or in the standard application configuration directory. The configuration allows toggling features such as \.gitignore\, \.hgignore\, and \.dockerignore\ parsing, enabling or disabling color output, setting the default file size format, and defining custom file extension lists for categories like images, source code, and archives.

src · high confidence

Native support for .dockerignore and .hgignore files

The tool now parses and respects .dockerignore and .hgignore (Mercurial) files in addition to .gitignore. This change introduces dedicated modules to handle Docker's specific ignore syntax (including negation with '!' and last-match-wins semantics) and Mercurial's regexp and glob syntaxes (including 'syntax:' directives and 'subinclude:' imports), ensuring that files excluded by these version-control or containerization configs are correctly ignored during searches.

src/ignore · high confidence

New modular dimensions extraction utility for images, videos, and SVGs

A new \src/util/dimensions\ module has been introduced to handle media dimension detection, decoupling this logic from the main search functionality. This utility now supports extracting dimensions from a wider range of formats, including images (BMP, GIF, HEIC, HEIF, JPEG, JPG, JXL, PNG, PSB, PSD, TGA, TIFF, WebP), videos (MP4, M4V, MOV, 3GP, MKV, WebM), and SVGs. The SVG extractor specifically handles unit suffixes (like px, cm) and floating-point values, and falls back to \viewBox\ dimensions when explicit width/height attributes are missing. Additionally, the video extractors use buffered reading to avoid loading entire files into memory.

src/util/dimensions · high confidence

New utility modules for ACLs, capabilities, audio metadata, and git integration

The \src/util\ directory has been reorganized into dedicated submodules, introducing new capabilities for file metadata and system integration. On Linux, \acl.rs\ and \capabilities.rs\ now parse POSIX ACLs and VFS capabilities (v2/v3) from extended attributes, while \extattrs.rs\ handles Linux-specific file flags. Audio metadata extraction has been expanded via \audio.rs\ to support formats like FLAC, Ogg, and Opus using the \lofty\ crate, distinct from video handling. Windows-specific modules (\win\_acl.rs\, \win\_attrs.rs\, \win\_xattr.rs\) provide equivalent ACL and extended attribute support for that platform. Additionally, \git.rs\ introduces a lazy cache for resolving git repository status, branch, and last-commit information for files, and \datetime.rs\ centralizes date parsing logic with support for US/UK date formats and relative day syntax.

src/util · high confidence

Behavioural changes

Decoupled output formatters with improved CSV, JSON, and HTML handling

The output module has been refactored to decouple formatters from the search logic, introducing dedicated formatters for CSV, JSON, HTML, and flat formats (lines, lists, tabs). CSV output now uses a dedicated writer to prevent silent data loss of large multi-byte rows. JSON output preserves the original column order from the query and resolves duplicate column names by appending numeric suffixes (e.g., \_2, \_3) to ensure valid JSON objects. HTML output now properly escapes special characters to prevent injection issues and improve usability.

src/output · high confidence

Refactored field handling with centralized dispatch and caching

The field evaluation logic has been restructured into a modular handler system located in src/field. A new dispatch mechanism routes field queries to specialized modules (content, metadata, path, mode, media, EXIF, git, and hash handlers), replacing the previous monolithic implementation. This change introduces a centralized FileMetadataState context that caches computed values—such as file metadata, content statistics, MIME types, and hashes—ensuring that expensive operations like reading file content or computing hashes are performed only once per file, even when multiple fields depend on the same data.

src/field · high confidence

Test coverage

Added SVG test fixtures for dimension extraction

Added test resources for SVG images, including a standard rectangle SVG, the Rust logo, and a corrupted SVG with invalid dimension attributes, to support testing of SVG dimension extraction logic.

resources · high confidence

Dependencies

Major dependency overhaul and Rust 2024 edition upgrade

The project has been upgraded to the Rust 2024 edition and now includes a Cargo.lock file to ensure reproducible builds. This change introduces a comprehensive update to the dependency tree, replacing older crates with modern alternatives (such as \nu-ansi-term\ for terminal coloring and \uzers\ for user lookups) and updating core libraries like \regex\, \chrono\, and \zip\. Additionally, optional features for interactive mode, Git support, and update notifications are now explicitly defined, and release builds are optimized with LTO enabled.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 53 (-5.5)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 76 → 76 (-0.1)
  • Architecture 100 → 99 (-0.9)
  • Maturity 57 → 57 (+0.4)
  • Readiness 46 → 35 (-10.4)
  • Security 74 → 78 (+4.0)

Resolved (4)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Hotspot: src/operators.rs (src/operators.rs)
  • Hotspot: src/util/mod.rs (src/util/mod.rs)

New (3)

  • Dependency hygiene PARTLY measured — Cargo dependencies read, dependency currency not (crates.io unreachable)
  • Low cohesion: FileMetadataState (LCOM4 11) (src/field/context.rs)
  • Medium vulnerability: RUSTSEC-2026-0285 (Cargo.lock)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

jhspetersson/fselect was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e5919213058e239eb3dfa36bfbe1e70d56d3341c — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.