Cara Install OpenCode

Ikuti panduan berikut untuk menghubungkan OpenCode ke Guru Code API

1. Unduh OpenCode melalui link berikut

https://opencode.ai/download/stable/windows-x64-nsis

2. Ubah file konfigurasi

Ubah file ~/.config/opencode/opencode.json:

{ "$schema": "https://opencode.ai/config.json", "enabled_providers": ["guru-code"], "provider": { "guru-code": { "npm": "@ai-sdk/openai-compatible", "name": "guru-code", "options": { "baseURL": "https://gurucode.huedaya.com/v1", "apiKey": "TOKEN_DARI_GURU" }, "models": { "model-1": { "name": "Model-1" } } } } }

3. Jalankan OpenCode

opencode

1. Install OpenCode

curl -fsSL https://opencode.ai/install.sh | sh

2. Ubah file konfigurasi

Ubah file ~/.config/opencode/opencode.json:

mkdir -p ~/.config/opencode cat > ~/.config/opencode/opencode.json <<EOF { "$schema": "https://opencode.ai/config.json", "enabled_providers": ["guru-code"], "provider": { "guru-code": { "npm": "@ai-sdk/openai-compatible", "name": "guru-code", "options": { "baseURL": "https://gurucode.huedaya.com/v1", "apiKey": "TOKEN_DARI_GURU" }, "models": { "model-1": { "name": "Model-1" } } } } } EOF

3. Jalankan OpenCode

opencode