Grepfruit v3.2: Programmatic API for Text Search
Briefly

"Grepfruit, a ractor-powered text search gem, adds a programmatic API in v3.2, a count-only mode, and Ruby 4 support."
"All CLI options are available as keyword arguments, and the API returns structured data that should be easy to work with in Ruby scripts."
"Use the --count flag (or count: true in the API) to show only match statistics without displaying the actual matches."
Grepfruit v3.2 introduces a programmatic API that allows direct use within Ruby applications via keyword arguments mirroring CLI options. The API returns structured data including search parameters, a summary of files checked and matches, and a list of specific matches for easy integration into scripts. A count-only mode is available to report only match statistics without listing individual matches. The gem adds compatibility with Ruby 4 and its updated Ractor implementation, maintaining ractor-powered parallel search capabilities. The update streamlines automated and scriptable text searching in Ruby projects.
Read at Rubyflow
Unable to calculate read time
[
|
]