Files
light-heart-labs--dreamserver/ods/extensions/services/opencode
wehub-resource-sync 9e8f1bbeed
Dashboard / frontend (push) Failing after 0s
Dashboard / api (push) Failing after 0s
Lint PowerShell / powershell-lint (ubuntu-latest) (push) Failing after 1s
Python Lint / Lint Python with Ruff (push) Failing after 1s
ShellCheck / Lint shell scripts (push) Failing after 1s
Matrix Smoke / linux-smoke (push) Failing after 1s
Matrix Smoke / distro: cachyos (push) Failing after 15s
Matrix Smoke / distro: linux-mint-21.3 (push) Failing after 15s
Matrix Smoke / distro: debian-12 (push) Failing after 5m21s
Matrix Smoke / distro: fedora-41 (push) Failing after 4m56s
Matrix Smoke / distro: ubuntu-24.04 (push) Failing after 2m13s
Matrix Smoke / distro: rocky-9 (push) Failing after 10m39s
Matrix Smoke / distro: manjaro (push) Failing after 12m11s
Matrix Smoke / distro: opensuse-tw (push) Failing after 11m53s
Matrix Smoke / distro: archlinux (push) Failing after 20m3s
Matrix Smoke / distro: ubuntu-22.04 (push) Failing after 13m49s
Validate .env Schema / tier-1-env-validation (push) Successful in 52s
Validate .env Schema / tier-2-env-validation (push) Successful in 44s
Validate .env Schema / tier-3-env-validation (push) Successful in 52s
Validate .env Schema / tier-4-env-validation (push) Successful in 51s
Validate Extensions Catalog / Check catalog is up-to-date (push) Failing after 9m47s
Secret Scan / Scan for secrets (push) Failing after 21m4s
Validate Docker Compose / Validate Docker Compose files (push) Has been cancelled
Python Type Check / Type check with mypy (push) Has been cancelled
Validate .env Schema / tier-0-env-validation (push) Has been cancelled
Test Linux / integration-smoke (push) Has been cancelled
Lint PowerShell / powershell-lint (windows-latest) (push) Has been cancelled
Matrix Smoke / macos-smoke (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:33 +08:00
..

OpenCode

AI-powered coding assistant accessible via browser in ODS

Overview

OpenCode provides a browser-based AI coding environment that integrates with your local LLM. It gives you code completion, explanation, refactoring, and generation capabilities through a web interface — no IDE plugin required. Unlike other ODS services, OpenCode runs directly on the host system (not in Docker) as a systemd-managed process.

Features

  • Browser-based IDE: Access your AI coding assistant from any browser on your local network
  • Local LLM backend: All code and queries stay on your machine — connects to llama-server for inference when available
  • Code completion: Context-aware completions for multiple languages
  • Explanation and refactoring: Ask the LLM to explain, refactor, or debug your code
  • No IDE installation required: Works entirely in the browser

Deployment Type

OpenCode runs as a host-level systemd service (type: host-systemd), not as a Docker container. This means:

  • It is managed by systemd on the host, not by Docker Compose
  • There is no container_name — use systemd commands to manage the process
  • LLM features require either OpenCode's own backend or llama-server to be running (either satisfies the requirement)

Configuration

Variable Default Description
OPENCODE_PORT 3003 Port for the OpenCode web interface

Note: LLM-powered features (completion, explanation) need either OpenCode's own backend or llama-server running. OpenCode itself starts independently.

Accessing OpenCode

Once running, open your browser and navigate to:

http://localhost:3003

Requirements

Requirement Details
GPU VRAM 8 GB minimum (for LLM inference via llama-server)
LLM service llama-server must be running
GPU backends NVIDIA, AMD

Architecture

┌──────────┐  HTTP :3003   ┌──────────────┐
│ Browser  │──────────────▶│  OpenCode    │
│          │◀──────────────│ (host daemon)│
└──────────┘               └──────┬───────┘
                                  │ LLM inference
                                  ▼
                           ┌──────────────┐
                           │ llama-server │
                           │   (Docker)   │
                           └──────────────┘

Files

  • manifest.yaml — Service metadata (port, health endpoint, GPU backends, feature definition)

Troubleshooting

OpenCode not accessible on port 3003:

Since OpenCode is a host systemd service, check its status with systemd:

# Check service status
systemctl status opencode

# View logs
journalctl -u opencode --follow

# Restart the service
systemctl restart opencode

LLM inference not working:

  • Verify llama-server is running: docker compose -f ods/docker-compose.base.yml ps llama-server
  • Ensure sufficient VRAM (minimum 8 GB) is available

Port 3003 already in use:

  • Check what is using the port: lsof -i :3003
  • Update the port in your ODS configuration and restart the service