Skip to content
exoticrouter.com ↗

Gemini CLI

Brings Google’s Gemini agent into a terminal. Point it at ExoticRouter with a base URL and a key: here are the values, and where they go in Gemini CLI.

Setting Value
Base URL https://api.exoticrouter.com
API key Your key, from the API keys page
Model An id such as google/gemini-4-neon, from the models page

An example with a handful of models and a stand-in for the key. Put your own key where it says sk-er-YOUR-KEY.

.env goes here:

System Path
macOS ~/.gemini/.env
Linux ~/.gemini/.env
Windows %USERPROFILE%\.gemini\.env
.env
GEMINI_API_KEY=sk-er-YOUR-KEY
GOOGLE_GEMINI_BASE_URL=https://api.exoticrouter.com

If the file is there already, add this to it and keep the settings you have.

Start gemini, or check it with gemini -p "say hi". If it asks how to sign in, choose the Gemini API key.

If Gemini CLI is not on the machine yet, this is its own installer:

System Command
macOS npm install -g @google/gemini-cli
Linux npm install -g @google/gemini-cli
Windows npm install -g @google/gemini-cli

Gemini CLI speaks Google’s Gemini API, so it runs the Gemini models.

The setting is described in Gemini CLI’s own documentation.

  • Claude Code: Works on a codebase from the terminal, IDE, or web.
  • Codex: Works on software engineering tasks through a coding agent.
  • OpenCode: Runs an open-source coding agent with configurable model providers.
  • Kilo Code: Open-source coding agent for editing and working with repositories.
  • Qwen Code: Runs the Qwen coding agent in a terminal.
  • Goose: Runs an extensible local agent for engineering work.