A thin front-end to your local-first granary cluster, alongside the CLI, GUI, and TUI. Ask the MoE router, query the knowledge brain, and see the board — all against local models (Ollama / llama.cpp / LiteLLM). No cloud.
Commands (Cmd/Ctrl-Shift-P)
- granary: Ask the cluster (infer) — routes your prompt through the MoE (
granary infer). - granary: Ask about the selection — right-click a code selection → ask about it.
- granary: Query the knowledge brain — grounded, cited retrieval (
granary knowledge query), abstains when unsure. - granary: Ask the silo — search your local data brain (
granary grainsilo ask): a grounded answer, or an honest "no confident match" instead of a guess. - granary: Show the board / List persona agents / Cluster status.
- granary: Register as an MCP server — writes
.vscode/mcp.jsonso MCP-aware chat/agent extensions get granary's tools (knowledge_search,knowledge_query,agents_list,agents_ask).
Two ways it talks to granary
- CLI (default) — the commands above shell out to the
granaryCLI. Works everywhere. - MCP — granary already speaks MCP (
granary mcp serve, stdio). Run granary: Register as an MCP server and any MCP host (VS Code's built-in MCP, Copilot Chat, Claude Dev, etc.) can call granary's tools directly. The generated.vscode/mcp.json:{ "servers": { "granary": { "command": "granary", "args": ["mcp", "serve"] } } }
Settings
granary.command— how to invoke granary. Defaultgranary. Set to an absolute venv path (/…/granary-harness/.venv/bin/granary) orpython -m granaryifgranaryisn't on PATH.granary.ground— ground Ask answers in the indexed repo (RAG).granary.knowledgeNamespace— optional namespace(s) for knowledge queries.
Run it (dev)
code editors/vscode(open this folder).- Press F5 → an Extension Development Host opens with the extension loaded.
- Make sure
granaryruns in a terminal first (granary status); setgranary.commandif needed.
Package (optional)
npm i -g @vscode/vsce && vsce package → a .vsix you can install with
Extensions: Install from VSIX. (Plain JS — no build/bundle step.)