Gemini CLI Setup
When using Gemini CLI with WDCloud API, use a group token dedicated to Gemini CLI.
Requirements
- Node.js LTS
- Gemini CLI
- A Gemini CLI token created in the WDCloud API console
- Base URL:
https://token.wdcloud.ai
Windows
Install:
powershell
winget install OpenJS.NodeJS.LTS
npm install -g @google/gemini-cliCreate or edit %USERPROFILE%\.gemini\.env:
dotenv
GOOGLE_GEMINI_BASE_URL=https://token.wdcloud.ai
GEMINI_API_KEY=paste-your-gemini-cli-group-token
GEMINI_MODEL=gemini-3-pro-previewCreate or edit %USERPROFILE%\.gemini\settings.json:
json
{
"ide": { "enabled": true },
"security": {
"auth": { "selectedType": "gemini-api-key" }
}
}Start Gemini CLI:
powershell
cd your-project-folder
geminimacOS
Install:
bash
brew install node
npm install -g @google/gemini-cliCreate or edit ~/.gemini/.env:
dotenv
GOOGLE_GEMINI_BASE_URL=https://token.wdcloud.ai
GEMINI_API_KEY=paste-your-gemini-cli-group-token
GEMINI_MODEL=gemini-3-pro-previewCreate or edit ~/.gemini/settings.json:
json
{
"ide": { "enabled": true },
"security": { "auth": { "selectedType": "gemini-api-key" } }
}Start Gemini CLI:
bash
cd your-project-folder
geminiLinux
Ubuntu / Debian:
bash
sudo apt update && sudo apt install -y nodejs npm
npm install -g @google/gemini-cliCreate or edit ~/.gemini/.env:
dotenv
GOOGLE_GEMINI_BASE_URL=https://token.wdcloud.ai
GEMINI_API_KEY=paste-your-gemini-cli-group-token
GEMINI_MODEL=gemini-3-pro-previewCreate or edit ~/.gemini/settings.json:
json
{
"ide": { "enabled": true },
"security": { "auth": { "selectedType": "gemini-api-key" } }
}Start Gemini CLI:
bash
cd your-project-folder
geminiTroubleshooting
- Do not append
/v1toGOOGLE_GEMINI_BASE_URL. GEMINI_API_KEYshould be the dedicated Gemini CLI group token.- If IDE integration does not work, check
ide.enabledinsettings.json.