- Shell 57%
- CSS 22.9%
- HTML 20.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| .gitlab-ci.yml | ||
| index.html | ||
| install-opencode-ollama.sh | ||
| install.sh | ||
| README.md | ||
OpenCode + Ollama Installer
Interactive Linux installer for setting up OpenCode with local Ollama models.
The script installs or configures:
- OpenCode terminal CLI
- OpenCode IDE extension workflow
- OpenCode Desktop Beta on Linux using
.rpmor.deb - Ollama local server
- Ollama model downloads
- OpenCode provider configuration
- OpenCode auth with the local Ollama API key value
ollama
Quick Start
One-command install when hosted:
curl -fsSL https://gitlab.com/anarchymedialibertaire/opencode-ollama-installer/-/raw/main/install.sh | bash
This uses the raw installer from the GitLab repository.
Run the installer:
./install-opencode-ollama.sh
If needed, make it executable first:
chmod +x install-opencode-ollama.sh
What It Does
The installer asks which OpenCode mode you want:
- Terminal CLI only
- IDE extension workflow for VS Code, Cursor, Windsurf, or VSCodium
- Desktop Beta
- Everything
- Add Ollama models only
It then starts or installs Ollama, lets you choose one or more models, optionally downloads them, and writes the OpenCode configuration.
Model Menu
All models included in the script natively support Tool Calling / Function Calling on Ollama, which is required for OpenCode agentic workflows (reading/editing files, running bash commands, searching codebases):
Coding Specialists (Recommended for OpenCode)
qwen2.5-coder:7b(Best default, balanced and versatile code agent)qwen2.5-coder:1.5b/0.5b/3b(Lightweight code models for modest hardware)qwen2.5-coder:14b/32b(Advanced code generation & heavy reasoning)devstral:24b(Mistral agentic coding & codebase exploration model)qwen3-coder:30b(Modern heavy coding agent model)
Reasoning & Problem Solving with Tools
deepseek-r1:7b/8b(High-accuracy reasoning & code)deepseek-r1:1.5b/14b/32b(Distilled reasoning models)phi4-mini:3.8b(Microsoft compact 128k reasoning with tool use)qwq:32b(Alibaba deep reasoning and planning model)
General Assistants with Tool Use
llama3-groq-tool-use:8b(Meta fine-tuned specifically for tool calling)llama3.3:70b(Meta flagship open model with tool support)llama3.2:3b/1b(Meta ultra-fast lightweight assistants)llama3.1:8b(Meta reliable general model with tools)mistral-small:24b/mistral-nemo:12b/mistral:7b(Mistral models with tool calling)qwen2.5:7b/14b(Qwen multilingual models with tools)granite3.1-dense:8b/granite3.1-moe:3b(IBM enterprise models with tools)smollm2:1.7b(Ultra-compact assistant with tool support)hermes3:8b(Advanced agentic model with tools)gemma4(Locally configured Gemma 4 model with tools)
You can also enter any custom Ollama model name during setup.
Config Files
The script writes:
~/.config/opencode/opencode.json
~/.local/share/opencode/auth.json
Existing config files are backed up automatically before changes are written.
The Ollama provider uses:
http://localhost:11434/v1
The local API key is:
ollama
Multiple Models
Rerunning the script will keep previously configured Ollama models and add new ones without removing the old entries.
Use Add Ollama models only when OpenCode and Ollama are already installed and you only want to download/register more models.
Launch
After setup, launch OpenCode with:
opencode
You can also use the official Ollama launcher:
ollama launch opencode
Notes
- RAM/VRAM guide:
- 1B - 3B models (
qwen2.5-coder:1.5b,llama3.2:3b,phi4-mini:3.8b): ~2-4 GB RAM - 7B - 9B models (
qwen2.5-coder:7b,deepseek-r1:7b,gemma2:9b): ~8-12 GB RAM - 14B - 16B models (
qwen2.5-coder:14b,deepseek-coder-v2:16b,phi4:14b): ~16-24 GB RAM - 22B - 32B+ models (
codestral:22b,qwen2.5-coder:32b,llama3.3:70b): 32-64+ GB RAM
- 1B - 3B models (
- For the best out-of-the-box coding agent experience, start with
qwen2.5-coder:7b.
GitLab Pages
This project is ready for GitLab Pages.
Push the repository to GitLab. The included .gitlab-ci.yml publishes:
index.html
assets/
README.md
install.sh
install-opencode-ollama.sh
GitLab will serve the site from the public/ artifact on the default branch.
After deployment, the one-command installer can use your raw GitLab URL, for example:
curl -fsSL https://gitlab.com/anarchymedialibertaire/opencode-ollama-installer/-/raw/main/install.sh | bash