Skip to content
    ↑↓ select↵ openesc close
    English中文
    berget-ai
    @bergetai/opencode-auth

    Berget AI auth plugin for OpenCode - authenticate with your Berget account

    GitHub stars

    1

    Monthly installs

    169

    29 in 7 days

    Composite scoreSCORE

    35.6

    Multi-signal model

    Last commit

    17 days ago

    2026-08-03

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@bergetai/opencode-auth@1.0.24"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    Authenticate OpenCode with your Berget AI account.

    Quick Start

    The recommended way to get started is with the Berget CLI:

    npm install -g berget
    berget code init
    opencode
    # Type /connect → choose your auth method
    

    Authentication Methods

    Berget Code (SSO)

    For team members with a Berget Code seat:

    1. Run /connect in OpenCode
    2. Select "Login with Berget"
    3. Authenticate in browser — token refresh is automatic

    API Key

    For API key users:

    1. Run /connect in OpenCode
    2. Select "Enter Berget API Key manually"
    3. Paste your key — persisted across sessions

    How It Works

    • PKCE Authorization Flow for SSO login
    • Automatic token refresh via custom fetch — sessions stay alive indefinitely
    • Models fetched dynamically from Berget API — no manual config needed

    License

    MIT