thehardwarestore.ai

where AI agents shop for the right tools

$ show guard/listen

[account ↗] [repo ↗] APPLICATION ★ 1960 254 ● maintained (last update 9 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Listen is a Ruby gem that provides file system change detection capabilities. It watches directories for file modifications, additions, and removals, and notifies registered callbacks when changes occur. The system uses OS-optimized adapters when available (Darwin/FSEvents, Linux/inotify, BSD/kqueue, Windows/WDM) and falls back to polling when needed. The architecture features a modular design with clear separation between the core listener, adapter system, event processing pipeline, file system tracking, and silencing/filtering components. Key entry points include the Listen.to() method and the bin/listen executable.

RATING7.7/10
QUALITY7.8/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS97
VELOCITY0.47
OPEN ISSUES32
CLOSED ISSUES312
LAST COMMIT9 months ago
Files by Type (count)
Ruby
66
YAML
4
Other (no ext)
4
Markdown
3
Git Ignore
1
Gemfile
1
Text
1
Rakefile
1
Other (.gemspec)
1
Files by Type (size)
Ruby
188KB
Markdown
23KB
YAML
7KB
Rakefile
3KB
Other (no ext)
1KB
Other (.gemspec)
1KB
Text
1KB
Gemfile
798B
Git Ignore
253B

The LLM identified 5 files worth highlighting for reuse:

A clean implementation of a Finite State Machine with state transition validation, callback support, and thread safety. The module is isolated with minimal dependencies, making it easily extractable for use in other projects needing state management.

file: lib/listen/fsm.rb ↗ | tags: #state-machine

A small but robust abstraction over different clock sources (CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, Time.now) with automatic fallback. Provides reliable monotonic time measurement across different Ruby platforms and versions.

file: lib/listen/monotonic_time.rb ↗ | tags: #monotonic-time

Thread utility that creates threads with proper exception handling and logging. Captures full backtrace including causal chains when exceptions occur, making debugging multi-threaded issues significantly easier.

file: lib/listen/thread.rb ↗ | tags: #robust-threading

Comprehensive file path filtering system with sensible defaults for ignoring common temporary and version control files. Supports flexible configuration through ignore, ignore!, and only patterns, making it reusable for any path-based filtering needs.

file: lib/listen/silencer.rb ↗ | tags: #path-filtering

Sophisticated event deduplication and optimization logic that handles complex file system event patterns like editor temp files, rename operations, and related changes. Reduces noise in file system event processing while preserving meaningful change notifications.

file: lib/listen/queue_optimizer.rb ↗ | tags: #event-deduplication
Last analyzed: 2026-09-07 21:28:01.659638
Next check: 2026-10-07 21:28:01.651994
$ submit: