Skip to content

Gemini CLI

Gemini CLI connects to Rabah through environment variables. It uses the Gemini native API, so it can only call Gemini models.

VariableValuePurpose
GOOGLE_GEMINI_BASE_URLhttps://api.rabah.aiThe base URL — no /v1 or /v1beta
GEMINI_API_KEYYour keyAuthentication
GEMINI_MODELA model nameThe default model: a Gemini model from the Model Plaza

The Hub’s Use Key → Gemini CLI tab generates a copy with your key filled in.

Run this in the terminal window you’ll start Gemini CLI from:

macOS / Linux

Terminal window
export GOOGLE_GEMINI_BASE_URL="https://api.rabah.ai"
export GEMINI_API_KEY="YOUR_KEY"
export GEMINI_MODEL="MODEL_NAME"

Windows PowerShell

Terminal window
$env:GOOGLE_GEMINI_BASE_URL="https://api.rabah.ai"
$env:GEMINI_API_KEY="YOUR_KEY"
$env:GEMINI_MODEL="MODEL_NAME"

Windows CMD

Terminal window
set GOOGLE_GEMINI_BASE_URL=https://api.rabah.ai
set GEMINI_API_KEY=YOUR_KEY
set GEMINI_MODEL=MODEL_NAME

These last only as long as that terminal window. To keep them, add the export lines to ~/.zshrc or ~/.bashrc on macOS / Linux, or add them under System Properties → Environment Variables on Windows.

Requests fail with 404 Check that GOOGLE_GEMINI_BASE_URL doesn’t end in /v1 or /v1beta; Gemini CLI adds the path itself.

No model available Make sure GEMINI_MODEL is a Gemini model listed in the Model Plaza and allowed by the key’s “Lines & Models”.