jenslys/opencode-gemini-auth

Gemini auth plugin for opencode

What it solves

This plugin allows the Opencode CLI to authenticate using Google OAuth, specifically for users with organization-backed Gemini Code Assist Standard or Enterprise subscriptions. It provides a way to use Google account-based authentication instead of manual API keys for accessing Gemini models.

How it works

The plugin implements the Gemini CLI OAuth flow, mirroring the official Gemini CLI's behavior. It spins up a temporary local server to capture the OAuth callback from the browser after the user approves access. It also handles project provisioning and allows users to specify a Google Cloud projectId to ensure requests are billed to the correct organization project.

Who it’s for

Developers using the Opencode CLI who have a Gemini Code Assist Standard or Enterprise subscription through a company, school, or Google Workspace account.

Highlights

  • OAuth Integration: Simplifies login via opencode auth login or /connect using a Google account.
  • LVM/Thinking Model Support: Supports configuring "thinking" features (like thinkingBudget or thinkingLevel) for Gemini 2.5 and 3 models.
  • Project Management: Allows forcing a specific Google Cloud project ID via configuration or environment variables.
  • Model Filtering: Provides whitelist and blacklist settings to control which Gemini models appear in the picker.
  • Debug Logging: Includes an OPENCODE_GEMINI_DEBUG mode to generate detailed request/response logs.

Related

  • Project
  • Project
  • Project
  • Project