Repository navigation
fmgrep 0.1.0
First release of fmgrep: ripgrep over a persistent FM-index, with AND/OR
expressions answered from the index.
fmgrep index builds an index of a source tree once. After that a search
prints what rg would print without scanning the tree, and fmgrep serve
answers searches from a warm index over JSON-RPC.
Install
cargo install fmgrep
Rust 1.98 or later and a C compiler, for the bundled libsais. Published as
two crates: fmgrep, the tool, and
docfm, the FM-index library it is built
on. No prebuilt binaries.
What is in 0.1.0
- Literal, regex and case-insensitive search with ripgrep's output and flags
(-n,-l,-c,-o, context, globs,--json). --and,--orand--exprfor boolean queries over files, planned
against the index's own counts.fmgrep serveand--server, with the tree watched for changes.- An index of about 1.5 bytes per byte of text, built at word boundaries so
locating an occurrence is cheap.
Measured on Linux against ripgrep, tgrep and elgrep over the linux and
chromium trees: BENCHMARKS.md.
Status
fmgrep is experimental software:
- the index format, the serve protocol and the
--jsonoutput can change in
any release; - the
.fmgrepdirectory holds the indexed text unencrypted: treat it as a
copy of the source; fmgrep servehas no authentication and listens on 127.0.0.1 by default
(SECURITY.md);- Linux is the measured platform; macOS works; Windows is unsupported.
Provided as is, under the MIT license, without warranty.