← 返回
AI智能 中文

semfind

Semantic search over local text files using embeddings. Use when grep/ripgrep fails to find relevant results because the exact wording is unknown, or when se...
利用嵌入技术对本地文本文件进行语义搜索。适用于因不知道确切措辞导致 grep/ripgrep 无法找到相关结果的情况,或用于进行语义搜索。
paperboardofficial
AI智能 clawhub v0.1.2 1 版本 99882.8 Key: 无需
★ 0
Stars
📥 852
下载
💾 26
安装
1
版本
#latest

概述

semfind

Semantic grep for the terminal. Searches files by meaning using local embeddings (BAAI/bge-small-en-v1.5 + FAISS). No API keys needed.

When to reach for semfind

  1. grep or ripgrep returned no results or irrelevant results
  2. You don't know the exact wording of what you're looking for
  3. You want to search by concept/meaning rather than exact text

Do NOT use semfind when grep works — grep is instant and has zero overhead.

Install

pip install semfind

First run downloads a ~65MB model (~10-30s). Subsequent runs use the cached model.

Usage

# Basic search
semfind "deployment issue" logs.md

# Search multiple files, top 3 results
semfind "permission error" memory/*.md -k 3

# With context lines
semfind "database migration" notes.md -n 2

# Force re-index after file changes
semfind "query" file.md --reindex

# Minimum similarity threshold
semfind "auth bug" *.md -m 0.5

Options

FlagDescriptionDefault
----------------------------
-k, --top-kNumber of results5
-n, --contextContext lines before/after0
-m, --max-distanceMinimum similarity scorenone
--reindexForce re-embedfalse
--no-cacheSkip embedding cachefalse

Output format

Grep-like with similarity scores:

file.md:9: [2026-01-15] Fixed docker build with missing env vars  (0.796)
file.md:3: [2026-01-17] Agent couldn't write to /var/log          (0.689)

Higher scores (closer to 1.0) mean stronger semantic match.

Resource usage

  • ~250MB RAM while running, freed immediately on exit
  • ~65MB model cached in /tmp/fastembed_cache/
  • ~2s first query (model load), ~14ms cached queries
  • Embedding cache in ~/.cache/semfind/, auto-invalidates on file changes

Workflow pattern

# Step 1: Try grep first
grep "deployment" memory/*.md

# Step 2: If grep fails, use semfind
semfind "something went wrong with the deployment" memory/*.md -k 5

版本历史

共 1 个版本

  • v0.1.2 当前
    2026-03-29 11:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 837 📥 213,303
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,362 📥 318,768
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,005