User Tools

Site Tools


opencode

This is an old revision of the document!


OpenCode

debian:~# curl -fsSL https://opencode.ai/install | bash

debian:~# source /root/.bashrc

debian:/etc# opencode #stats

$ less ~/.config/opencode/opencode.jsonc
  или
$ cat ~/.config/opencode/opencode.jsonc
  или
debian:~/etc# cat opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
//  "permission": {
//    "bash": "allow",
//    "external_directory": "allow"
//  },
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (remote)",
      "options": {
        "baseURL": "http://val.bmstu.ru:8080/v1",
        "headers": {
          "Authorization": "Basic YWRtaW46MTExMjM011NTY3OA=="
        }
      },
      "models": {
        "ornith-1.5:9b": {
          "name": "ornith-1.5:9b"
        }
      }
    }
  },
  "model": "ollama/ornith-1.5:9b"
}
opencode.1788175642.txt.gz · Last modified: 2026/08/31 14:27 by val