Build a local code-completion setup: an inference server, a repository index, and an editor client. Nothing leaves the machine. Inference server: run an open code model locally through llama.cpp or Ollama, exposing an OpenAI-compatible completion endpoint so any editor client that speaks that protocol can use it. Support at least two model sizes so the user can trade quality against latency, and report tokens per second and time to first token per request — completion is unusable above roughly 300 milliseconds to first token, and the user needs to see where their hardware sits. Fill-in-the-middle, which most naive setups get wrong: code completion is not text continuation. Use the model's own FIM prompt format, giving it the prefix before the cursor and the suffix after it, so a completion inserted mid-function closes its brackets and respects what follows. A completion engine that only sees the text before the cursor produces code that does not compile, and this is the single most common failure of a homegrown setup. Repository context: build a local index of the workspace. On each completion request, assemble context from the current file's prefix and suffix, plus the most relevant snippets from elsewhere in the repository — recently edited files, files imported by the current one, and definitions of symbols appearing near the cursor. Retrieve by a combination of symbol match and embedding similarity, computed locally. Cap the assembled context to the model's real window and show what was included when the user asks. Editor client: implement as a Language Server Protocol server providing inline completion, so any LSP-capable editor works without a per-editor plugin. Debounce requests, cancel in-flight requests when the user keeps typing, and cache by a hash of the assembled context. Chat: a side panel that sends the selected code plus retrieved repository context to the same local model, for explanation and refactoring. Same model, same server, same privacy property. Honesty about quality, built into the tool: ship a benchmark command that runs a small set of completion tasks against the configured model and reports acceptance-shaped metrics, so the user can compare model sizes on their own hardware rather than guessing. State in the README that local models of laptop size are meaningfully behind frontier hosted models on completion quality, and that this build's argument is privacy and cost, not quality. Out of scope: any hosted API or fallback, telemetry of any kind, training or fine-tuning a model, and enterprise policy or audit features.