Gemini CLI Setup
Gemini CLI is Google's terminal coding agent. Through Clauddy you can use it without a Google account.
| Cheat sheet | |
|---|---|
| API endpoint | https://api.clauddy.com |
| Token group | Gemini or Unified |
| Config files | ~/.gemini/.env and ~/.gemini/settings.json, on Windows under %USERPROFILE%\.gemini\ |
| Launch | gemini |
Choose a setup method
Recommended · macOS / Linux / WSLOne-click scriptOne command: install, validate, write config.Windows · GUICC SwitchDesktop app. Enter endpoint and key.ExpertsManual setupTwo small files.
One-click script
bash
curl -fsSL https://docs.clauddy.com/install.sh | bash -s -- --lang en- Type
3in the menu for Gemini CLI. If it is not installed, the script offers to install it. - Create a token in the Gemini group when prompted and paste it. The script validates it live.
- 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-clibash
npm install -g @google/gemini-cliRun 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"
}
}
}
EOTpowershell
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"
}
}
}| Field | Meaning |
|---|---|
GOOGLE_GEMINI_BASE_URL | https://api.clauddy.com |
GEMINI_API_KEY | Your Clauddy token |
security.auth.selectedType | gemini-api-key, skips Google OAuth |
Verify
bash
geminiSend any message. A reply means you are done.
Common issues
- Asks for Google login:
settings.jsonis missing orselectedTypeis misspelled. - 401:
GEMINI_API_KEYincomplete, 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.
