context-dot-dev/sgrep ·
Agents often know what code should do before they know a name to search. sgrep finds local passages by words and meaning. It can also rank the results of a focused ripgrep command. No account, hosted index, or model server is needed. Requires Rust 1.90 or later and ripgrep. Or download a macOS Apple Silicon binary. Remove any older Python install with uv tool uninstall sgrep or pip uninstall sgrep first. Results show the file, line range, and source. Use -n 10 for ten results or --json for JSON output. To rank only the results from ripgrep: Run both commands from the same directory. Use ripgrep for exact matches; sgrep can return approximate matches. The first search downloads a model (32–34 MB) and any required code parsers. Later searches can run offline. Source and queries stay on your machine. The local index stores copies of source passages. Auto mode selects the text model only when all candidate passages have prose extensions, such as .md or .txt. Mixed code and prose use the co