AI-powered code completion and chat assistance using local Ollama or OpenWebUI. A free, open-source VS Code extension that runs entirely on your machine — no cloud, no telemetry, no subscription.
- Inline Code Completions — real-time ghost-text suggestions as you type, powered by FIM-capable models
- Chat Sidebar — Copilot-style sidebar chat with persistent sessions, search, and markdown rendering
- Agent Mode — autonomous coding agent that reads/writes files, runs terminal commands, and iterates until the task is done
- Edit Mode — describe edits in natural language, get code changes applied to your selection
- Command Approval — terminal commands and sensitive file edits require explicit approval with editable commands and side-by-side diffs
- Files Changed Widget — review all agent-modified files with per-file diff stats, Keep/Undo actions, and cross-file hunk navigation
- Inline Change Review — green/red line decorations with CodeLens Keep/Undo/Navigate actions directly in the editor
- Session History — all conversations stored locally with SQLite (sessions) and LanceDB (messages + semantic search)
- OpenWebUI Support — connect to remote instances with bearer token authentication (stored in VS Code's encrypted secret storage)
-
Install and start Ollama:
curl -fsSL https://ollama.ai/install.sh | sh ollama serve -
Pull a model:
ollama pull qwen2.5-coder:7b
-
Install the extension (from source):
git clone https://github.com/markkr125/ollama-agents.git cd ollama-copilot npm install npm run compile -
Press F5 in VS Code to launch the Extension Development Host
-
Click the robot icon in the Activity Bar to open the chat sidebar
See docs/getting-started.md for the full setup guide.
| Guide | Description |
|---|---|
| Getting Started | Install Ollama, install the extension, first-run setup |
| Configuration | All settings, per-mode config, model recommendations |
| Authentication | Bearer tokens for OpenWebUI |
| Chat & Modes | Agent mode, chat mode, edit mode — how each works |
| Testing | Dual-harness architecture, running tests, adding tests |
| Troubleshooting | Common errors and how to fix them |
| Command | Description |
|---|---|
Ollama Copilot: Select Model |
Choose the active model |
Ollama Copilot: Set Bearer Token |
Configure OpenWebUI authentication |
Ollama Copilot: Setup Wizard |
Open the settings page |
Ollama Copilot: Edit with Instructions |
Transform selected code with AI |
- VS Code ≥ 1.93.0
- Ollama running locally — or a remote OpenWebUI instance
- Node.js ≥ 20 (for building from source)
npm install # Install dependencies
npm run compile # Build webview (Vite) + extension (Webpack)
npm run watch # Watch mode for development
npm run test:all # Run all tests (Vitest + extension host)
npm run lint:all # Lint: ESLint + docs structure + naming conventions
npm run lint:fix # ESLint auto-fix
npm run package # Package as .vsixPress F5 to launch the Extension Development Host with the extension loaded.
MIT