Proxy that allows you to use ollama as a copilot like Github copilot

Ensure ollama is installed:
curl -fsSL https://ollama.com/install.sh | sh
Or follow the manual install.
To use the default model expected by ollama-copilot:
ollama pull codellama:code
To use DeepSeek:
ollama-copilot -provider deepseek -token YOUR_DEEPSEEK_API_KEY -model deepseek-coder
To use Mistral:
ollama-copilot -provider mistral -token YOUR_MISTRAL_API_KEY -model codestral-latest
go install github.com/bernardo-bruning/ollama-copilot@latest
Ensure your $PATH includes $HOME/go/bin or $GOPATH/bin.
For example, in ~/.bashrc or ~/.zshrc:
export PATH="$HOME/go/bin:$GOPATH/bin:$PATH"
ollama-copilot
or if you are hosting ollama in a container or elsewhere
OLLAMA_HOST="http://192.168.133.7:11434" ollama-copilot
You can configure the server using command-line flags:
| Flag | Default | Description |
|---|---|---|
-port |
:11437 |
HTTP port to listen on |
-proxy-port |
:11438 |
HTTP proxy port |
-port-ssl |
:11436 |
HTTPS port to listen on |
-proxy-port-ssl |
:11435 |
HTTPS proxy port |
-cert |
Certificate file path (*.crt) for custom TLS |
|
-key |
Key file path (*.key) for custom TLS |
|
-provider |
ollama |
Provider to run LLM |
-token |
TOKEN |
Token to pass for provider |
-model |
codellama:code |
LLM model to use |
-num-predict |
50 |
Number of tokens to predict |
-template |
<PRE> {{.Prefix}} <SUF> {{.Suffix}} <MID> |
Prompt template for fill-in-middle |
-system |
You are a helpful... |
System prompt to guide the model |
let g:copilot_proxy = 'http://localhost:11435'
let g:copilot_proxy_strict_ssl = v:false
{
"github.copilot.advanced": {
"debug.overrideProxyUrl": "http://localhost:11437"
},
"http.proxy": "http://localhost:11435",
"http.proxyStrictSSL": false
}
{
"features": {
"edit_prediction_provider": "copilot"
},
"show_completions_on_input": true,
"edit_predictions": {
"copilot": {
"proxy": "http://localhost:11435",
"proxy_no_verify": true
}
}
}
(experimental)
(use-package copilot
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")) ;; if you don't use "straight", install otherwise
:ensure t
;; :hook (prog-mode . copilot-mode)
:bind (
("C-<tab>" . copilot-accept-completion)
)
:config
(setq copilot-network-proxy '(:host "127.0.0.1" :port 11434 :rejectUnauthorized :json-false))
)
$ claude mcp add ollama-copilot \
-- python -m otcore.mcp_server <graph>