Haypile
Reference

CLI commands

Every hay command, flag, and environment variable.

The binary is hay. Any command that needs the daemon starts it automatically; you never manage it by hand.

hay init [folder]

Per-folder setup: writes .haypile.yml, indexes the folder, optionally writes .mcp.json and offers LLM setup. Defaults to the current directory.

FlagMeaningDefault
--tagTag for filtered searchfolder name
--excludeComma-separated glob patternsnone
--mcpWrite .mcp.json for MCP clientstrue
--yesAccept all defaults, no promptsfalse

hay add <path>

Indexes a folder (recursively) or a single file, and watches it for changes. Unchanged files are skipped on re-add; identical content is never embedded twice, even across files.

FlagMeaningDefault
--tagTag for filtered searchfrom .haypile.yml, else none

Supported formats: .pdf, .docx, .md, .markdown, .txt. Hidden directories and excluded patterns are skipped. A file that fails to parse is counted and skipped; it never aborts the pass.

hay search "<query>"

Hybrid retrieval: semantic and keyword legs run in parallel and the rankings are fused. Results cite file and page.

FlagMeaningDefault
--tagOnly search folders with this tagall
--limitMaximum results10

hay ask "<question>"

Retrieves relevant passages and has a local LLM answer from them with citations. Requires an OpenAI-compatible server (auto-detected); without one it prints the top passages instead.

FlagMeaningDefault
--endpointOpenAI-compatible base URLauto-detect
--modelModel to requestfirst chat model listed
--tagOnly retrieve from folders with this tagall
--limitPassages given to the model6

hay list

Indexed folders with file and chunk counts.

hay remove <path>

Un-indexes a source and stops watching it. The path must match what was added (see hay list).

hay status

Daemon state, index location, counts, model, queued indexing jobs, and the measured outbound connection count.

hay serve

Runs the daemon in the foreground: REST API and MCP on localhost:11500, plus the folder watcher. Usually you never run this yourself.

FlagMeaningDefault
--hostBind address127.0.0.1
--portAPI port11500

Binding beyond localhost prints a loud warning: the API has no auth in v0.

hay llm setup

Guided path to a working local LLM for hay ask: detects running servers, installs and starts Ollama with your confirmation, downloads a recommended model with your confirmation, verifies with a real request.

FlagMeaningDefault
--modelModel to download if none presentllama3.2:3b
--yesAnswer yes to all promptsfalse

hay mcp-stdio

MCP stdio transport for clients that launch a process. Bridges stdin/stdout to the daemon's /mcp endpoint, auto-starting the daemon if needed.

Environment variables

VariableMeaning
HAYPILE_DIRData directory (index database, daemon runtime file). Default ~/.haypile
HAYPILE_ADDRDaemon listen address, overrides host/port flags
HAYPILE_NO_DAEMON1 disables daemon auto-start and routing (direct index access)
HAYPILE_LLM_ENDPOINTOpenAI-compatible base URL for hay ask
HAYPILE_LLM_MODELModel name for hay ask
HAYPILE_EMBED_ENDPOINTOptional external embedding server (replaces the bundled model)
HAYPILE_EMBED_MODELModel name for the embedding endpoint
HAYPILE_MODEL_PATHDev builds: path to embedding weights on disk

On this page