User Guide¶
Day-to-day usage of your OpenCode Initializer-powered development environment.
Daily Workflow¶
flowchart LR
A[Open Terminal] --> B[Check Health]
B --> C[Write Code]
C --> D[AI Assist]
D --> E[Test & Deploy]
E --> F[Weekly Update] The dev CLI¶
Your main management tool after installation. Available as ~/opencode_initializer/dev.sh.
Health Check¶
Run this first thing to verify your environment:
Output covers 11 sections: 1. Core CLI — OpenCode, dev CLI, setup.sh 2. MCP Servers — All configured MCP servers 3. LSP Servers — Language server configurations 4. Services — Docker, PostgreSQL, Qdrant, Redis 5. Config — opencode.json, AGENTS.md, .zshrc 6. Multimodal & ONNX — Multimedia + ONNX support 7. Interaction Modes — CLI modes 8. Systemd Services — Ollama, Open WebUI, ChromaDB 9. Web Search (SearXNG) — Self-hosted search engine 10. Memory Chain — MemoryLayer, Muninn 11. MCP Binaries — ~/.bun/bin/ entries
Version Check¶
Compares installed versions against latest from: - GitHub Releases (Go, Zig, Bun) - API endpoints (Node, Python) - Package registries (Rust, .NET)
Update Tools¶
Infrastructure Management¶
dev infra start # Start all infra services
dev infra stop # Stop all infra services
dev infra status # Check service status
Plugin Management¶
dev plugins list # List installed plugins
dev plugins install # Install new plugin
dev plugins remove # Remove plugin
Observability¶
Web GUI¶
Isolated Circuit Mode¶
dev isolated on # Enable air-gapped LLM mode
dev isolated off # Disable, use cloud providers
dev isolated status # Check current state
Model Management¶
dev models coding # Recommend models for coding tasks
dev models install <model> # Download local Ollama model
Config Backup¶
dev backup create # Create config backup
dev backup list # List available backups
dev backup restore # Restore from backup
Working with AI¶
Basic Code Generation¶
Code Review¶
Project Understanding¶
OpenCode reads your AGENTS.md and opencode.json for context:
Managing Projects¶
Create a New Project¶
This creates:
~/my-new-project/
├── AGENTS.md # AI agent instructions
├── opencode.json # AI config
├── docker-compose.yml
├── .gitignore
└── agents/ # Custom AI subagents
Existing Project Integration¶
Just add an AGENTS.md to any project directory. OpenCode will pick it up automatically.
MCP Servers¶
List Active MCP Servers¶
Add a Custom MCP Server¶
Edit opencode.json and add:
Troubleshoot MCP¶
# Check if Bun is installed
which bun
# Check MCP npm cache
ls ~/.cache/opencode-setup/mcp-cache/
# Reinstall MCP servers
bash setup.sh --reinit
Docker¶
# Start Docker (if not auto-started)
sudo systemctl start docker
# Run a container
docker run hello-world
# Check Docker in health report
dev health
Chrome (WSL2)¶
LLM / GPU¶
Check GPU¶
Manage Ollama¶
# Start Ollama
systemctl --user start ollama
# List installed models
ollama list
# Pull a model
ollama pull llama3.2
# Test
ollama run llama3.2 "Hello!"
Open WebUI¶
Access at http://localhost:3000 after starting:
Logs¶
All installation output is logged:
View the latest log:
Tips & Tricks¶
Aliases¶
The installer adds useful aliases to your .zshrc:
Keyboard Shortcuts (ZSH with plugins)¶
| Shortcut | Action |
|---|---|
Ctrl+T | Fuzzy file search (fzf) |
Ctrl+R | Fuzzy history search |
Alt+C | Fuzzy directory jump |
Tab | Smart autocomplete (zsh-autosuggestions) |
Performance Tips¶
- Close unused containers:
docker system prune - Limit Ollama models: Only pull what you use
- Clean npm cache:
npm cache clean --force - Check disk:
dev healthincludes disk usage
Backup Your Config¶
# Backup entire config
tar -czf opencode-backup-$(date +%Y%m%d).tar.gz \
~/.config/opencode-setup/ \
~/.config/opencode/ \
~/opencode_initializer/opencode.json
See also: - MCP, LSP & Plugins Reference — full catalogue of all servers - Advanced Guide — WSL2, GPU, customization - FAQ — common issues and solutions - Architecture — C4 diagrams and module reference