Gemini CLI Setup
Gemini CLI is Google's AI assistant. You can authenticate using your Google account, an API key, or Vertex AI.
Install and Configure
- Install Gemini CLI:
npm install -g @google/gemini-cli- Find the installation path:
which gemini
# Example output: /usr/local/bin/geminiwhere.exe gemini
# Example output: C:\Users\Username\AppData\Roaming\npm\gemini.cmdOpen Settings → Agent Client and set the Gemini CLI path to the path found above.
Ensure Arguments contains
--experimental-acp(this is set by default).
Authentication
Choose one of the following methods:
Option A: Google Account Login (OAuth)
If you have a Google account and prefer not to use an API key, you can log in directly.
- Run Gemini CLI and choose "Login with Google":
geminiFollow the browser authentication flow.
In Settings → Agent Client, leave the API key field empty.
TIP
If you have a Gemini Code Assist License from your organization, add GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID in the Environment variables field.
Option B: Gemini API Key
If you prefer to use an API key for authentication:
- Get your API key from Google AI Studio
- Enter the API key in Settings → Agent Client → Gemini CLI → API key
Option C: Vertex AI
If you are using Vertex AI for enterprise workloads:
- In Settings → Agent Client → Gemini CLI → Environment variables, add:
GOOGLE_API_KEY=YOUR_API_KEY
GOOGLE_GENAI_USE_VERTEXAI=true- Leave the API key field empty (use Environment variables instead).
TIP
Gemini CLI natively supports ACP, so no additional adapter is required.
Verify Setup
- Click the robot icon in the ribbon or use the command palette: "Open agent chat"
- Switch to Gemini CLI from the agent dropdown in the chat header
- Try sending a message to verify the connection
Having issues? See Troubleshooting.