NaviGator AI

Install and configure OpenCode Desktop

Install OpenCode Desktop on macOS, Linux or Windows and connect it to NaviGator AI Toolkit

OpenCode Desktop is the OpenCode coding agent in a desktop window. It runs OpenCode in the background and reads the same configuration as OpenCode in the terminal.

The download page installs OpenCode Desktop 2, while Homebrew and Scoop install version 1. The configuration on this page works with both.

What you need

  • Your NaviGator AI Toolkit key stored as shown in Store your key.
  • A model your key can use. These steps use gpt-oss-120b, which runs in UF data centers and is approved for Open, Sensitive and Restricted data.
  • A project in a Git repository. Git is how you review and undo the agent's changes.
  1. Install OpenCode Desktop

    Install with Homebrew:

    brew install --cask opencode-desktop

    Or download the .dmg for Apple silicon or Intel from opencode.ai/download.

  2. Give the app your key

    Apps you open from the Dock, Start menu or app launcher do not read your terminal's settings, so OpenCode Desktop cannot see NAVIGATOR_TOOLKIT_API_KEY. Put the key in a file only you can read:

    Copy the key from your Keychain into the file:

    mkdir -p ~/.config/navigator && chmod 700 ~/.config/navigator
    security find-generic-password -a "$USER" -s navigator-toolkit -w > ~/.config/navigator/key
    chmod 600 ~/.config/navigator/key

    If you replace your key later, repeat this step.

  3. Connect OpenCode Desktop to NaviGator AI Toolkit

    Create the global configuration file:

    mkdir -p ~/.config/opencode
    touch ~/.config/opencode/opencode.json
    open -e ~/.config/opencode/opencode.json

    Download the starter file and save it there, or paste the configuration below. If you already set up OpenCode in the terminal, replace its apiKey line with the one below; the terminal version works with the file too.

    opencode.jsonOpenCode Desktop configuration for NaviGator AI Toolkit. Reads your key from ~/.config/navigator/key.Download opencode.json
    opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "enabled_providers": ["navigator"],
      "model": "navigator/gpt-oss-120b",
      "small_model": "navigator/gpt-oss-120b",
      "provider": {
        "navigator": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "NaviGator AI Toolkit",
          "options": {
            "baseURL": "https://api.navigator.ai.ufl.edu/v1",
            "apiKey": "{file:~/.config/navigator/key}"
          },
          "models": {
            "gpt-oss-120b": {
              "name": "GPT OSS 120B",
              "reasoning": true,
              "modalities": { "input": ["text"], "output": ["text"] },
              "limit": { "context": 128000, "output": 0 }
            }
          }
        }
      },
      "permission": {
        "edit": "allow",
        "bash": {
          "*": "ask",
          "git status*": "allow",
          "git diff*": "allow",
          "git log*": "allow",
          "git push*": "deny"
        },
        "webfetch": "ask",
        "websearch": "ask"
      }
    }
    • {file:~/.config/navigator/key} reads the key from the file you just created, so it never appears in the configuration.
    • enabled_providers limits OpenCode to NaviGator AI Toolkit.
    • permission lets OpenCode edit files, asks before it runs commands or uses the web, allows read-only Git commands and never lets it push.

    If OpenCode Desktop was open, quit it completely and reopen it.

  4. Open your project and test

    Open OpenCode Desktop, open your project folder and start a session. Check that GPT OSS 120B is the selected model, then ask a question that changes nothing:

    Read this project and tell me what it does and how to run its tests. Don't change anything.

    OpenCode Desktop project session opened to an example application with GPT OSS 120B selected

    The answer should describe your project. Changed files appear in the review panel beside the conversation.

  5. Give the project its rules

    Enter /init and OpenCode writes an AGENTS.md file that tells the agent how to build, test and behave in this project. Review it before keeping it, or start from this file:

    AGENTS.mdStarter project rules for a coding agentDownload AGENTS.md

Basic use

  • Plan and Build: choose Plan to explore and agree on an approach without changes, then Build to make them.
  • Approvals: when OpenCode asks to run a command, choose Allow once, Allow always for matching requests or reject the request. Use Allow always only for commands you have read and understand.
  • Stop: select Stop or press Escape to interrupt a run.
  • Undo: use the session Undo and Redo commands to reverse the last message and its file changes. Ordinary text-editor undo is different.
  • Review: expand tool entries in the timeline and read every changed file in the review panel.
  • New session: start one when earlier exploration should not carry into new work.

Work safely

  • Start a new branch before letting the agent edit, and read git diff before you commit.
  • Open unfamiliar projects read-only. OpenCode Desktop loads a project's configuration, plugins and instructions when you open it. For code you did not write, use the read-only profile and see Open an unfamiliar project.
  • Keep commits and pushes for yourself. Editing files is not permission to commit, push or deploy.
  • Protect the key file. Do not copy ~/.config/navigator/key into a project, and do not share it.

See Operate coding agents safely for the full operating loop.

Troubleshooting

ProblemWhat to do
The model fails to authenticateCheck that ~/.config/navigator/key exists and holds your current key, and that apiKey reads {file:~/.config/navigator/key}. Then quit and reopen the app
NaviGator AI Toolkit doesn't appearThe configuration has a JSON error. Run opencode debug config in a terminal, fix the file and reopen the app
Configuration changes don't applyQuit the app completely, not only its window, then reopen it. A project's own opencode.json can override global settings
Blank window or the app won't startQuit and relaunch. On Windows, install or update the WebView2 Runtime

References

On this page