mgrep is a command-line tool that performs semantic search across multiple file types including code, images, PDFs, and text.
The tool addresses the limitation of traditional grep, which matches only exact strings, by enabling natural-language search that understands meaning rather than syntax. It uses embeddings to index file content and supports multilingual queries. The approach combines local file indexing with optional web search capabilities, allowing users to query both their own files and the internet from a single interface. Background indexing via the watch command automatically keeps an index synchronized with changes in git repositories while respecting gitignore rules.
Developers should choose this tool if they work with mixed content types and want to search by meaning rather than keywords. It suits projects where team members need to find relevant code or documentation without knowing exact names or syntax. The tool is designed for both human developers and coding agents, with particular emphasis on reducing token usage for agent-based workflows. It enforces default limits on file size and count to maintain performance, though these can be customized. Authentication flows through either browser-based device login or API key environment variables for headless environments.
The project maintains active development with regular updates to core functionality. The tool receives ongoing refinement to its indexing and search capabilities. Integration patterns with coding agents continue to be a focus area for development. The team actively manages performance considerations through configurable limits and background sync behavior.