Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 1.76 KB

File metadata and controls

96 lines (69 loc) · 1.76 KB

OpenCode met VLAM

OpenCode is een open-source AI coding agent voor de terminal. Het ondersteunt 75+ LLM-providers, waaronder VLAM via de OpenAI-compatible API.

Installatie

macOS (Homebrew)

brew install opencode

Andere methodes

# Via npm
npm i -g opencode-ai

# Via install script
curl -fsSL https://opencode.ai/install | bash

Controleer de installatie:

opencode --version

Configuratie

1. Provider configuratie

Maak of bewerk ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "vlam": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "VLAM (Rijksoverheid)",
      "options": {
        "baseURL": "<VLAM_BASE_URL>"
      },
      "models": {
        "<VLAM_MODEL_ID>": {
          "name": "VLAM Mistral Medium"
        }
      }
    }
  }
}

Vervang <VLAM_BASE_URL> en <VLAM_MODEL_ID> door de waarden die je van je VLAM-beheerder hebt ontvangen.

2. Authenticatie

Maak ~/.local/share/opencode/auth.json:

{
  "vlam": {
    "type": "api",
    "key": "<VLAM_API_KEY>"
  }
}

Vervang <VLAM_API_KEY> door je persoonlijke API key.

Let op: Bewaar auth.json veilig en commit dit bestand nooit naar versiebeheer.

Alternatief: via de CLI

In plaats van de bestanden handmatig aan te maken kun je ook de ingebouwde /connect wizard gebruiken:

  1. Start opencode
  2. Type /connect
  3. Kies "Other"
  4. Voer vlam in als provider ID
  5. Voer je API key in

Gebruik

cd /pad/naar/je/project
opencode

Selecteer het VLAM model via /models in de OpenCode TUI.

Meer informatie