Filesift

io.github.roshunsunder由 GitHub 账号 roshunsunder 发布v1.0.1更新于 Oct 24, 2026

Local file search for AI agents — semantic + keyword indexing over your codebase.

概览

AI 生成的概览

让编程助手为本地代码库建立索引,并通过关键词与语义混合搜索按意图查找代码。

可以做什么
FileSift 为本地项目目录建立索引,并通过 STDIO 暴露四个 MCP 工具:filesift_search 用于自然语言查询,filesift_find_related 用于查找通过导入或语义相似度关联的文件,filesift_index 用于建立索引,filesift_status 用于查看索引状态。搜索结合 BM25 关键词匹配与 FAISS 向量搜索,并通过 Reciprocal Rank Fusion 合并结果。后台守护进程将索引加载到内存以加快重复搜索,索引存放在每个被索引项目的 .filesift 目录中。
适用场景
适合助手需要按代码功能而非精确字符串定位相关代码的场景,例如查找认证中间件或重试逻辑。适用于原本需要 grep 并通读整个文件的编程助手,可节省上下文与 token。最适合助手已在其中工作的本地项目。
运行要求
作为本地 Python 包运行,通过 pip 安装 filesift,提供 STDIO 方式的 filesift-mcp 命令。未声明账户、API 密钥或环境变量。需要访问被索引项目的本地磁盘,并具备运行嵌入模型和守护进程的资源。
安装前请注意
建立索引会在每个被索引项目中写入 .filesift 目录,建议配置忽略规则并排除版本控制。README 称全部在本地运行、代码不会离开本机,但在敏感代码库上使用前应核实嵌入模型与守护进程的行为。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Filesift,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[FileSift]

FileSift

A local, open-source utility that helps AI coding agents intelligently search and understand codebases.

[PyPI] [Python]


FileSift lets your AI coding agent search across a codebase based on what code does, rather than what it looks like. Instead of sifting through entire files after a grep, your agent can jump straight to the most relevant code using natural language queries like "authentication middleware" or "database connection pooling". Everything runs locally on your machine — your code never leaves your environment.

Key benefits:

  • Smarter search — hybrid keyword + semantic search finds code by intent, not just string matching
  • Less context wasted — agents get pointed to the right files immediately, saving token budget on exploration

Installation

bash
pip install filesift

Usage

There are three ways to use FileSift, depending on your workflow:

1. CLI

The most straightforward approach. Good for testing queries, managing indexes, and configuring settings.

bash
# Index a projectfilesift index /path/to/your/project
# Search for files by what they dofilesift find "authentication and session handling"
# Search in a specific directoryfilesift find "retry logic for API calls" --path /path/to/project

2. MCP Server

Installing FileSift also provides a filesift-mcp command — a lightweight MCP server that exposes indexing and search as tools over STDIO. This works with most popular coding agents including Claude Code, Cursor, Copilot, and more.

Add it to your agent's MCP configuration:

json
{  "mcpServers": {    "filesift": {      "command": "filesift-mcp"    }  }}

The MCP server exposes four tools:

  • filesift_search — search an indexed codebase by natural language query
  • filesift_find_related — find files related to a given file via imports and semantic similarity
  • filesift_index — index a directory to enable searching
  • filesift_status — check indexing status of a directory

3. Skills

FileSift ships with a search-codebase skill that can be installed directly into your coding agent's skill directory. This lets the agent interact with the FileSift CLI through bash, without requiring MCP support.

bash
# Install for Claude Code (default)filesift skill install
# Install for other agentsfilesift skill install --agent cursorfilesift skill install --agent copilotfilesift skill install --agent codex

Supported agents: claude, codex, cursor, copilot, gemini, roo, windsurf.

How It Works

FileSift uses a daemonized embedding model to keep searches fast. At its core, it generates embeddings from code descriptions and performs searches against small vector stores called indexes.

  1. Indexing — filesift index first builds a fast keyword/structural index (completes in seconds), then triggers background semantic indexing that generates embeddings for each file.

  2. Daemon — A background daemon loads indexes into memory and automatically shuts down after a configurable period of inactivity. After the first cold-start search, subsequent searches are near-instant.

  3. Search — Queries are matched using both keyword (BM25) and semantic (FAISS) search, then combined via Reciprocal Rank Fusion for the best of both approaches.

Indexes are stored in a .filesift directory within each indexed project.

Configuration

FileSift uses a TOML configuration file, manageable via the CLI:

bash
# View all settingsfilesift config list --all
# Set a valuefilesift config set search.MAX_RESULTS 20filesift config set daemon.INACTIVITY_TIMEOUT 600
# Manage ignore patternsfilesift config add-ignore "node_modules" ".venv"filesift config list-ignore

Configuration sections: search, indexing, daemon, models, paths.

Contributing

Contributions are welcome! To get started:

bash
git clone https://github.com/roshunsunder/filesift.gitcd filesiftpip install -e .
  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes and open a pull request

License

Apache 2.0 — see LICENSE for details.

来源:README.md,提交 7a14f26

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分