Offline AI coding assistant for VS Code — private, air-gapped, self-hosted
How to run a fully offline AI coding assistant in VS Code with LocalPilot — no internet, no accounts, no telemetry. Works on air-gapped machines and in regulated environments.
Teams in finance, healthcare, defence and anyone with an NDA need an assistant whose data path they can audit. LocalPilot’s data path is one line long: VS Code → your model server.
Zero-network checklist
- Model server on the same machine or LAN — Ollama, LM Studio, llama.cpp
llama-serveror vLLM. All run without internet once models are downloaded. - LocalPilot installed from the VSIX — no activation call-home, no update checks, no telemetry. Verify with
SHA256SUMS.txtfrom the release. - Web tools off — set
localpilot.approvals.networktoneverto hard-blockweb_search,web_fetchand MCP network tools. - Approvals on — keep
localpilot.approvals.terminalataskso every shell command is reviewed. - Audit what changed — the Agents panel lists every file each session touched; Undo restores pre-agent content.
// settings.json for an air-gapped workstation
{
"localpilot.providers": [{ "id": "ollama", "type": "ollama", "baseUrl": "http://127.0.0.1:11434" }],
"localpilot.approvals.network": "never",
"localpilot.approvals.terminal": "ask",
"localpilot.webSearch.provider": "searxng" // irrelevant when network is 'never', kept explicit
}
Sizing hardware
LocalPilot does this for you: Settings → Models reads RAM, cores and GPU memory, shows a model budget, and marks every catalog size fits / tight / too big. Automatic setup starts with the smallest useful model and leaves bigger ones as an explicit upgrade. As a rule of thumb:
| Setup | Comfortable models |
|---|---|
| 8 GB laptop | qwen2.5-coder:3b + qwen2.5-coder:1.5b for completions |
| MacBook Pro M-series 16–24 GB | qwen2.5-coder:7b, qwen2.5-coder:14b (q4), gemma3:4b for screenshots |
| 32–64 GB unified / 24 GB GPU | qwen2.5-coder:32b, devstral, qwen3:32b, gpt-oss:20b |
| Shared GPU server (vLLM) | 32B–72B models for the whole team, OpenAI-compatible endpoint |
Pre-download models before going offline (ollama pull … or the catalog’s Install button); the Ollama installer itself needs network once.
Team roll-out
- Serve one vLLM or Ollama endpoint on the LAN and point every developer’s
localpilot.providersat it. - Commit
AGENTS.md/.localpilot/rules.mdand.localpilot/skills/to the repo so every agent follows the same conventions. - Pin the extension version by distributing the VSIX internally; releases are reproducible from the tagged source.