libag - The famous The Silver Searcher, but library 📚
Third, you might want to take a look at libag, it's a project of mine that aims to port ag to a library. From what you've described (it looks like) my library does exactly what you want to do.
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.
The Silver Searcher (ag), but as a library
1 project | news.ycombinator.com | 9 Jun 2021
libag - The famous The Silver Searcher, but library
1 project | reddit.com/r/C_Programming | 8 Jun 2021
Common libraries and data structures for C
15 projects | news.ycombinator.com | 16 May 2022
Advice for Sync'ing Text Files
1 project | reddit.com/r/ish | 14 May 2022
Send to Kindle epub doesn't show cover art
1 project | reddit.com/r/kindle | 11 May 2022