Haypile

io.github.BenyD由 GitHub 帳號 BenyD 發布v0.3.1更新於 Oct 25, 2026

Hybrid search over your local documents, with file and page citations. One binary, fully local.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

Haypile 是本地文件搜尋伺服器,為資料夾建立索引,並透過 MCP 讓助理從你自己的檔案取得附引用的段落。

可以做什麼
對已索引文件進行語意與關鍵字混合檢索,回傳附檔案與頁碼引用的排序段落(search_documents)。列出目前索引的資料夾與文件(list_sources)。索引資料夾與檔案,並透過檔案監看保持更新。使用本機或自選的 OpenAI 相容模型,依據檢索到的段落回答問題。
適用情境
當助理需要根據個人或工作文件(例如合約、案卷、論文、專案筆記)回答問題,且應引用來源而非猜測時使用。適合希望檢索留在本機、不把文件上傳到雲端服務的使用者。
執行需求
以發行版二進位檔或套件管理器安裝的本機程序,在桌面環境執行。守護程序只監聽 localhost,透過 MCP Streamable HTTP 或 stdio 存取。文字索引可完全離線運作;掃描版 PDF 需要本機視覺模型進行 OCR。產生答案需要本機 OpenAI 相容伺服器,或你提供的端點與金鑰。
安裝前請注意
索引與檢索都在本機,但若選擇以雲端端點產生答案,該問題的檢索段落會傳送到你指定的端點並使用你的金鑰。對非 localhost 的純 http 位址會拒絕金鑰。索引、移除資料夾與重新同步會改變本機索引狀態。付費版本被描述為未來計畫,目前並不存在。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Haypile,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[圖片]

Haypile

Private document search, for you and your agents. One binary that watches your folders, indexes every document, and hands your agent the right passages over MCP, each with a file and page citation. Nothing ever leaves your machine.

Everyone says finding information in your files is like finding a needle in a haystack. Haypile is the haystack that finds its own needles.

[hay demo: add a folder, search by meaning, verify zero outbound connections]

sh
brew install BenyD/tap/hayhay add ~/Documentsclaude mcp add --transport http haypile http://localhost:11500/mcp

That is the whole setup. Claude Code (or Cursor, or anything that speaks MCP) can now search everything you indexed: search_documents returns ranked passages with citations, and the agent answers from them instead of guessing.

It is a full standalone CLI too:

sh
hay search "termination clause"hay ask "what did the Meridian contract say about termination?"

Search understands meaning, not just words: "agreement cancellation" finds termination clauses. Exact identifiers still match exactly. Every result cites its source file and page.

Install

sh
brew install BenyD/tap/hay

Or grab a binary from releases, or run the install script:

sh
curl -fsSL haypile.sh | sh

On Windows, run this in PowerShell:

powershell
irm https://haypile.sh/install.ps1 | iex

One binary, around 56MB, with the embedding model inside. No Python, no Docker, no vector database, no model downloads, no network. Text documents index fully offline; scanned PDFs need a local vision model for OCR (hay llm setup).

Why

An agent can open any file you point it at. Finding the right one is the problem: grep matches words, not meaning, and a question about termination clauses does not contain the words the contract used. Reading whole documents to find one passage spends the context window the task needed. Cloud document tools fix this by uploading everything to someone else's computer, and self-hosted RAG stacks fix it with Python environments, Docker, and a vector database to babysit.

Haypile is the missing option: one binary, point it at folders, done.

  • Agent-ready. MCP and REST on localhost:11500. search_documents gives Claude Code, Cursor, or your own scripts cited passages from your documents.
  • Hybrid search. Semantic and keyword, merged. Paraphrases match by meaning; case numbers match exactly.
  • Citations always. Every result and every answer points to the source file and page.
  • Always fresh. Folders are watched. Save a file and it is searchable in seconds.
  • Verifiably private. See below.

Trust commitments

These are versioned with the code and will not be quietly redrawn:

  1. The open/paid boundary is declared upfront. Open forever (AGPL-3.0): indexing, search, ask, REST API, MCP, CLI, and the upcoming single-user web UI. The full single-user product, no feature hostages. Paid (later): team features such as auth, roles, audit logs, shared indexes, and a hosted version.
  2. "Zero external connections" is a verifiable feature, not a claim. hay status reports outbound connections; the target is 0. No telemetry. If that ever changes it will be opt-in, documented loudly, and off by default.
  3. No silent network behavior. A local-first tool must never phone home to keep working.
  4. All development happens in this public repo. No private-repo surprises.

How it works

folders -> watcher -> extract (pdf/docx/pptx/md/txt/html/mbox) -> chunk -> embed                                                            |        you <- citations <- RRF merge <- FTS5 + vector search <- SQLite (one file)

Everything lives in a single SQLite database on your disk, and search is fully self-contained: the embedding model ships inside the binary. Answers (hay ask) are generated by whatever OpenAI-compatible local server you already run (Ollama, LM Studio, llama.cpp, Jan). Haypile itself ships no LLM and makes no network calls.

Set up a folder properly: hay init

For a folder you work in (a case folder, a project, a paper archive), hay init writes a per-folder config and wires everything up in one go:

sh
cd ~/cases/acme-litigationhay init          # three short questions, all with sensible defaults

It creates .haypile.yml (tag and exclude patterns), indexes the folder, optionally writes .mcp.json so Claude Code and Cursor can search these docs, and offers hay llm setup if you do not have a local LLM yet. hay init --yes runs unattended.

Edit .haypile.yml by hand anytime. The daemon notices and re-syncs the index within seconds:

yaml
tag: acme-litigationexclude:  - drafts/**  - "*.bak"

Ask questions (bring your own LLM)

hay ask retrieves the most relevant passages and has a local LLM answer from them, with citations:

sh
hay ask "what did the Meridian contract say about termination?"

Generation uses any OpenAI-compatible server you already run (Ollama, LM Studio, llama.cpp, Jan), auto-detected on their usual ports, or set explicitly with --endpoint and --model. Without one, hay ask explains and shows the top passages instead. Search never needs an LLM.

Prefer a cloud model for answers? Bring your own key:

sh
hay ask --endpoint https://api.example.com/v1 --key sk-... "what changed in the lease?"

The boundary stays sharp: your documents are indexed locally, always. Opting in sends only the retrieved passages for that one question, to an endpoint you chose, with your key (HAYPILE_LLM_API_KEY works too). Keys are refused over plain http to anything that is not localhost.

No local LLM yet? One guided command gets you there:

sh
hay llm setup    # installs and starts Ollama, pulls a model, asks before every download

Use from Claude Code, Cursor, or your own tools

The daemon exposes MCP (Streamable HTTP) and REST on localhost:11500:

sh
# Claude Codeclaude mcp add --transport http haypile http://localhost:11500/mcp
# Anything that prefers launching a process (stdio transport)#   command: hay   args: ["mcp-stdio"]
# Plain RESTcurl -X POST localhost:11500/api/query -d '{"query": "termination clause"}'

Tools exposed: search_documents (hybrid search with citations) and list_sources. The daemon starts automatically on hay add and only ever listens on localhost.

Commands

hay init [folder]        per-folder setup: config, index, editor wiringhay add <path>           index a folder or file and watch it for changeshay search "<query>"     hybrid retrieval, results with citationshay ask "<question>"     answer from your documents, with cited sourceshay list                 indexed folders and document countshay remove <path>        un-index a folderhay status               daemon state, model info, outbound connections (target: 0)hay web                  open the local web UI in your browserhay serve                run the daemon (REST API + MCP on localhost:11500)hay llm setup            guided local LLM setup for hay ask

Roadmap

VersionScope
v0.x (now)CLI, REST API, MCP server, hay web local UI. Markdown, text, PDF, docx, pptx, HTML, mbox email. Scanned-PDF OCR via your local vision LLM.
v1.xBundled OCR (no LLM required), Windows installer polish
v2Optional larger embedding models, ANN index for very large corpora
ProTeam layer for offices: auth, roles, audit logs, shared indexes (paid)

Roadmap, decisions, and trust commitments in detail: docs/ROADMAP.md.

Development

sh
go build ./cmd/hay     # build the binarygo test ./... -race    # run tests (green before any merge)

Semantic search uses an embedding model that release builds carry inside the binary. Dev builds load it from disk instead, so the weights stay out of git:

sh
./hack/fetch-model.sh                    # one-time download (also quantizes)go build -tags bundled ./cmd/hay         # release-style: model in the binaryHAYPILE_MODEL_PATH=internal/embed/bundled/model.safetensors ./hay   # dev

Without the model, everything still works in keyword-only mode.

The web UI (hay web) lives in webui/ as a small Vite + Preact app; its built output is committed under internal/webui/dist and embedded in the binary, so go build alone always ships the current UI. Touch the UI with:

sh
cd webui && npm installnpm run dev      # live dev server, proxies /api to a running daemonnpm run build    # writes internal/webui/dist (commit the result)

Retrieval quality is measured, not vibes: eval/ holds a query set with expected results that runs on every retrieval-affecting change.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md first. It covers the dev workflow, the rule that the privacy contract (zero outbound, bundled model, localhost only) must stay intact, how contributions are licensed, and the DCO sign-off (git commit -s) that CI enforces.

Security

Found a vulnerability? Please report it privately, not as a public issue. See SECURITY.md for the disclosure process and what is in scope.

License

AGPL-3.0. Free forever for individuals. The AGPL keeps it free for every actual user while requiring anyone offering Haypile as a service to open-source their changes.

來源:README.md,提交 45faf84

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分