Gemini CLI is an open-source AI coding agent by Google that runs in the terminal.
Installation
npm install -g @google/gemini-cli
Or via Homebrew:
Open CC Switch and add a RuoLi configuration:
| Field | Value |
|---|
| API URL | https://ruoli.dev |
| API Key | Your Key |
Select Gemini CLI and click Apply.
The API URL for Gemini CLI is https://ruoli.dev, without /v1.
Manual Configuration
Set the environment variables:
export GOOGLE_GEMINI_BASE_URL=https://ruoli.dev
export GEMINI_API_KEY=sk-YOUR-KEY
It’s recommended to add these to ~/.zshrc or ~/.bashrc:echo 'export GOOGLE_GEMINI_BASE_URL=https://ruoli.dev' >> ~/.zshrc
echo 'export GEMINI_API_KEY=sk-YOUR-KEY' >> ~/.zshrc
Switch Models
Specify the model at launch:
gemini --model pro
gemini --model flash
Or use the /model command during a session to switch. You can also switch models in CC Switch.