Skip to content

Gemini Configuration

Author: goswitch

Updated: 2026-06-13T10:02:01.000Z

Windows

  1. Press "Win+R" on your keyboard, enter the following and press Enter to open the Gemini CLI configuration directory
%userprofile%\.gemini

  1. If there's no .env file in the directory, create a new .env file and write the following content
  • .env: Gemini CLI configuration file, mainly setting custom endpoint, ApiKey, and model used

GOOGLE_GEMINI_BASE_URL=https://goswitch.online
GEMINI_API_KEY=xxx
GEMINI_MODEL=gemini-2.5-pro

  1. Review Create API Token, create a Gemini group token in GoSwitch, copy the ApiKey and fill it in for xxx

  1. Open a terminal and run gemini. When the interactive interface appears and responds normally, configuration is successful

GoSwitch documentation site.