How do setup a local & offline GitHub Copilot alternative
Ollama + Continue Dev
- Install ollama
- Install the continue.dev Plugin for JetBrains or VSCode
- Optionally, use OpenWebUI via Docker as an Interface for Chatting
Model Setup
- Quick Tab Completion
ollama pull qwen2.5-coder
- Indexing and Codebase Search
ollama pull nomic-embed-text
- General Purpose Reasoning Model
ollama pull phi4
- https://ollama.com/library/phi4
- MIT License
- Alternatively use Deepseek R1
- https://ollama.com/library/deepseek-r1
- MIt License
- Choose the largest b-Parameter Model that will fit into your VRAM
ollama pull ollama run deepseek-r1:32b
- Update continue.dev
config.json
-> see here - Run ollama api locally
ollama serve
Usage
Use directly in your editor
or via the chat-sidebar tab
Suggested continue.dev config
- Unix:
~/.continue/config.json
- Windows:
%USERPROFILE%\.continue\config.json
~/.continue/config.json
{
"models": [
{
"title": "PHi-4",
"provider": "ollama",
"model": "phi4",
"systemMessage": "You are a helpful assistant supporting a software developer. Your tasks may involve explaining technical concepts, assisting with code, offering best practices, and solving programming-related issues across various languages and frameworks. Always provide clear, concise, and accurate answers. Always respond in English."
}
],
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder",
"provider": "ollama",
"model": "qwen2.5-coder"
},
"embeddingsProvider": {
"title": "Nomic Embed Text",
"provider": "ollama",
"model": "nomic-embed-text"
},
"customCommands": [
{
"name": "test",
"prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"contextProviders": [
{
"name": "diff",
"params": {}
},
{
"name": "folder",
"params": {}
},
{
"name": "codebase",
"params": {}
},
{
"name": "file",
"params": {}
},
{
"name": "code",
"params": {}
},
{
"name": "currentFile",
"params": {}
},
{
"name": "terminal",
"params": {}
},
{
"name": "open",
"params": {}
},
{
"name": "web",
"params": {}
},
{
"name": "url",
"params": {}
},
{
"name": "repo-map",
"params": {}
},
{
"name": "os",
"params": {}
}
],
"slashCommands": [
{
"name": "share",
"description": "Export the current chat session to markdown"
},
{
"name": "commit",
"description": "Generate a git commit message"
}
]
}