Gemini CLI Setup Guide

Gemini CLI is Google's terminal agent. Its configuration lives in ~/.gemini/, so you don't need to change shell environment variables.

Before you start, get an LLMoxy token. A token from the auto group is recommended.

Install

npm install -g @google/gemini-cli
gemini --version
BASH

Connect to LLMoxy

Create the configuration directory and write .env:

# macOS / Linux
mkdir -p ~/.gemini
cat > ~/.gemini/.env <<'EOF'
GOOGLE_GEMINI_BASE_URL=https://llmoxy.com
GEMINI_API_KEY=your LLMoxy API Key
GEMINI_MODEL=gemini-4-argon
EOF
BASH
# Windows PowerShell
mkdir -Force "$env:USERPROFILE\.gemini"
@"
GOOGLE_GEMINI_BASE_URL=https://llmoxy.com
GEMINI_API_KEY=your LLMoxy API Key
GEMINI_MODEL=gemini-4-argon
"@ | Out-File -Encoding utf8 "$env:USERPROFILE\.gemini\.env"
POWERSHELL

Optional: choose API Key sign-in explicitly:

{
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
JSON

Save the content above as ~/.gemini/settings.json (%USERPROFILE%\.gemini\settings.json on Windows).

TIP Gemini CLI's URL does not include /v1. Replace your LLMoxy API Key with your real token from the console.

Launch

gemini
BASH

FAQ

gemini: command not found Make sure node -v works, then reopen your terminal. The package name is @google/gemini-cli.

Calls fail Check that .env has no extra spaces, the token's group is auto, and the account has a balance.

Can't connect on Linux Run curl -I https://llmoxy.com; if you need a proxy, add HTTPS_PROXY=http://your-proxy:port to .env.