Gemini CLI integration
Configure the Gemini-compatible endpoint for Gemini CLI.
Overview
Gemini CLI is a terminal coding agent. Point its Gemini-compatible base URL to MoLoop to access Gemini, Claude, GPT, and other catalog models with one API key.
Quick configuration
The Gemini SDK uses a bare host; the client appends its paths.
Configure Gemini CLI with CC Switch
Import the current MoLoop Gemini endpoint and API key into the Gemini configuration in CC Switch.
Endpoint: https://api.moloop.io
Base URL: https://api.moloop.io
API key: YOUR_API_KEYCompatibility
Chat Completions
Streaming
Tool calling
Image input (model dependent)
Step-by-step setup
Install Gemini CLI
Install globally with npm. On Windows, run it inside WSL.
npm install -g @google/gemini-cliSet environment variables
Create ~/.gemini/.env with GEMINI_API_KEY and a bare GOOGLE_GEMINI_BASE_URL; do not add /v1.
GEMINI_API_KEY=YOUR_API_KEY
GOOGLE_GEMINI_BASE_URL=https://api.moloop.ioStart Gemini
Run gemini in the project directory to start a session.
geminiRecommended models
Not every OpenAI-compatible model is available through the Gemini endpoint; confirm endpoint type and model ID in the catalog.
Things to know
GOOGLE_GEMINI_BASE_URL must be a bare host without /v1; the SDK appends the path.
For authentication failures, check that the current shell reads ~/.gemini/.env.
Are you ready to get started?
Get an API key and start using MoLoop in these tools.