
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
embgrep
Advanced tools
Local semantic search — embedding-powered grep for files, zero external services.
Search your codebase and documentation by meaning, not just keywords. embgrep indexes files into local embeddings and lets you run semantic queries — no API keys, no cloud services, no vector database servers.
.py, .js, .ts, .java, .go, .rs, .md, .txt, .yaml, .json, .toml, and morepip install embgrep # core (fastembed + numpy)
pip install embgrep[cli] # + click/rich CLI
pip install embgrep[mcp] # + FastMCP server
pip install embgrep[all] # everything
from embgrep import EmbGrep
eg = EmbGrep()
# Index a directory
eg.index("./my-project", patterns=["*.py", "*.md"])
# Semantic search
results = eg.search("database connection pooling", top_k=5)
for r in results:
print(f"{r.file_path}:{r.line_start}-{r.line_end} (score: {r.score:.4f})")
print(f" {r.chunk_text[:80]}...")
# Incremental update (only changed files)
eg.update()
# Index statistics
status = eg.status()
print(f"{status.total_files} files, {status.total_chunks} chunks, {status.index_size_mb} MB")
eg.close()
# Index a project
embgrep index ./my-project --patterns "*.py,*.md"
# Search
embgrep search "error handling patterns"
# Filter by file type
embgrep search "async database query" --path-filter "%.py"
# Check status
embgrep status
# Update changed files
embgrep update
import embgrep
embgrep.index("./src")
results = embgrep.search("authentication middleware")
status = embgrep.status()
embgrep.update()
Add to your Claude Desktop / MCP client configuration:
{
"mcpServers": {
"embgrep": {
"command": "embgrep-mcp"
}
}
}
Or with uvx:
{
"mcpServers": {
"embgrep": {
"command": "uvx",
"args": ["--from", "embgrep[mcp]", "embgrep-mcp"]
}
}
}
| Tool | Description |
|---|---|
index_directory | Index files in a directory for semantic search |
semantic_search | Search indexed files using natural language |
index_status | Get current index statistics |
update_index | Incremental update — re-index changed files only |
Chunking — Files are split into semantically meaningful chunks:
.py, .js, .ts, etc.): split by function/class boundaries.md, .txt): split by headings or paragraph breaksEmbedding — Each chunk is converted to a 384-dimensional vector using BGE-small-en-v1.5 via ONNX Runtime (no PyTorch needed)
Storage — Embeddings are stored as BLOBs in a local SQLite database
Search — Query text is embedded and compared against all chunks using cosine similarity
| Parameter | Default | Description |
|---|---|---|
db_path | ~/.local/share/embgrep/embgrep.db | SQLite database location |
model | BAAI/bge-small-en-v1.5 | fastembed model name |
max_chunk_size | 1000 chars | Maximum chunk size for fixed-size splitting |
top_k | 5 | Number of search results |
| Package | Description |
|---|---|
| markgrab | HTML/YouTube/PDF/DOCX to LLM-ready markdown |
| snapgrab | URL to screenshot + metadata |
| docpick | OCR + LLM document structure extraction |
| browsegrab | Local LLM browser agent |
| feedkit | RSS feed collection + MCP |
| embgrep | Local semantic search for files |
MIT
FAQs
Local semantic search — embedding-powered grep for files, zero external services.
The pypi package embgrep receives a total of 32 weekly downloads. As such, embgrep popularity was classified as not popular.
We found that embgrep demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.