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: about 2 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 (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-03T17:12:35.000Z (3 months ago)
- Last Synced: 2025-02-03T18:26:18.326Z (3 months ago)
- Language: Go
- Size: 2.31 MB
- Stars: 466
- Watchers: 7
- Forks: 38
- Open Issues: 11
-
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
```## 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
}
```### 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.