Authenticate OpenCode with your Berget AI account.
The recommended way to get started is with the Berget CLI:
npm install -g berget
berget code init
opencode
# Type /connect → choose your auth methodFor team members with a Berget Code seat:
- Run
/connectin OpenCode - Select "Login with Berget"
- Authenticate in browser — token refresh is automatic
For API key users:
- Run
/connectin OpenCode - Select "Enter Berget API Key manually"
- Paste your key — persisted across sessions
- 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
MIT