Gemini CLI Integration
Use UnoRouter with the Gemini CLI and any Google GenAI-compatible client. Access Gemini models alongside Claude and GPT.
Gemini CLI is an open-source AI coding agent from Google that runs directly in your terminal, bringing the power of Gemini models to your development workflow.
Quick Start
Set these environment variables to use UnoRouter with the Gemini CLI:
$env:GEMINI_API_KEY="YOUR_API_KEY"
$env:GOOGLE_GEMINI_BASE_URL="https://api.unorouter.ai"
# Then run Gemini CLI
geminiKey Features
- Agentic Capabilities — Edit files, run shell commands, and manage your codebase autonomously with natural language instructions.
- Multimodal Input — Process text, images, and code together for richer context and more accurate results.
- MCP Integration — Connect to external tools and services through the Model Context Protocol for extended functionality.
- Fully Customizable — Tailor system prompts, tool permissions, and model settings to match your workflow.
Quick Setup with CC Switch
Use CC Switch to configure your provider with one click. It automatically sets the API endpoint and provider name for you.
Installation
Windows support requires WSL (Windows Subsystem for Linux). Install WSL first, then run the installation command inside WSL.
npm install -g @google/gemini-cliConfiguration
Configure Gemini CLI to use UnoRouter as your API provider by setting environment variables:
Permanent Config File (Recommended)
Persists across sessions and terminal restarts.
~/.gemini/.env
GEMINI_API_KEY=YOUR_API_KEY
GOOGLE_GEMINI_BASE_URL=https://api.unorouter.aiEnvironment Variables
Add to your shell profile. Resets when the terminal closes unless sourced from a profile file.
$env:GEMINI_API_KEY="YOUR_API_KEY"
$env:GOOGLE_GEMINI_BASE_URL="https://api.unorouter.ai"Usage
Launch Gemini CLI in your project directory and start interacting with your codebase:
# Start Gemini CLI
gemini
# Switch models within the session
/model gemini-3-flash-previewReady to get started?
Get your API key and start using UnoRouter with Gemini CLI.