@bergetai/opencode-auth
v1.0.16
Published
Berget AI auth plugin for OpenCode - authenticate with your Berget account
Downloads
937
Readme
Berget Auth Plugin for OpenCode
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 methodAuthentication Methods
Berget Code (SSO)
For team members with a Berget Code seat:
- Run
/connectin OpenCode - Select "Login with Berget"
- Authenticate in browser — token refresh is automatic
API Key
For API key users:
- Run
/connectin OpenCode - Select "Enter Berget API Key manually"
- Paste your key — persisted across sessions
How It Works
- Device Authorization Flow for SSO login (works in SSH/headless too)
- Automatic token refresh via custom fetch — sessions stay alive indefinitely
- Models fetched dynamically from Berget API — no manual config needed
License
MIT
