new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

gemini-cli/setup

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Gemini CLI community provider package name

The community provider for Gemini CLI is called ai-sdk-provider-gemini-cli, available on npm.

Gemini CLI provider version compatibility with AI SDK

Provider version 2.x is compatible with AI SDK v6 (latest tag, Stable status). Provider version 1.x is compatible with AI SDK v5 (ai-sdk-v5 tag, Maintenance status). Provider version 0.x is compatible with AI SDK v4 (ai-sdk-v4 tag, Legacy status).

Gemini CLI installation commands for different AI SDK versions

For AI SDK v6: npm install ai-sdk-provider-gemini-cli ai. For AI SDK v5: npm install ai-sdk-provider-gemini-cli@ai-sdk-v5 ai@^5.0.0. For AI SDK v4: npm install ai-sdk-provider-gemini-cli@ai-sdk-v4 ai@^4.0.0.

Gemini CLI createGeminiProvider function

Import createGeminiProvider from 'ai-sdk-provider-gemini-cli' to create a provider instance. The function accepts configuration options for authentication type and related credentials.

Gemini CLI authentication types

Supported authType values are: 'oauth', 'oauth-personal', 'api-key', 'gemini-api-key', 'vertex-ai', and 'google-auth-library'. The default is 'oauth-personal'.

Gemini CLI OAuth authentication setup

To use OAuth authentication: install Gemini CLI globally with npm install -g @google/gemini-cli, run the gemini command to follow interactive authentication setup, then use authType: 'oauth-personal' in provider configuration.

Gemini CLI API key authentication setup

To use API key authentication: generate an API key from Google AI Studio at aistudio.google.com/apikey, set it as an environment variable GEMINI_API_KEY, and use authType: 'api-key' with the apiKey parameter in provider configuration.

Gemini CLI requirements

Node.js 22 or higher is required. Gemini CLI must be installed globally for OAuth authentication. A valid Google account or Gemini API key is required.

Gemini CLI basic usage example

Example code showing how to use Gemini CLI provider: import { createGeminiProvider } from 'ai-sdk-provider-gemini-cli'; import { generateText } from 'ai'; const gemini = createGeminiProvider({ authType: 'oauth-personal' }); const { text } = await generateText({ model: gemini('gemini-2.5-pro'), prompt: 'Write a vegetarian lasagna recipe for 4 people.' });

Give your agent this brain