
momokun7/xgrep
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Ultra-fast 지수 코드 검색 엔진 - 반복 된 검색에 ripgrep보다 빠른, zoekt보다 더 가벼운. AI Agent를 위한 내장 MCP 서버. 또한 빠른 파일 찾는 (fd/find 대안).
개요
Ultra-fast 지수 코드 검색 엔진 MCP 서버 AI 코딩 도구. trigram 거꾸로 된 인덱스를 미리 빌드 한 다음 milliseconds에서 검색합니다. 큰 코드베이스에 대한 반복 된 검색에 대한 설계 - 인간과 AI 에이전트와. - — trigram inverted index는 ripgrep보다 246x의 빠른 검색을 반복합니다. --find mode locates files 2-15x는 fd보다 빠릅니다. - - AI 코딩 도구 (Claude Code, Cursor, etc.) - - --format llm은 언어 태그, 컨텍스트 라인 및 토큰 인식 truncation로 Markdown을 생성합니다. - 파일 만 변경 (----changed), 최근 1 자리 (gifore). --format llm은 언어 태그, 컨텍스트 라인 및 토큰 인식 truncation으로 Markdown을 생성합니다. 인덱스는 첫 번째 검색에서 자동으로 빌드 - - 마지막 인덱스 빌드가 모든 검색에 재사용되기 때문에 편집 된 파일; 리눅스에서 xg는 트리를 볼 수 있도록이 체크 비용 ~0.
개요(AI 번역)
Ultra-fast 지수 코드 검색 엔진 MCP 서버 AI 코딩 도구.
trigram 거꾸로 된 인덱스를 미리 빌드 한 다음 milliseconds에서 검색합니다. 큰 코드베이스에 대한 반복 된 검색에 대한 설계 - 인간과 AI 에이전트와.
특징
-Indexed search — trigram inverted 색인은 ripgrep 보다는 더 빠른 2-46x를 반복했습니다
- File discovery -
--find모드는 파일 2-15x를 fd보다 빠르게 찾습니다. - **MCP 서버 ** - AI 코딩 도구 (Claude Code, Cursor 등)의 내장 모델 Context Protocol 서버
-LLM-optimized output —
--format llm는 언어 태그, 컨텍스트 라인, 토큰 인식 truncation로 Markdown을 생성합니다. - Git-aware - 변경된 파일(
--changed), 최근 커밋(--since 1h]), 존중.gitignore] - Zero config - 화물/npm/pip를 통해 설치, 그 후
xg "pattern". 인덱스는 첫번째 검색에서 자동으로 구축 -Always fresh - 마지막 인덱스 빌드가 모든 검색에 재처리되었기 때문에 편집된 파일; Linux,xg serve트리를 볼 수 있으므로 이 체크 비용 ~0.1ms
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
xgrep
Ultra-fast indexed code search engine with MCP server for AI coding tools.
Pre-builds a trigram inverted index, then searches in milliseconds. Designed for repeated searches on large codebases — by humans and AI agents alike.
Features
- Indexed search — trigram inverted index makes repeated searches 2-46x faster than ripgrep
- File discovery —
--findmode locates files 2-15x faster than fd - MCP server — built-in Model Context Protocol server for AI coding tools (Claude Code, Cursor, etc.)
- LLM-optimized output —
--format llmproduces Markdown with language tags, context lines, and token-aware truncation - Git-aware — search only changed files (
--changed), recent commits (--since 1h), respects.gitignore - Zero config — install via cargo/npm/pip, then
xg "pattern". Index builds automatically on first search - Always fresh — files edited since the last index build are rescanned on every search; on Linux,
xg servewatches the tree so this check costs ~0.1ms - Syntax-aware — tree-sitter outlines (
--outline), enclosing-block results (--expand block), definitions, references and a repo map for Rust, Python, JS/TS, Go, Java, C/C++ and Ruby - Boolean and history search — file-level
--and/--not, search insidegit diff(--in-diff) or commit messages (--log)
Why xgrep?
| ripgrep | zoekt | xgrep | |
|---|---|---|---|
| Setup | None | Server required | None (cargo/npm/pip) |
| First search | Instant | After server start | Auto-builds index |
| Repeated search (Linux kernel) | 1,687ms | 170ms (server) | 37ms |
| File discovery (next.js, 26K files) | N/A | N/A | 9ms (fd: 191ms) |
| Index size | N/A | 155% of source | ~13% of source (+6% build-only sidecar) |
| AI agent integration | None | None | MCP server built-in |
xgrep is not a ripgrep replacement. Use ripgrep for one-off searches. Use xgrep when you search the same codebase repeatedly — the index pays for itself after ~2 searches.
Installation
Choose your package manager:
# Rust (recommended — native binary, no runtime)
cargo install xgrep-search # Requires Rust 1.85+
# npm (Node.js 18+)
npm install -g xgrep
# pip (Python 3.8+)
pip install xgrep-search
Prebuilt binaries are also available on the Releases page.
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"xgrep": {
"command": "xg",
"args": ["serve"]
}
}
}