https://github.com/bernardo-bruning/ollama-copilot
Proxy that allows you to use ollama as a copilot like Github copilot
https://github.com/bernardo-bruning/ollama-copilot
Last synced: 3 months ago
JSON representation
Proxy that allows you to use ollama as a copilot like Github copilot
- Host: GitHub
- URL: https://github.com/bernardo-bruning/ollama-copilot
- Owner: bernardo-bruning
- License: mit
- Created: 2024-04-25T01:29:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-04T17:07:07.000Z (7 months ago)
- Last Synced: 2025-07-07T05:11:36.029Z (4 months ago)
- Language: Go
- Size: 2.31 MB
- Stars: 697
- Watchers: 6
- Forks: 64
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - bernardo-bruning/ollama-copilot - Proxy that allows you to use ollama as a copilot like Github copilot (Go)
- awesome-hacking-lists - bernardo-bruning/ollama-copilot - Proxy that allows you to use ollama as a copilot like Github copilot (Go)
README
# Ollama Copilot
Proxy that allows you to use ollama as a copilot like Github copilot

## Installation
### Ollama
Ensure [ollama](https://ollama.com/download/linux) is installed:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
Or follow the [manual install](https://github.com/ollama/ollama/blob/main/docs/linux.md#manual-install).
#### Models
To use the default model expected by `ollama-copilot`:
```bash
ollama pull codellama:code
```
### ollama-copilot
```bash
go install github.com/bernardo-bruning/ollama-copilot@latest
```
### Running
Ensure your `$PATH` includes `$HOME/go/bin` or `$GOPATH/bin`.
For example, in `~/.bashrc` or `~/.zshrc`:
```bash
export PATH="$HOME/go/bin:$GOPATH/bin:$PATH"
```
```bash
ollama-copilot
```
or if you are hosting ollama in a container or elsewhere
```bash
OLLAMA_HOST="http://192.168.133.7:11434" ollama-copilot
```
## Configure IDE
### Neovim
1. Install [copilot.vim](https://github.com/github/copilot.vim)
1. Configure variables
```vim
let g:copilot_proxy = 'http://localhost:11435'
let g:copilot_proxy_strict_ssl = v:false
```
### VScode
1. Install [copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)
1. Sign-in or sign-up in github
1. Configure open [settings](https://code.visualstudio.com/docs/getstarted/settings) config and insert
```json
{
"github.copilot.advanced": {
"debug.overrideProxyUrl": "http://localhost:11437"
},
"http.proxy": "http://localhost:11435",
"http.proxyStrictSSL": false
}
```
### Zed
1. [Open settings](https://zed.dev/docs/configuring-zed) (ctrl + ,)
1. Set up [edit completion proxying](https://github.com/zed-industries/zed/pull/24364):
```json
{
"features": {
"edit_prediction_provider": "copilot"
},
"show_completions_on_input": true,
"edit_predictions": {
"copilot": {
"proxy": "http://localhost:11435",
"proxy_no_verify": true
}
}
}
```
### Emacs
(experimental)
1. Install [copilot-emacs](https://github.com/copilot-emacs/copilot.el)
1. Configure the proxy
```elisp
(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-" . copilot-accept-completion)
)
:config
(setq copilot-network-proxy '(:host "127.0.0.1" :port 11434 :rejectUnauthorized :json-false))
)
```
## Roadmap
- [x] Enable completions APIs usage; fill in the middle.
- [x] Enable flexible configuration model (Currently only supported llamacode:code).
- [x] Create self-installing functionality.
- [ ] Windows setup
- [ ] Documentation on how to use.