[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73672":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},73672,"mgrep","mixedbread-ai\u002Fmgrep","mixedbread-ai","A calm, CLI-native way to semantically grep everything, like code, images, pdfs and more.","https:\u002F\u002Fdemo.mgrep.mixedbread.com",null,"TypeScript",4195,170,15,40,0,1,10,58,3,28.7,"Apache License 2.0",false,"main",[],"2026-06-12 02:03:16","\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmixedbread-ai\u002Fmgrep\">\n    \u003Cimg src=\"public\u002Flogo_mb.svg\" alt=\"mgrep\" width=\"96\" height=\"96\" \u002F>\n  \u003C\u002Fa>\n  \u003Ch1>mgrep\u003C\u002Fh1>\n  \u003Cp>\u003Cem>A calm, CLI-native way to semantically grep everything, like code, images, pdfs and more.\u003C\u002Fem>\u003C\u002Fp>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@mixedbread\u002Fmgrep\">\u003Cimg src=\"https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F@mixedbread%2Fcli.svg\" alt=\"npm version\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\" alt=\"License: Apache 2.0\" \u002F>\u003C\u002Fa>\u003Cbr>\n  \u003Ca href=\"https:\u002F\u002Fdemo.mgrep.mixedbread.com\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlayground-Try%20it%20now-brightgreen\" alt=\"Playground: Try it now\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fmixedbreadcommunity\u002Fshared_invite\u002Fzt-3kagj5m36-wwM_hryIFby7B2wlcOaHaQ\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSlack-Join%20Community-4A154B?logo=slack\" alt=\"Slack Community\" \u002F>\u003C\u002Fa>\n\n  \u003Cbr>\n\n  \u003Cp align=\"center\">\n    \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F7cb6d2ab-f96b-4092-9088-abbca85b0d52\" controls=\"controls\" style=\"max-width: 730px;\">\n      Your browser does not support the video tag.\n    \u003C\u002Fvideo>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n## Why mgrep?\n- Natural-language search that feels as immediate as `grep`.\n- Semantic, multilingual & multimodal (audio, video support coming soon!)\n- Web search built-in — query the web alongside your local files with `--web`.\n- Smooth background indexing via `mgrep watch`, designed to detect and keep up-to-date everything that matters inside any git repository.\n- Friendly device-login flow and first-class coding agent integrations.\n- Built for agents and humans alike, and **designed to be a helpful tool**, not a restrictive harness: quiet output, thoughtful defaults, and escape hatches everywhere.\n- Reduces the token usage of your agent by 2x while maintaining superior performance\n\n```bash\n# index once\nmgrep watch\n\n# then ask your repo things in natural language\nmgrep \"where do we set up auth?\"\n```\n\n## Quick Start\n\n1. **Install**\n   ```bash\n   npm install -g @mixedbread\u002Fmgrep    # or pnpm \u002F bun\n   ```\n\n2. **Sign in once**\n   ```bash\n   mgrep login\n   ```\n   A browser window (or verification URL) guides you through Mixedbread authentication.\n\n   **Alternative: API Key Authentication**\n   For CI\u002FCD or headless environments, set the `MXBAI_API_KEY` environment variable:\n   ```bash\n   export MXBAI_API_KEY=your_api_key_here\n   ```\n   This bypasses the browser login flow entirely.\n\n3. **Index a project**\n   ```bash\n   cd path\u002Fto\u002Frepo\n   mgrep watch\n   ```\n   `watch` performs an initial sync, respects `.gitignore`, then keeps the Mixedbread store updated as files change.\n\n4. **Search anything**\n   ```bash\n   mgrep \"where do we set up auth?\" src\u002Flib\n   mgrep -m 25 \"store schema\"\n   ```\n   Searches default to the current working directory unless you pass a path.\n\n**Today, `mgrep` works great on:** code, text, PDFs, images.  \n**Coming soon:** audio & video.\n\n## Using it with Coding Agents\n\n> [!CAUTION]\n> **Background Sync Enabled**: When installed with a coding agent, mgrep runs a\n> background process that syncs your files to enable semantic search. This\n> process starts automatically when you begin a session and stops when your\n> session ends. You can see your current usage in the [Mixedbread\n> platform](https:\u002F\u002Fwww.platform.mixedbread.com\u002F).\n\n> [!NOTE]\n> **Default Limits**: mgrep enforces default limits to ensure optimal performance:\n> - **Maximum file size**: 1MB per file\n> - **Maximum file count**: 1,000 files per directory\n>\n> These limits can be customized via CLI flags (`--max-file-size`, `--max-file-count`),\n> environment variables, or config files. See the [Configuration](#configuration) section for details.\n\nIf you prefer to manually start the file watcher instead of relying on the agent's\nautomatic background sync, you can run:\n\n```bash\nmgrep watch \u002Fpath\u002Fto\u002Fyour\u002Fproject\n```\n\nThis gives you explicit control over when indexing occurs and which directories are watched.\n\n`mgrep` supports assisted installation commands for many agents:\n- `mgrep install-claude-code` for Claude Code\n- `mgrep install-opencode` for OpenCode\n- `mgrep install-codex` for Codex\n- `mgrep install-droid` for Factory Droid\n\nThese commands sign you in (if needed) and add Mixedbread `mgrep` support to the\nagent. After that you only have to start the agent in your project folder, thats\nit.\n\n### More Agents Coming Soon\n\nMore agents (Cursor, Windsurf, etc.) are on the way—this section will grow as soon as each integration lands.\n\n## Making your agent smarter\n\nWe plugged `mgrep` into Claude Code and ran a benchmark of 50 QA tasks to evaluate the economics of `mgrep` against `grep`.\n\n![mgrep benchmark](public\u002Fbench.jpg)\n\nIn our 50-task benchmark, `mgrep`+Claude Code used ~2x fewer tokens than grep-based workflows at similar or better judged quality.\n\n`mgrep` finds the relevant snippets in a few semantic queries first, and the model spends its capacity on reasoning instead of scanning through irrelevant code from endless `grep` attempts. You can [Try it yourself](http:\u002F\u002Fdemo.mgrep.mixedbread.com).\n\n*Note: Win Rate (%) was calculated by using an LLM as a judge.*\n\n## Why we built mgrep\n\n`grep` is an amazing tool. It's lightweight, compatible with just about every machine on the planet, and will reliably surface any potential match within any target folder.\n\nBut grep is **from 1973**, and it carries the limitations of its era: you need exact patterns and it slows down considerably in the cases where you need it most, on large codebases.\n\nWorst of all, if you're looking for deeply-buried critical business logic, you cannot describe it: you have to be able to accurately guess what kind of naming patterns would have been used by the previous generations of engineers at your workplace for `grep` to find it. This will often result in watching a coding agent desperately try hundreds of patterns, filling its token window, and your upcoming invoice, with thousands of tokens. \n\nBut it doesn't have to be this way. Everything else in our toolkit is increasingly tailored to understand us, and so should our search tools. `mgrep` is our way to bring `grep` to 2025, integrating all of the advances in semantic understanding and code-search, without sacrificing anything that has made `grep` such a useful tool. \n\nUnder the hood, `mgrep` is powered by [Mixedbread Search](https:\u002F\u002Fwww.mixedbread.com\u002Fblog\u002Fmixedbread-search), our full-featured search solution. It combines state-of-the-art semantic retrieval models with context-aware parsing and optimized inference methods to provide you with a natural language companion to `grep`. We believe both tools belong in your toolkit: use `grep` for exact matches, `mgrep` for semantic understanding and intent.\n\n\n## When to use what\n\nWe designed `mgrep` to complement `grep`, not replace it. The best code search combines `mgrep` with `grep`.\n\n| Use `grep` (or `ripgrep`) for... | Use `mgrep` for... |\n| --- | --- |\n| **Exact Matches** | **Intent Search** |\n| Symbol tracing, Refactoring, Regex | Code exploration, Feature discovery, Onboarding |\n\n## Web Search\n\n`mgrep` can also search the web alongside your local files. This is useful when\nyou need to find documentation, tutorials, or answers to programming questions\nwithout leaving your terminal.\n\n```bash\n# Search the web and get a summarized answer\nmgrep --web --answer \"How do I integrate a JavaScript runtime into Deno?\"\n\n# Get the urls of the search\nmgrep --web \"best practices for error handling in TypeScript\"\n```\n\nWeb search queries the `mixedbread\u002Fweb` store in addition to your local store, merging results based on relevance. Use `--answer` (or `-a`) to get a concise summary instead of raw results.\n\n## mgrep as Subagent\n\nFor complex questions that require information from multiple sources, `mgrep` can act as a subagent that automatically refines queries and performs multiple searches to find the best answer.\n\n```bash\n# Enable agentic search for complex multi-part questions\nmgrep --agentic \"What are the yearly numbers for 2020, 2021, 2022, 2023, 2024?\"\n\n# Combine with --answer for a synthesized response from multiple sources\nmgrep --agentic -a \"How does authentication work and where is it configured?\"\n```\n\nWhen `--agentic` is enabled, mgrep will:\n- Automatically break down complex queries into sub-queries\n- Perform multiple searches as needed to gather comprehensive results\n- Combine findings from different parts of your codebase\n\nThis is particularly useful for questions that span multiple files or concepts, where a single search might miss important context.\n\n## Commands at a Glance\n\n| Command | Purpose |\n| --- | --- |\n| `mgrep` \u002F `mgrep search \u003Cpattern> [path]` | Natural-language search with many `grep`-style flags (`-i`, `-r`, `-m`...). |\n| `mgrep watch` | Index current repo and keep the Mixedbread store in sync via file watchers. |\n| `mgrep login` & `mgrep logout` | Manage device-based authentication with Mixedbread. |\n| `mgrep install-claude-code` | Authenticate, add the Mixedbread mgrep plugin to Claude Code. |\n| `mgrep install-opencode` | Authenticate and add the Mixedbread mgrep to OpenCode. |\n| `mgrep install-codex` | Authenticate and add the Mixedbread mgrep to Codex. |\n| `mgrep install-droid` | Authenticate and add the Mixedbread mgrep hooks\u002Fskills to Factory Droid. |\n\n### mgrep search\n\n`mgrep search` is the default command. It can be used to search the current\ndirectory for a pattern.\n\n| Option | Description |\n| --- | --- |\n| `-m \u003Cmax_count>` | The maximum number of results to return |\n| `-c`, `--content` | Show content of the results |\n| `-a`, `--answer` | Generate an answer to the question based on the results |\n| `-w`, `--web` | Include web search results alongside local files |\n| `--agentic` | Enable agentic search to automatically refine queries and perform multiple searches |\n| `-s`, `--sync` | Sync the local files to the store before searching |\n| `-d`, `--dry-run` | Dry run the search process (no actual file syncing) |\n| `--no-rerank` | Disable reranking of search results |\n| `--max-file-size \u003Cbytes>` | Maximum file size in bytes to upload (overrides config) |\n| `--max-file-count \u003Ccount>` | Maximum number of files to upload (overrides config) |\n\nAll search options can also be configured via environment variables (see\n[Environment Variables](#environment-variables) section below).\n\n**Examples:**\n```bash\nmgrep \"What code parsers are available?\"  # search in the current directory\nmgrep \"How are chunks defined?\" src\u002Fmodels  # search in the src\u002Fmodels directory\nmgrep -m 10 \"What is the maximum number of concurrent workers in the code parser?\"  # limit the number of results to 10\nmgrep -a \"What code parsers are available?\"  # generate an answer to the question based on the results\nmgrep --web --answer \"How do I integrate a JavaScript runtime into Deno?\"  # search the web and get a summarized answer\n```\n\n### mgrep watch\n\n`mgrep watch` is used to index the current repository and keep the Mixedbread\nstore in sync via file watchers.\n\nIt respects the current `.gitignore`, as well as a `.mgrepignore` file in the\nroot of the repository. The `.mgrepignore` file follows the same syntax as the\n[`.gitignore`](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgitignore) file.\n\n| Option | Description |\n| --- | --- |\n| `-d`, `--dry-run` | Dry run the watch process (no actual file syncing) |\n| `--max-file-size \u003Cbytes>` | Maximum file size in bytes to upload (overrides config) |\n| `--max-file-count \u003Ccount>` | Maximum number of files to upload (overrides config) |\n\n**Examples:**\n```bash\nmgrep watch  # index the current repository and keep the Mixedbread store in sync via file watchers\nmgrep watch --max-file-size 1048576  # limit uploads to files under 1MB\nmgrep watch --max-file-count 5000  # limit sync to 5000 changed files or fewer\n```\n\n## Mixedbread under the hood\n\n- Every file is pushed into a Mixedbread Store using the same SDK your apps get.\n- Searches request top-k matches with Mixedbread reranking enabled by default\n  for tighter relevance (can be disabled with `--no-rerank` or\n  `MGREP_RERANK=0`).\n- Results include relative paths plus contextual hints (line ranges for text, page numbers for PDFs, etc.) for a skim-friendly experience.\n- Because stores are cloud-backed, agents and teammates can query the same corpus without re-uploading.\n\n## Configuration\n\nmgrep can be configured via config files, environment variables, or CLI flags.\n\n### Config File\n\nCreate a `.mgreprc.yaml` (or `.mgreprc.yml`) in your project root for local configuration, or `~\u002F.config\u002Fmgrep\u002Fconfig.yaml` (or `config.yml`) for global configuration.\n\n```yaml\n# Maximum file size in bytes to upload (default: 1MB)\nmaxFileSize: 5242880\n\n# Maximum number of files to sync (upload\u002Fdelete) per operation (default: 1000)\nmaxFileCount: 5000\n```\n\n**Configuration precedence** (highest to lowest):\n1. CLI flags (`--max-file-size`, `--max-file-count`)\n2. Environment variables (`MGREP_MAX_FILE_SIZE`, `MGREP_MAX_FILE_COUNT`)\n3. Local config file (`.mgreprc.yaml` in project directory)\n4. Global config file (`~\u002F.config\u002Fmgrep\u002Fconfig.yaml`)\n5. Default values\n\n### Configuration Tips\n\n- `--store \u003Cname>` lets you isolate workspaces (per repo, per team, per experiment). Stores are created on demand if they do not exist yet.\n- Ignore rules come straight from git, so temp files, build outputs, and vendored deps stay out of your embeddings.\n- `watch` reports progress (`processed \u002F uploaded`) as it scans; leave it running in a terminal tab to keep your store fresh.\n- `search` accepts most `grep`-style switches, and politely ignores anything it cannot support, so existing muscle memory still works.\n\n## Environment Variables\n\nAll search options can be configured via environment variables, which is\nespecially useful for CI\u002FCD pipelines or when you want to set defaults for all\nsearches.\n\n### Authentication & Store\n\n- `MXBAI_API_KEY`: Set this to authenticate without browser login (ideal for CI\u002FCD)\n- `MXBAI_STORE`: Override the default store name (default: `mgrep`)\n\n### Search Options\n\n- `MGREP_MAX_COUNT`: Maximum number of results to return (default: `10`)\n- `MGREP_CONTENT`: Show content of the results (set to `1` or `true` to enable)\n- `MGREP_ANSWER`: Generate an answer based on the results (set to `1` or `true` to enable)\n- `MGREP_WEB`: Include web search results (set to `1` or `true` to enable)\n- `MGREP_AGENTIC`: Enable agentic search for complex multi-source queries (set to `1` or `true` to enable)\n- `MGREP_SYNC`: Sync files before searching (set to `1` or `true` to enable)\n- `MGREP_DRY_RUN`: Enable dry run mode (set to `1` or `true` to enable)\n- `MGREP_RERANK`: Enable reranking of search results (set to `0` or `false` to disable, default: enabled)\n\n### Sync Options\n\n- `MGREP_MAX_FILE_SIZE`: Maximum file size in bytes to upload (default: `1048576` \u002F 1MB)\n- `MGREP_MAX_FILE_COUNT`: Maximum number of files to sync per operation (default: `1000`)\n\n**Examples:**\n```bash\n# Set default max results to 25\nexport MGREP_MAX_COUNT=25\nmgrep \"search query\"\n\n# Always show content in results\nexport MGREP_CONTENT=1\nmgrep \"search query\"\n\n# Disable reranking globally\nexport MGREP_RERANK=0\nmgrep \"search query\"\n\n# Use multiple options together\nexport MGREP_MAX_COUNT=20\nexport MGREP_CONTENT=1\nexport MGREP_ANSWER=1\nmgrep \"search query\"\n```\n\nNote: Command-line options always override environment variables.\n\n## Development\n\n```bash\npnpm install\npnpm build        # or pnpm dev for a quick compile + run\npnpm format       # biome formatting + linting\n```\n\n- The executable lives at `dist\u002Findex.js` (built from TypeScript via `tsc`).\n- Husky is wired via `pnpx husky init` (run `npx husky init` once after cloning).\n- Tests are not wired up yet—`pnpm typecheck` is your best friend before\n  publishing.\n- To connect to a local Mixedbread api set the `export NODE_ENV=development`.\n\n### Testing\n\n```bash\npnpm test\n```\n\nThe tests are written using [bats](https:\u002F\u002Fbats-core.readthedocs.io\u002Fen\u002Fstable\u002F).\n\n## Troubleshooting\n\n- **Login keeps reopening**: run `mgrep logout` to clear cached tokens, then try `mgrep login` again.\n- **Watcher feels noisy**: set `MXBAI_STORE` or pass `--store` to separate experiments, or pause the watcher and restart after large refactors.\n- **Need a fresh store**: delete it from the Mixedbread dashboard, then run `mgrep watch`. It will auto-create a new one.\n\n## Support\n\nFor usage questions, feedback, or other support, please reach out on the [Mixedbread Slack](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fmixedbreadcommunity\u002Fshared_invite\u002Fzt-3kagj5m36-wwM_hryIFby7B2wlcOaHaQ).\n\n## License\n\nApache-2.0. See the [LICENSE](https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0) file for details.\n","mgrep 是一个命令行工具，用于在代码、图像、PDF 等多种文件类型中进行语义搜索。它支持自然语言查询，并且具备多语言和多模态（即将支持音频和视频）的搜索能力。用户可以通过 `--web` 选项同时搜索本地文件和网络资源。mgrep 还提供了平滑的后台索引功能 `mgrep watch`，能够自动检测并更新 Git 仓库中的变化。此外，该工具设计了友好的设备登录流程以及与编码代理的良好集成，旨在成为对人类和自动化代理都友好的辅助工具。适用于需要高效查找和管理大量复杂数据的开发人员或团队。",2,"2026-06-11 03:46:50","high_star"]