Skip to content

Gemini CLI Setup ​

Gemini CLI is Google's terminal coding agent. Through Clauddy you can use it without a Google account.

Cheat sheet
API endpointhttps://api.clauddy.com
Token groupGemini or Unified
Config files~/.gemini/.env and ~/.gemini/settings.json, on Windows under %USERPROFILE%\.gemini\
Launchgemini

Choose a setup method ​

One-click script ​

bash
curl -fsSL https://docs.clauddy.com/install.sh | bash -s -- --lang en
  1. Type 3 in the menu for Gemini CLI. If it is not installed, the script offers to install it.
  2. Create a token in the Gemini group when prompted and paste it. The script validates it live.
  3. Run gemini.

The script does not run in Windows PowerShell / CMD. Use CC Switch or the manual setup below. Script details →

Install Gemini CLI ​

Script and CC Switch users can skip this. The npm route needs Node.js 18+ (environment check).

bash
brew install gemini-cli
bash
npm install -g @google/gemini-cli

Run gemini --version to confirm.

Manual setup ​

Two files: .env holds the endpoint and key; settings.json tells Gemini CLI to use API-key auth and skip Google login.

bash
mkdir -p ~/.gemini

cat > ~/.gemini/.env << 'EOT'
GOOGLE_GEMINI_BASE_URL=https://api.clauddy.com
GEMINI_API_KEY=sk-your-clauddy-token
EOT

cat > ~/.gemini/settings.json << 'EOT'
{
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
EOT
powershell
mkdir "$HOME\.gemini" -Force

@"
GOOGLE_GEMINI_BASE_URL=https://api.clauddy.com
GEMINI_API_KEY=sk-your-clauddy-token
"@ > "$HOME\.gemini\.env"

@"
{
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
"@ > "$HOME\.gemini\settings.json"
Prefer no command line? Create the two files by hand

~/.gemini/.env (Windows: %USERPROFILE%\.gemini\.env)

ini
GOOGLE_GEMINI_BASE_URL=https://api.clauddy.com
GEMINI_API_KEY=sk-your-clauddy-token

~/.gemini/settings.json

json
{
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
FieldMeaning
GOOGLE_GEMINI_BASE_URLhttps://api.clauddy.com
GEMINI_API_KEYYour Clauddy token
security.auth.selectedTypegemini-api-key, skips Google OAuth

Verify ​

bash
gemini

Send any message. A reply means you are done.

Common issues ​

  • Asks for Google login: settings.json is missing or selectedType is misspelled.
  • 401: GEMINI_API_KEY incomplete, or the token group has no Gemini models.
  • Image generation fails: use model gemini-3-pro-image-preview. See Nano Banana Pro.

More in the Gemini FAQ.

Stuck? Let an AI assistant walk you through ​

Copy this and send it to Doubao, ChatGPT, Claude, or any assistant that can read web pages
I want to connect Gemini CLI to Clauddy (an AI API platform). Read this tutorial in full first, then walk me through it step by step:
https://docs.clauddy.com/en/cli/gemini

Rules:
1. After reading, ask me three things: my operating system (Windows / macOS / Linux), whether Gemini CLI is already installed, and whether I already have a Clauddy account and API key.
2. Guide me through ONE step at a time. Wait for my reply before moving on.
3. Use only the URLs, file paths, group names and config values from the tutorial. Do not invent model names, group names or UI options. If the tutorial does not cover something, say "not covered by the tutorial".
4. Before I edit any existing config file, remind me to back it up.
5. Write every example key as sk-xxx. Never ask me to paste my real key to you.
6. You cannot operate my computer. Never claim you changed a file for me. Tell me what to do and I will do it.
7. If a step fails, ask me to paste the full error first, then check it against the tutorial's FAQ section.

Open Doubao ↗ · Read the Gemini CLI guide

Clauddy | AI API 聚合平台