Gemini CLI
Gemini CLI connects to Rabah through environment variables. It uses the Gemini native API, so it can only call Gemini models.
| Variable | Value | Purpose |
|---|---|---|
GOOGLE_GEMINI_BASE_URL | https://api.rabah.ai | The base URL — no /v1 or /v1beta |
GEMINI_API_KEY | Your key | Authentication |
GEMINI_MODEL | A model name | The 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.
Set the variables
Section titled “Set the variables”Run this in the terminal window you’ll start Gemini CLI from:
macOS / Linux
export GOOGLE_GEMINI_BASE_URL="https://api.rabah.ai"export GEMINI_API_KEY="YOUR_KEY"export GEMINI_MODEL="MODEL_NAME"Windows PowerShell
$env:GOOGLE_GEMINI_BASE_URL="https://api.rabah.ai"$env:GEMINI_API_KEY="YOUR_KEY"$env:GEMINI_MODEL="MODEL_NAME"Windows CMD
set GOOGLE_GEMINI_BASE_URL=https://api.rabah.aiset GEMINI_API_KEY=YOUR_KEYset GEMINI_MODEL=MODEL_NAMEThese 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.
Troubleshooting
Section titled “Troubleshooting”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”.